config

package
v0.0.0-...-6f9dc6e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jaeger

type Jaeger struct {
	Host string `toml:"host" yaml:"host" mapstructure:"host" env:"JAEGER_HOST"`
	Port string `toml:"port" yaml:"port" mapstructure:"port" env:"JAEGER_PORT"`
	Name string `toml:"name" yaml:"name" mapstructure:"name" env:"JAEGER_NAME"`
}

func NewJaeger

func NewJaeger() *Jaeger

type Jwt

type Jwt struct {
	Secret string        `toml:"secret" yaml:"secret" mapstructure:"secret" env:"JWT_SECRET"`
	TTL    time.Duration `toml:"ttl" yaml:"ttl" mapstructure:"ttl" env:"JWT_TTL"`
}

func NewJwt

func NewJwt() *Jwt

func (*Jwt) GetSecret

func (j *Jwt) GetSecret() []byte

type Logging

type Logging struct {
	Name       string `toml:"name" yaml:"name" mapstructure:"name" env:"LOGGING_NAME"`
	Driver     string `toml:"driver" yaml:"driver" mapstructure:"driver" env:"LOGGING_DRIVER"`
	FileName   string `toml:"file_name" yaml:"file_name" mapstructure:"file_name" env:"LOGGING_FILE_NAME"`
	Level      string `toml:"level" yaml:"level" mapstructure:"level" env:"LOGGING_LEVEL"`
	FileSizeMB int    `toml:"file_size_mb" yaml:"file_size_mb" mapstructure:"file_size_mb" env:"LOGGING_FILE_SIZE_MB"`
	MaxAge     int    `toml:"max_age" yaml:"max_age" mapstructure:"max_age" env:"LOGGING_MAX_AGE"`
	MaxBackups int    `toml:"max_back_ups" yaml:"max_back_ups" mapstructure:"max_back_ups" env:"LOGGING_MAX_BACK_UPS"`
	Compress   bool   `toml:"compress" yaml:"compress" mapstructure:"compress" env:"LOGGING_COMPRESS"`
}

func NewDefaultLogging

func NewDefaultLogging() *Logging

func (*Logging) InitLogger

func (l *Logging) InitLogger(env app.Env) *logger.Logger

InitLogger 初始化日志

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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