Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCOptions ¶
type GRPCOptions struct {
BindAddress string `json:"bind-address" mapstructure:"bind-address"`
BindPort int `json:"bind-port" mapstructure:"bind-port"`
MaxMsgSize int `json:"max-msg-size" mapstructure:"max-msg-size"`
}
GRPCOptions are for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.
func NewGRPCOptions ¶
func NewGRPCOptions() *GRPCOptions
NewGRPCOptions is for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.
func (*GRPCOptions) AddFlags ¶
func (s *GRPCOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to features for a specific api server to the specified FlagSet.
func (*GRPCOptions) Validate ¶
func (s *GRPCOptions) Validate() []error
Validate is used to parse and validate the parameters entered by the user at the command line when the program starts.
type MySQLOptions ¶
type MySQLOptions struct {
Host string `json:"host,omitempty" mapstructure:"host"`
Username string `json:"username,omitempty" mapstructure:"username"`
Password string `json:"-" mapstructure:"password"`
Database string `json:"database" mapstructure:"database"`
MaxIdleConnections int `json:"max-idle-connections,omitempty" mapstructure:"max-idle-connections"`
MaxOpenConnections int `json:"max-open-connections,omitempty" mapstructure:"max-open-connections"`
MaxConnectionLifeTime time.Duration `json:"max-connection-life-time,omitempty" mapstructure:"max-connection-life-time"`
LogLevel int `json:"log-level" mapstructure:"log-level"`
}
MySQLOptions defines options for mysql database.
func NewMySQLOptions ¶
func NewMySQLOptions() *MySQLOptions
func (*MySQLOptions) AddFlags ¶
func (o *MySQLOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to mysql storage for a specific APIServer to the specified FlagSet.
func (*MySQLOptions) NewClient ¶
func (o *MySQLOptions) NewClient() (*gorm.DB, error)
NewClient create mysql store with the given config.
func (*MySQLOptions) Validate ¶
func (o *MySQLOptions) Validate() []error
Validate verifies flags passed to MySQLOptions.
type SecureOptions ¶
type SecureOptions struct {
BindAddress string `json:"bind-address" mapstructure:"bind-address"`
BindPort int `json:"bind-port" mapstructure:"bind-port"`
Required bool
}
SecureOptions contains configuration items related to HTTPS server startup.
func NewSecureOptions ¶
func NewSecureOptions() *SecureOptions
NewSecureOptions creates a SecureOptions object with default parameters.
func (*SecureOptions) AddFlags ¶
func (s *SecureOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to HTTPS server for a specific APIServer to the specified FlagSet.
func (*SecureOptions) ApplyTo ¶
func (s *SecureOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*SecureOptions) Complete ¶
func (s *SecureOptions) Complete() error
Complete fills in any fields not set that are required to have valid data.
func (*SecureOptions) Validate ¶
func (s *SecureOptions) Validate() []error
Validate is used to parse and validate the parameters entered by the user at the command line when the program starts.
type ServerRunOptions ¶
type ServerRunOptions struct {
Mode string `json:"mode" mapstructure:"mode"`
Id int64 `json:"id" mapstructure:"id"`
}
ServerRunOptions contains the options while running a generic api server.
func NewServerRunOptions ¶
func NewServerRunOptions() *ServerRunOptions
NewServerRunOptions creates a new ServerRunOptions object with default parameters.
func (*ServerRunOptions) AddFlags ¶
func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific APIServer to the specified FlagSet.
func (*ServerRunOptions) ApplyTo ¶
func (s *ServerRunOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*ServerRunOptions) Validate ¶
func (s *ServerRunOptions) Validate() []error
Validate checks validation of ServerRunOptions.