Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
C = new(Config)
)
Functions ¶
func PrintWithJSON ¶
func PrintWithJSON()
Types ¶
type Config ¶
type Config struct {
ServerConfig ServerConfig `json:"server" mapstructure:"server"`
Redis Redis `json:"redis" mapstructure:"redis"`
Gorm Gorm `json:"gorm" mapstructure:"gorm"`
PrintConfig bool `json:"print_config" mapstructure:"print_config"`
}
type Gorm ¶
type Gorm struct {
Debug bool `json:"debug" mapstructure:"debug"`
DBType string `json:"db_type" mapstructure:"db_type"`
DbName string `json:"db_name" mapstructure:"db_name"`
MaxLifetime int `json:"max_lifetime" mapstructure:"max_lifetime"`
MaxOpenConns int `json:"max_open_conns" mapstructure:"max_open_conns"`
MaxIdleConns int `json:"max_idle_conns" mapstructure:"max_idle_conns"`
TablePrefix string `json:"table_prefix" mapstructure:"table_prefix"`
EnableAutoMigrate bool `json:"enable_auto_migrate" mapstructure:"enable_auto_migrate"`
Dsn string `json:"dsn" mapstructure:"dsn"`
}
type ServerConfig ¶
type ServerConfig struct {
Host string `json:"host" mapstructure:"host"`
GrpcProtocol string `json:"grpc_protocol" mapstructure:"grpc_protocol"`
GrpcPort string `json:"grpc_port" mapstructure:"grpc_port"`
HttpPort string `json:"http_port" mapstructure:"http_port"`
Cert string `json:"cert" mapstructure:"cert"`
Key string `json:"key" mapstructure:"key"`
CAName string `json:"ca_name" mapstructure:"ca_name"`
AuthKey string `json:"auth_key" mapstructure:"auth_key"`
Tokens []string `json:"tokens" mapstructure:"tokens"`
}
Click to show internal directories.
Click to hide internal directories.