game/common/config/config.go

54 lines
1.2 KiB
Go
Raw Normal View History

2025-05-25 20:34:08 +08:00
package config
type Common[T any] struct {
ServiceType int `json:"service_type"`
Logger Logger `json:"logger"`
Etcd Etcd `json:"etcd"`
Nats Nats `json:"nats"`
Special *T `json:"special"`
}
type Logger struct {
Level string `json:"level"`
}
type Rabbitmq struct {
Host string `json:"host"`
Port string `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
VHost string `json:"v_host"`
}
type DB struct {
Host string `json:"host"`
Port string `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
}
type Redis struct {
Host string `json:"host"`
Port string `json:"port"`
Password string `json:"password"` // fox379@@zyxi
DBIndex int `json:"db_index"`
}
type ClickHouse struct {
Host string `json:"host"`
Port string `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
DbName string `json:"db_name"`
}
type Nats struct {
Address []string `json:"address"`
}
type Etcd struct {
Address []string `json:"address"`
Username string `json:"username"`
Password string `json:"password"`
}