Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CnfAuth ¶
type CnfAuth struct { BaseURL string `validate:"url"` Cookie string Salt string Key string `validate:"len=16"` State string Twitter CnfTwitter Google CnfOAuth GitHub CnfOAuth }
CnfAuth is auth section of secret.conf
type CnfBackup ¶
type CnfBackup struct { Enabled bool Interval duration }
CnfBackup is configuration about backup interval
type CnfCompany ¶
type CnfCompany struct {
Attract float64 `validate:"gt=0"`
}
type CnfDatabase ¶
CnfDatabase is configuration about connectiing user data stored database
type CnfEntity ¶
type CnfEntity struct { MaxScale float64 `toml:"max_scale" validate:"gtfield=MinScale"` MinScale float64 `toml:"min_scale" validate:"ltfield=MaxScale"` Residence CnfResidence Company CnfCompany Gate CnfGate Platform CnfPlatform Train CnfTrain Human CnfHuman }
CnfEntity is entity section of game.conf
type CnfGame ¶
type CnfGame struct { Entity CnfEntity Service CnfService }
CnfGame is root element of game.conf
type CnfGate ¶
type CnfGate struct {
Num int `validate:"gt=0"`
}
CnfGate is configuration about gate
type CnfHuman ¶
type CnfHuman struct {
Speed float64 `validate:"gt=0"`
}
CnfHuman is configuration about human
type CnfPerf ¶
type CnfPerf struct { View duration Game duration Operation duration Routing duration Backup duration Restore duration Init duration }
CnfPerf is configuration about performance logging
type CnfPlatform ¶
CnfPlatform is configuration about platform
type CnfProcedure ¶
CnfProcedure is configuration about game proceding
type CnfResidence ¶
type CnfResidence struct { Interval duration Capacity int `validate:"gt=0"` Randomize float64 `validate:"gte=0"` }
CnfResidence is configuration about residence
type CnfRouting ¶
CnfRouting is configuration about paralization
type CnfSecret ¶
type CnfSecret struct { Admin CnfAdmin Auth CnfAuth DB CnfDatabase }
CnfSecret is root section of secret.conf
type CnfService ¶
type CnfService struct { Procedure CnfProcedure Routing CnfRouting Backup CnfBackup Perf CnfPerf }
CnfService is service section of game.conf
type CnfTrain ¶
type CnfTrain struct { Speed float64 `validate:"gt=0"` Capacity int `validate:"gt=0"` Mobility int `validate:"gt=0"` Slowness float64 `validate:"gt=0,lte=1"` Randomize float64 `validate:"gte=0"` }
CnfTrain is configuration about train