options

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOptions

type AuthOptions struct {
	AssetsPath             string
	IDTokenTimeout         time.Duration
	InitTenantType         string
	InitTenantID           string
	InitIDPAdmins          []string
	LdapConfigFile         string
	InitClientID           string
	InitClientSecret       string
	InitClientRedirectUris []string
	PasswordGrantConnID    string
}

AuthOptions contains configuration items related to auth attributes.

func NewAuthOptions

func NewAuthOptions() *AuthOptions

NewAuthOptions creates a AuthOptions object with default parameters.

func (*AuthOptions) AddFlags

func (o *AuthOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for console to the specified FlagSet object.

func (*AuthOptions) ApplyFlags

func (o *AuthOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

type AuthorizationOptions

type AuthorizationOptions struct {
	CasbinModelFile             string
	CasbinReloadInterval        time.Duration
	Debug                       bool
	PolicyFile                  string
	WebhookConfigFile           string
	WebhookVersion              string
	WebhookCacheAuthorizedTTL   time.Duration
	WebhookCacheUnauthorizedTTL time.Duration
}

AuthorizationOptions contains configuration items related to authorization.

func NewAuthorizationOptions

func NewAuthorizationOptions() *AuthorizationOptions

NewAuthorizationOptions creates a AuthorizationOptions object with default parameters.

func (*AuthorizationOptions) AddFlags

func (o *AuthorizationOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to authenticate for a specific APIServer to the specified FlagSet

func (*AuthorizationOptions) ApplyFlags

func (o *AuthorizationOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

type Options

Options is the main context object for the TKE auth.

func NewOptions

func NewOptions(serverName string) *Options

NewOptions creates a new Options with a default config.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for a specific server to the specified FlagSet object.

func (*Options) ApplyFlags

func (o *Options) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

func (*Options) Complete

func (o *Options) Complete() error

Complete set default Options. Should be called after tke-auth flags parsed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL