options

package
v0.0.0-...-455e706 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	FeatureOptions  *genericOptions.FeatureOptions  `json:"feature" mapstructure:"feature"`
	GRPCOptions     *genericOptions.GRPCOptions     `json:"grpc" mapstructure:"grpc"`
	HttpOption      *genericOptions.HttpOption      `json:"http" mapstructure:"http"`
	HttpsOption     *genericOptions.HttpsOption     `json:"https" mapstructure:"https"`
	JwtOption       *genericOptions.JwtOption       `json:"jwt" mapstructure:"jwt"` // 这里 ????? mapstructure
	MysqlOption     *genericOptions.MysqlOption     `json:"mysql" mapstructure:"mysql"`
	RedisOption     *genericOptions.RedisOptions    `json:"redis" mapstructure:"redis"` // 这里和配置中的大层相对
	ServerRunOption *genericOptions.ServerRunOption `json:"server" mapstructure:"server"`
	LogOption       *log.Option                     `json:"log" mapstructure:"log"`
}

func NewOption

func NewOption() *Option

func (*Option) ApplyTo

func (o *Option) ApplyTo(c *server.ServerConfig) error

调用 ApplyTo 函数

func (*Option) Flags

func (o *Option) Flags() (fss cliflag.NamedFlagSets)

调用 Flags 函数

func (*Option) Validate

func (o *Option) Validate() []error

Validate checks Options and return a slice of found errs.

Jump to

Keyboard shortcuts

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