Documentation ¶
Index ¶
- Variables
- func ParseAjaxPage[T AjaxPagePages](e extractor.Extractor, pageHTML []byte) (T, error)
- func ParsePage[T FullPagePages](e extractor.Extractor, pageHTML []byte) (T, error)
- type AjaxPagePages
- type DefensesPage
- type EventListAjaxPage
- type FacilitiesPage
- type FetchTechsAjaxPage
- type FullPage
- func (p FullPage) ExtractAdmiral() bool
- func (p FullPage) ExtractAjaxChatToken() (string, error)
- func (p FullPage) ExtractCelestial(v any) (ogame.Celestial, error)
- func (p FullPage) ExtractCelestials() ([]ogame.Celestial, error)
- func (p FullPage) ExtractCharacterClass() (ogame.CharacterClass, error)
- func (p FullPage) ExtractCommander() bool
- func (p FullPage) ExtractEngineer() bool
- func (p FullPage) ExtractGeologist() bool
- func (p FullPage) ExtractIsInVacation() bool
- func (p FullPage) ExtractLifeformEnabled() bool
- func (p FullPage) ExtractMoon(v any) (ogame.Moon, error)
- func (p FullPage) ExtractMoons() []ogame.Moon
- func (p FullPage) ExtractOGameSession() string
- func (p FullPage) ExtractPlanet(v any) (ogame.Planet, error)
- func (p FullPage) ExtractPlanets() []ogame.Planet
- func (p FullPage) ExtractServerTime() (time.Time, error)
- func (p FullPage) ExtractTechnocrat() bool
- type FullPagePages
- type IFullPage
- type LfBuildingsPage
- type LfResearchPage
- type MissileAttackLayerAjaxPage
- type MovementPage
- type OverviewPage
- func (p OverviewPage) ExtractActiveItems() ([]ogame.ActiveItem, error)
- func (p OverviewPage) ExtractCancelBuildingInfos() (token string, techID, listID int64, err error)
- func (p OverviewPage) ExtractCancelLfBuildingInfos() (token string, id, listID int64, err error)
- func (p OverviewPage) ExtractCancelResearchInfos() (token string, techID, listID int64, err error)
- func (p OverviewPage) ExtractConstructions() (ogame.ID, int64, ogame.ID, int64, ogame.ID, int64, ogame.ID, int64)
- func (p OverviewPage) ExtractDMCosts() (ogame.DMCosts, error)
- func (p OverviewPage) ExtractUserInfos() (ogame.UserInfos, error)
- type Page
- type PhalanxAjaxPage
- type PreferencesPage
- type ResearchPage
- type ResourcesSettingsPage
- type RocketlayerAjaxPage
- type ShipyardPage
- type SuppliesPage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParsePageType = errors.New("failed to parse requested page type")
Functions ¶
func ParseAjaxPage ¶
func ParseAjaxPage[T AjaxPagePages](e extractor.Extractor, pageHTML []byte) (T, error)
Types ¶
type AjaxPagePages ¶
type AjaxPagePages interface { EventListAjaxPage | MissileAttackLayerAjaxPage | FetchTechsAjaxPage | RocketlayerAjaxPage | PhalanxAjaxPage }
type DefensesPage ¶
type DefensesPage struct{ FullPage }
func (DefensesPage) ExtractDefense ¶
func (p DefensesPage) ExtractDefense() (ogame.DefensesInfos, error)
type EventListAjaxPage ¶
type EventListAjaxPage struct{ Page }
func (EventListAjaxPage) ExtractAttacks ¶
func (p EventListAjaxPage) ExtractAttacks(ownCoords []ogame.Coordinate) ([]ogame.AttackEvent, error)
type FacilitiesPage ¶
type FacilitiesPage struct{ FullPage }
func (FacilitiesPage) ExtractFacilities ¶
func (p FacilitiesPage) ExtractFacilities() (ogame.Facilities, error)
type FetchTechsAjaxPage ¶
type FetchTechsAjaxPage struct{ Page }
func (FetchTechsAjaxPage) ExtractTechs ¶
func (p FetchTechsAjaxPage) ExtractTechs() (ogame.ResourcesBuildings, ogame.Facilities, ogame.ShipsInfos, ogame.DefensesInfos, ogame.Researches, ogame.LfBuildings, error)
type FullPage ¶
type FullPage struct{ Page }
func (FullPage) ExtractAdmiral ¶
func (FullPage) ExtractAjaxChatToken ¶
func (FullPage) ExtractCelestial ¶
func (FullPage) ExtractCelestials ¶
func (FullPage) ExtractCharacterClass ¶
func (p FullPage) ExtractCharacterClass() (ogame.CharacterClass, error)
func (FullPage) ExtractCommander ¶
func (FullPage) ExtractEngineer ¶
func (FullPage) ExtractGeologist ¶
func (FullPage) ExtractIsInVacation ¶
func (FullPage) ExtractLifeformEnabled ¶
func (FullPage) ExtractMoons ¶
func (FullPage) ExtractOGameSession ¶
func (FullPage) ExtractPlanets ¶
func (FullPage) ExtractTechnocrat ¶
type FullPagePages ¶
type FullPagePages interface { OverviewPage | PreferencesPage | SuppliesPage | ResourcesSettingsPage | FacilitiesPage | LfBuildingsPage | LfResearchPage | ResearchPage | ShipyardPage | DefensesPage | MovementPage }
type IFullPage ¶
type IFullPage interface { ExtractOGameSession() string ExtractIsInVacation() bool ExtractPlanets() []ogame.Planet ExtractAjaxChatToken() (string, error) ExtractCharacterClass() (ogame.CharacterClass, error) ExtractCommander() bool ExtractAdmiral() bool ExtractEngineer() bool ExtractGeologist() bool ExtractTechnocrat() bool ExtractServerTime() (time.Time, error) }
type LfBuildingsPage ¶
type LfBuildingsPage struct{ FullPage }
func (LfBuildingsPage) ExtractLfBuildings ¶
func (p LfBuildingsPage) ExtractLfBuildings() (ogame.LfBuildings, error)
type LfResearchPage ¶
type LfResearchPage struct{ FullPage }
func (LfResearchPage) ExtractLfResearch ¶
func (p LfResearchPage) ExtractLfResearch() (ogame.LfResearches, error)
type MissileAttackLayerAjaxPage ¶
type MissileAttackLayerAjaxPage struct{ Page }
func (MissileAttackLayerAjaxPage) ExtractIPM ¶
func (p MissileAttackLayerAjaxPage) ExtractIPM() (int64, int64, string)
type MovementPage ¶
type MovementPage struct{ FullPage }
func (MovementPage) ExtractCancelFleetToken ¶
func (p MovementPage) ExtractCancelFleetToken(fleetID ogame.FleetID) (string, error)
func (MovementPage) ExtractFleets ¶
func (p MovementPage) ExtractFleets() []ogame.Fleet
func (MovementPage) ExtractSlots ¶
func (p MovementPage) ExtractSlots() ogame.Slots
type OverviewPage ¶
type OverviewPage struct{ FullPage }
func (OverviewPage) ExtractActiveItems ¶
func (p OverviewPage) ExtractActiveItems() ([]ogame.ActiveItem, error)
func (OverviewPage) ExtractCancelBuildingInfos ¶
func (p OverviewPage) ExtractCancelBuildingInfos() (token string, techID, listID int64, err error)
func (OverviewPage) ExtractCancelLfBuildingInfos ¶
func (p OverviewPage) ExtractCancelLfBuildingInfos() (token string, id, listID int64, err error)
func (OverviewPage) ExtractCancelResearchInfos ¶
func (p OverviewPage) ExtractCancelResearchInfos() (token string, techID, listID int64, err error)
func (OverviewPage) ExtractConstructions ¶
func (OverviewPage) ExtractDMCosts ¶
func (p OverviewPage) ExtractDMCosts() (ogame.DMCosts, error)
func (OverviewPage) ExtractUserInfos ¶
func (p OverviewPage) ExtractUserInfos() (ogame.UserInfos, error)
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) GetContent ¶
type PhalanxAjaxPage ¶
type PhalanxAjaxPage struct{ Page }
func (PhalanxAjaxPage) ExtractPhalanx ¶
func (p PhalanxAjaxPage) ExtractPhalanx() ([]ogame.Fleet, error)
type PreferencesPage ¶
type PreferencesPage struct{ FullPage }
func (PreferencesPage) ExtractPreferences ¶
func (p PreferencesPage) ExtractPreferences() ogame.Preferences
type ResearchPage ¶
type ResearchPage struct{ FullPage }
func (ResearchPage) ExtractResearch ¶
func (p ResearchPage) ExtractResearch() ogame.Researches
type ResourcesSettingsPage ¶
type ResourcesSettingsPage struct{ FullPage }
func (ResourcesSettingsPage) ExtractResourceSettings ¶
func (p ResourcesSettingsPage) ExtractResourceSettings() (ogame.ResourceSettings, string, error)
type RocketlayerAjaxPage ¶
type RocketlayerAjaxPage struct{ Page }
func (RocketlayerAjaxPage) ExtractDestroyRockets ¶
func (p RocketlayerAjaxPage) ExtractDestroyRockets() (int64, int64, string, error)
type ShipyardPage ¶
type ShipyardPage struct{ FullPage }
func (ShipyardPage) ExtractProduction ¶
func (p ShipyardPage) ExtractProduction() ([]ogame.Quantifiable, int64, error)
func (ShipyardPage) ExtractShips ¶
func (p ShipyardPage) ExtractShips() (ogame.ShipsInfos, error)
type SuppliesPage ¶
type SuppliesPage struct{ FullPage }
func (SuppliesPage) ExtractResourcesBuildings ¶
func (p SuppliesPage) ExtractResourcesBuildings() (ogame.ResourcesBuildings, error)
Source Files ¶
- defensesPage.go
- eventListAjaxPage.go
- facilitiesPage.go
- fetchTechsAjaxPage.go
- fullPage.go
- lfbuildingsPage.go
- lftechsPage.go
- missileAttackLayerAjaxPage.go
- movementPage.go
- overviewPage.go
- parser.go
- phalanxAjaxPage.go
- preferencesPage.go
- researchPage.go
- resourcesSettingsPage.go
- rocketlayerAjaxPage.go
- shipyardPage.go
- suppliesPage.go
Click to show internal directories.
Click to hide internal directories.