36 lines
497 B
Go
36 lines
497 B
Go
package config
|
|
|
|
import "gopkg.in/natefinch/lumberjack.v2"
|
|
|
|
type MqttConfig struct {
|
|
Url string
|
|
}
|
|
|
|
type AliyunConfig struct {
|
|
AccessKeyID string
|
|
AccessKeySecret string
|
|
AppKey string
|
|
Timeout int
|
|
}
|
|
|
|
type GameConfig struct {
|
|
MaxTimeout int
|
|
}
|
|
|
|
type Logger struct {
|
|
File *lumberjack.Logger
|
|
Level string
|
|
}
|
|
|
|
type config struct {
|
|
Location string
|
|
Point int
|
|
Relay string
|
|
Log Logger
|
|
Mqtt MqttConfig
|
|
Aliyun AliyunConfig
|
|
Game GameConfig
|
|
}
|
|
|
|
var C config
|