Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = Config{ ServiceName: "rogue-repo", App: App{ GrpcHost: "", GrpcPort: 0, }, Etcd: Etcd{ Endpoints: []string{"127.0.0.1:2379"}, }, MongoDB: MongoDB{ DSN: "mongodb://127.0.0.1:27017", }, MySQL: MySQL{ DSN: "root:root@tcp(127.0.0.1:3306)/rogue_repo?charset=utf8mb4&parseTime=true&loc=Local", MinOpen: 3, MaxOpen: 10, }, Log: Log{ DisableTimestamp: false, Level: "info", Format: "text", MaxSize: 20, Dir: "../log", }, }
Functions ¶
func SetupLogger ¶
Types ¶
type Config ¶
type Config struct { ServiceName string `json:"service-name" toml:"service-name"` App App `json:"app" toml:"app"` Etcd Etcd `json:"etcd" toml:"etcd"` MongoDB MongoDB `json:"mongodb" toml:"mongodb"` MySQL MySQL `json:"mysql" toml:"mysql"` Log Log `json:"log" toml:"log"` }
func (*Config) FindAndLoad ¶
Click to show internal directories.
Click to hide internal directories.