package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Mar 27, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type ApiConf struct {
ServiceConf `mapstructure:",squash"`
Addr string `json:"Addr,default=:8080"`
Mode string `json:"Mode,default=release"`
Timeout int64 `json:"Timeout,default=60"`
}
type DbConf struct {
DSN string `json:"dsn"`
}
type JwtAuth struct {
Secret string `json:"Secret"`
}
type Option func(opt *options)
Option defines the method to customize the config options.
type RedisConf struct {
Addr string `json:"addr,default=127.0.0.1:6379"`
Pass string `json:"pass,default="`
DataBase int64 `json:"database,default=1"`
Timeout int64 `json:"timeout,default=60"`
}
type ServiceConf struct {
Name string `json:"Name"`
Mode string `json:"Mode,default=release"`
MetricsUrl string `json:"MetricsUrl"`
Prometheus string `json:"Prometheus"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.