Documentation ¶
Index ¶
- Constants
- type LoadEnnoblementsConfig
- type Server
- type ServerDataLoader
- func (dl *ServerDataLoader) GetBuildingConfig() (*twmodel.BuildingConfig, error)
- func (dl *ServerDataLoader) GetConfig() (*twmodel.ServerConfig, error)
- func (dl *ServerDataLoader) GetUnitConfig() (*twmodel.UnitConfig, error)
- func (dl *ServerDataLoader) LoadEnnoblements(cfg *LoadEnnoblementsConfig) ([]*twmodel.Ennoblement, error)
- func (dl *ServerDataLoader) LoadOD(tribe bool) (map[int]*twmodel.OpponentsDefeated, error)
- func (dl *ServerDataLoader) LoadPlayers() ([]*twmodel.Player, error)
- func (dl *ServerDataLoader) LoadTribes() ([]*twmodel.Tribe, error)
- func (dl *ServerDataLoader) LoadVillages() ([]*twmodel.Village, error)
- type ServerDataLoaderConfig
- type VersionDataLoader
- type VersionDataLoaderConfig
Constants ¶
View Source
const ( EndpointConfig = "/interface.php?func=get_config" EndpointUnitConfig = "/interface.php?func=get_unit_info" EndpointBuildingConfig = "/interface.php?func=get_building_info" EndpointPlayer = "/map/player.txt.gz" EndpointPlayerNotGzipped = "/map/player.txt" EndpointTribe = "/map/ally.txt.gz" EndpointTribeNotGzipped = "/map/ally.txt" EndpointVillage = "/map/village.txt.gz" EndpointVillageNotGzipped = "/map/village.txt" EndpointKillAtt = "/map/kill_att.txt.gz" EndpointKillAttNotGzipped = "/map/kill_att.txt" EndpointKillDef = "/map/kill_def.txt.gz" EndpointKillDefNotGzipped = "/map/kill_def.txt" EndpointKillSup = "/map/kill_sup.txt.gz" EndpointKillSupNotGzipped = "/map/kill_sup.txt" EndpointKillAll = "/map/kill_all.txt.gz" EndpointKillAllNotGzipped = "/map/kill_all.txt" EndpointKillAttTribe = "/map/kill_att_tribe.txt.gz" EndpointKillAttTribeNotGzipped = "/map/kill_att_tribe.txt" EndpointKillDefTribe = "/map/kill_def_tribe.txt.gz" EndpointKillDefTribeNotGzipped = "/map/kill_def_tribe.txt" EndpointKillAllTribe = "/map/kill_all_tribe.txt.gz" EndpointKillAllTribeNotGzipped = "/map/kill_all_tribe.txt" EndpointConquer = "/map/conquer.txt.gz" EndpointConquerNotGzipped = "/map/conquer.txt" EndpointGetConquer = endpointInterface + "?func=get_conquer&since=%d" EndpointGetServers = "/backend/get_servers.php" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadEnnoblementsConfig ¶
type ServerDataLoader ¶
type ServerDataLoader struct {
// contains filtered or unexported fields
}
func NewServerDataLoader ¶
func NewServerDataLoader(cfg *ServerDataLoaderConfig) *ServerDataLoader
func (*ServerDataLoader) GetBuildingConfig ¶
func (dl *ServerDataLoader) GetBuildingConfig() (*twmodel.BuildingConfig, error)
func (*ServerDataLoader) GetConfig ¶
func (dl *ServerDataLoader) GetConfig() (*twmodel.ServerConfig, error)
func (*ServerDataLoader) GetUnitConfig ¶
func (dl *ServerDataLoader) GetUnitConfig() (*twmodel.UnitConfig, error)
func (*ServerDataLoader) LoadEnnoblements ¶
func (dl *ServerDataLoader) LoadEnnoblements(cfg *LoadEnnoblementsConfig) ([]*twmodel.Ennoblement, error)
func (*ServerDataLoader) LoadOD ¶
func (dl *ServerDataLoader) LoadOD(tribe bool) (map[int]*twmodel.OpponentsDefeated, error)
func (*ServerDataLoader) LoadPlayers ¶
func (dl *ServerDataLoader) LoadPlayers() ([]*twmodel.Player, error)
func (*ServerDataLoader) LoadTribes ¶
func (dl *ServerDataLoader) LoadTribes() ([]*twmodel.Tribe, error)
func (*ServerDataLoader) LoadVillages ¶
func (dl *ServerDataLoader) LoadVillages() ([]*twmodel.Village, error)
type ServerDataLoaderConfig ¶
type VersionDataLoader ¶
type VersionDataLoader struct {
// contains filtered or unexported fields
}
func NewVersionDataLoader ¶
func NewVersionDataLoader(cfg *VersionDataLoaderConfig) *VersionDataLoader
func (*VersionDataLoader) LoadServers ¶
func (dl *VersionDataLoader) LoadServers() ([]*Server, error)
type VersionDataLoaderConfig ¶
Click to show internal directories.
Click to hide internal directories.