Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ LogLevel: "Info", MysqlDsn: "root:password@tcp(127.0.0.1:3306)/MariGS?charset=utf8mb4&parseTime=True&loc=Local", GameDataConfigPath: "data", Dispatch: []Dispatch{ { Name: "os_usa", Title: "MariGS", Type: "os_usa", DispatchUrl: "http://127.0.0.1:8080/query_cur_region", }, }, Account: &Account{ AutoCreate: true, MaxPlayer: -1, }, Http: &Http{ Addr: "0.0.0.0", Port: 8080, }, Game: &Game{ Addr: "127.0.0.1", Port: 22102, IsInitialization: true, }, }
View Source
var FileNotExist = errors.New("config file not found")
Functions ¶
func LoadConfig ¶
func LoadConfig() error
Types ¶
type Config ¶
type Config struct { LogLevel string `json:"logLevel"` MysqlDsn string `json:"MysqlDsn"` GameDataConfigPath string `json:"GameDataConfigPath"` SignRsaKey []byte EncRsaKeyMap map[string][]byte PwdRsaKey []byte Dispatch []Dispatch Account *Account Http *Http Game *Game Ec2b *random.Ec2b `json:"Ec2B"` }
Click to show internal directories.
Click to hide internal directories.