Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = 8000 DefaultConfigName = "config" DefaultConfigType = "toml" ServerPortKey = "server.port" )
Variables ¶
This section is empty.
Functions ¶
func SetLogLevelChangeListener ¶ added in v0.4.0
func SetLogLevelChangeListener(listener func(level string))
Types ¶
type AuthConfig ¶
type BillingConfig ¶ added in v0.2.0
type BillingConfig struct {
CheckinURL string `mapstructure:"billing_checkin_url"`
}
type Config ¶
type Config struct {
Server ServerConfig `mapstructure:"server"`
Log LogConfig `mapstructure:"log"`
Registry Registration `mapstructure:"registry"`
Database DatabaseConfig `mapstructure:"database"`
Auth AuthConfig `mapstructure:"auth"`
Billing BillingConfig `mapstructure:"billing"`
Redis RedisConfig `mapstructure:"redis"`
Extra ExtraConfig `mapstructure:"extra"`
}
var (
CFG *Config
)
type DatabaseConfig ¶
type ExtraConfig ¶ added in v0.2.0
type RedisConfig ¶ added in v0.2.0
type Registration ¶ added in v0.4.0
type Registration struct {
Host string `mapstructure:"host"`
Port uint64 `mapstructure:"port"`
GrpcPort uint64 `mapstructure:"grpc_port"`
NamespaceId string `mapstructure:"namespace_id"`
Group string `mapstructure:"group"`
DataId string `mapstructure:"data_id"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
}
type ServerConfig ¶
type ServerConfig struct {
Port int `mapstructure:"port"`
}
Click to show internal directories.
Click to hide internal directories.