Documentation ¶
Index ¶
Constants ¶
View Source
const (
FlagConfig = "config"
)
Defines flag for onexctl.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Config string WrapConfigFn func() error UserOptions *UserOptions `json:"user" mapstructure:"user"` UserCenterOptions *ServerOptions `json:"usercenter" mapstructure:"usercenter"` GatewayOptions *ServerOptions `json:"gateway" mapstructure:"gateway"` }
Options composes the set of values necessary for obtaining onex service config.
func NewOptions ¶
func NewOptions() *Options
NewOptions returns ConfigFlags with default values set.
type ServerOptions ¶
type ServerOptions struct { Insecure bool `json:"insecure-skip-tls-verify" mapstructure:"insecure-skip-tls-verify"` CAFile string `json:"certificate-authority" mapstructure:"certificate-authority"` Addr string `json:"addr" mapstructure:"addr"` Timeout time.Duration `json:"timeout" mapstructure:"timeout"` MaxRetries int `json:"max-retries" mapstructure:"max-retries"` RetryInterval time.Duration `json:"retry-interval" mapstructure:"retry-interval"` }
ServerOptions defines options for server client.
func NewServerOptions ¶
func NewServerOptions() *ServerOptions
NewServerOptions create a `zero` value instance.
func (*ServerOptions) AddFlags ¶
func (o *ServerOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string)
AddFlags adds flags related to mysql storage for a specific APIServer to the specified FlagSet.
func (*ServerOptions) Validate ¶
func (o *ServerOptions) Validate() []error
Validate verifies flags passed to ServerOptions.
type UserOptions ¶
type UserOptions struct { BearerToken string `json:"token" mapstructure:"token"` Username string `json:"username" mapstructure:"username"` Password string `json:"password" mapstructure:"password"` SecretID string `json:"secret-id" mapstructure:"secret-id"` SecretKey string `json:"secret-key" mapstructure:"secret-key"` CertFile string `json:"client-certificate" mapstructure:"client-certificate"` KeyFile string `json:"client-key" mapstructure:"client-key"` }
UserOptions defines options for user client.
func NewUserOptions ¶
func NewUserOptions() *UserOptions
NewUserOptions create a `zero` value instance.
func (*UserOptions) AddFlags ¶
func (o *UserOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to mysql storage for a specific APIServer to the specified FlagSet.
func (*UserOptions) Validate ¶
func (o *UserOptions) Validate() []error
Validate verifies flags passed to UserOptions.
Click to show internal directories.
Click to hide internal directories.