Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtOptions ¶
type JwtOptions struct { Realm string `json:"realm" mapstructure:"realm"` Key string `json:"key" mapstructure:"key"` Timeout time.Duration `json:"timeout" mapstructure:"timeout"` MaxRefresh time.Duration `json:"max-refresh" mapstructure:"max-refresh"` }
func NewJwtOptions ¶
func NewJwtOptions() *JwtOptions
func (*JwtOptions) AddFlags ¶
func (s *JwtOptions) AddFlags(fs *pflag.FlagSet)
func (*JwtOptions) Validate ¶
func (s *JwtOptions) Validate() []error
type MySQLOptions ¶
type MySQLOptions struct { Host string `json:"host,omitempty" mapstructure:"host"` Port string `json:"port,omitempty" mapstructure:"port"` UserName string `json:"username,omitempty" mapstructure:"username"` Password string `json:"password,omitempty" mapstructure:"password"` Database string `json:"database,omitempty" 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,omitempty" mapstructure:"log-level"` }
func NewMySQLOptions ¶
func NewMySQLOptions() *MySQLOptions
func (*MySQLOptions) AddFlags ¶
func (o *MySQLOptions) AddFlags(fs *pflag.FlagSet)
func (*MySQLOptions) Validate ¶
func (o *MySQLOptions) Validate() []error
type ServerOptions ¶
type ServerOptions struct { Name string `mapstructure:"name" json:"name,omitempty"` Host string `mapstructure:"host" json:"host,omitempty"` Port int `mapstructure:"port" json:"port,omitempty"` // 中间件 Middlewares []string `mapstructure:"middlewares" json:"middlewares,omitempty"` }
func NewServerOptions ¶
func NewServerOptions() *ServerOptions
func (*ServerOptions) AddFlags ¶
func (o *ServerOptions) AddFlags(fs *pflag.FlagSet)
func (*ServerOptions) Validate ¶
func (o *ServerOptions) Validate() []error
Click to show internal directories.
Click to hide internal directories.