config

package
v0.0.0-...-c820190 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log      *log.Options             `json:"log" mapstructure:"log"`
	Server   *options.ServerOptions   `json:"service" mapstructure:"service"`   // 服务发现
	Registry *options.RegistryOptions `json:"registry" mapstructure:"registry"` // 注册中心
	Jwt      *options.JwtOptions      `json:"jwt" mapstructure:"jwt"`           // jwt
}

func New

func New() *Config

func (*Config) Flags

func (c *Config) Flags() (fss cliflag.NamedFlagSets)

Flags implements app.CliOptions interface.Add flags to the specified FlagSet object.

func (*Config) Validate

func (c *Config) Validate() (errors []error)

Validate 将配置中的所有校验子逻辑 注册到当前实例的校验中

Jump to

Keyboard shortcuts

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