Documentation ¶
Index ¶
- Constants
- type DB
- func (db *DB) AddIndexes() error
- func (db *DB) DeleteStaticData() error
- func (db *DB) GetData(filter interface{}) (results []KillmailData, err error)
- func (db *DB) GetKillmail(id int) (mail KillmailData, err error)
- func (db *DB) GetKillsMissingAxiom() (mails []KillmailData, err error)
- func (db *DB) GetKillsMissingZKB() (hashes []ScrapeQueue, err error)
- func (db *DB) GetSystems() (systems []ESISystem, err error)
- func (db *DB) InsertAsteroidBelt(belt ESIAsteroidBelt) error
- func (db *DB) InsertCategory(category ESICategory) error
- func (db *DB) InsertConstellation(cons ESIConstellation) error
- func (db *DB) InsertGroup(group ESIGroup) error
- func (db *DB) InsertKillIDHash(idhash ScrapeQueue) error
- func (db *DB) InsertKillmail(kill KillmailData) error
- func (db *DB) InsertMoon(moon ESIMoon) error
- func (db *DB) InsertPlanet(planet ESIPlanet) error
- func (db *DB) InsertQueueJob(job Queue) error
- func (db *DB) InsertRegion(region ESIRegion) error
- func (db *DB) InsertStar(star ESIStar) error
- func (db *DB) InsertStargate(gate ESIStargate) error
- func (db *DB) InsertStation(station ESIStation) error
- func (db *DB) InsertSystem(system ESISystem) error
- func (db *DB) InsertType(typeESI ESIType) error
- func (db *DB) ListAllExistingIDs() (ids []int, err error)
- func (db *DB) ListAllExistingKillmails() (mails []KillmailData, err error)
- func (db *DB) ListDatabaseNames() ([]string, error)
- func (db *DB) ListMissingKillmails() (mails []ScrapeQueue, err error)
- func (db *DB) MaintainJobReservation(job Queue, t time.Time) error
- func (db *DB) MarkJobComplete(job Queue) error
- func (db *DB) PopQueueJob() (job Queue, err error)
- func (db *DB) SeedDB() error
- func (db *DB) UpdateKillmail(filter interface{}, update interface{}) error
- func (db *DB) UpdateManyHashes(hashes []ScrapeQueue) error
- type ESIAsteroidBelt
- type ESIAttacker
- type ESICategory
- type ESIConstellation
- type ESIGroup
- type ESIItem
- type ESIKillmail
- type ESIMoon
- type ESIPlanet
- type ESIPosition
- type ESIRegion
- type ESIStar
- type ESIStargate
- type ESIStargateDestination
- type ESIStation
- type ESISystem
- type ESISystemPlanets
- type ESIType
- type ESIVictim
- type FittingAttributes
- type KillmailData
- type Queue
- type ScrapeQueue
- type Store
- type TypeDogmaAttribute
- type TypeDogmaEffect
- type WSSKillmail
- type ZKBData
- type ZKBResponse
Constants ¶
View Source
const ( JobSeedDatabase = 13270 JobScrapeCharacter = 1 JobScrapeCorporation = 2 JobScrapeAlliance = 3 JobScrapeDaily = 4 )
List of all possible jobs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) AddIndexes ¶
func (*DB) DeleteStaticData ¶
func (*DB) GetData ¶
func (db *DB) GetData(filter interface{}) (results []KillmailData, err error)
func (*DB) GetKillmail ¶
func (db *DB) GetKillmail(id int) (mail KillmailData, err error)
func (*DB) GetKillsMissingAxiom ¶
func (db *DB) GetKillsMissingAxiom() (mails []KillmailData, err error)
func (*DB) GetKillsMissingZKB ¶
func (db *DB) GetKillsMissingZKB() (hashes []ScrapeQueue, err error)
func (*DB) GetSystems ¶
func (*DB) InsertAsteroidBelt ¶
func (db *DB) InsertAsteroidBelt(belt ESIAsteroidBelt) error
func (*DB) InsertCategory ¶
func (db *DB) InsertCategory(category ESICategory) error
func (*DB) InsertConstellation ¶
func (db *DB) InsertConstellation(cons ESIConstellation) error
func (*DB) InsertGroup ¶
func (*DB) InsertKillIDHash ¶
func (db *DB) InsertKillIDHash(idhash ScrapeQueue) error
func (*DB) InsertKillmail ¶
func (db *DB) InsertKillmail(kill KillmailData) error
func (*DB) InsertMoon ¶
func (*DB) InsertPlanet ¶
func (*DB) InsertQueueJob ¶
func (*DB) InsertRegion ¶
func (*DB) InsertStar ¶
func (*DB) InsertStargate ¶
func (db *DB) InsertStargate(gate ESIStargate) error
func (*DB) InsertStation ¶
func (db *DB) InsertStation(station ESIStation) error
func (*DB) InsertSystem ¶
func (*DB) InsertType ¶
func (*DB) ListAllExistingIDs ¶
func (*DB) ListAllExistingKillmails ¶
func (db *DB) ListAllExistingKillmails() (mails []KillmailData, err error)
func (*DB) ListDatabaseNames ¶
func (*DB) ListMissingKillmails ¶
func (db *DB) ListMissingKillmails() (mails []ScrapeQueue, err error)
func (*DB) MaintainJobReservation ¶
func (*DB) MarkJobComplete ¶
func (*DB) PopQueueJob ¶
func (*DB) UpdateKillmail ¶
func (*DB) UpdateManyHashes ¶
func (db *DB) UpdateManyHashes(hashes []ScrapeQueue) error
type ESIAsteroidBelt ¶
type ESIAsteroidBelt struct { BeltID int32 `json:"belt_id,omitempty" bson:"_id"` Name string `json:"name" bson:"name"` Position ESIPosition `json:"position" bson:"position"` SystemID int32 `json:"system_id" bson:"system_id"` }
type ESIAttacker ¶
type ESIAttacker struct { AllianceID int `json:"alliance_id,omitempty" bson:"alliance_id,omitempty"` CorporationID int `json:"corporation_id" bson:"corporation_id"` CharacterID int `json:"character_id" bson:"character_id"` DamageDone int `json:"damage_done" bson:"damage_done"` FinalBlow bool `json:"final_blow" bson:"final_blow"` SecurityStatus float32 `json:"security_status" bson:"security_status"` ShipTypeID int `json:"ship_type_id" bson:"ship_type_id"` WeaponTypeID int `json:"weapon_type_id" bson:"weapon_type_id"` }
type ESICategory ¶
type ESIConstellation ¶
type ESIConstellation struct { ConstellationID int `json:"constellation_id" bson:"_id"` Name string `json:"name" bson:"name"` Systems []int `json:"systems" bson:"systems"` Postion ESIPosition `json:"position" bson:"position"` RegionID int `json:"region_id" bson:"region_id"` }
type ESIItem ¶
type ESIItem struct { Flag int `json:"flag" bson:"flag"` ItemTypeID int `json:"item_type_id" bson:"item_type_id"` QuantityDropped int `json:"quantity_dropped,omitempty" bson:"quantity_dropped,omitempty"` QuantityDestroyed int `json:"quantity_destroyed,omitempty" bson:"quantity_destroyed,omitempty"` Singleton int `json:"singleton" bson:"singleton"` }
type ESIKillmail ¶
type ESIKillmail struct { Attackers []ESIAttacker `json:"attackers" bson:"attackers"` KillmailID int `json:"killmail_id" bson:"killmail_id"` KillmailTime time.Time `json:"killmail_time" bson:"killmail_time"` SolarSystemID int `json:"solar_system_id" bson:"solar_system_id"` Victim ESIVictim `json:"victim" bson:"victim"` }
type ESIMoon ¶
type ESIMoon struct { MoonID int32 `json:"moon_id" bson:"_id"` Name string `json:"name" bson:"name"` Position ESIPosition `json:"position" bson:"position"` SystemID int32 `json:"system_id" bson:"system_id"` }
type ESIPlanet ¶
type ESIPlanet struct { Name string `json:"name" bson:"name"` PlanetID int32 `json:"planet_id" bson:"_id"` Position ESIPosition `json:"position" bson:"position"` SystemID int32 `json:"system_id" bson:"system_id"` TypeID int32 `json:"type_id" bson:"type_id"` }
type ESIPosition ¶
type ESIStar ¶
type ESIStar struct { Age int64 `json:"age" bson:"age"` Luminosity float64 `json:"luminosity" bson:"luminosity"` Name string `json:"name" bson:"name"` Radius int64 `json:"radius" bson:"radius"` SolarSystemID int `json:"solar_system_id" bson:"solar_system_id"` SpectralClass string `json:"spectral_class" bson:"spectral_class"` Temperature int `json:"temperature" bson:"temperature"` TypeID int `json:"type_id" bson:"type_id"` StarID int `json:"star_id,omitempty" bson:"_id"` }
type ESIStargate ¶
type ESIStargate struct { Destination ESIStargateDestination `json:"destination" bson:"destination"` Name string `json:"name" bson:"name"` Position ESIPosition `json:"position" bson:"position"` StargateID int32 `json:"stargate_id" bson:"_id"` SystemID int32 `json:"system_id" bson:"system_id"` TypeID int32 `json:"type_id" bson:"type_id"` }
type ESIStargateDestination ¶
type ESIStation ¶
type ESIStation struct { MaxDockableShipVolume float64 `json:"max_dockable_ship_volume" bson:"max_dockable_ship_volume"` Name string `json:"name" bson:"name"` OfficeRentalCost float64 `json:"office_rental_cost" bson:"office_rental_cost"` Owner int32 `json:"owner" bson:"owner"` Position ESIPosition `json:"position" bson:"position"` RaceID int32 `json:"race_id" bson:"race_id"` ReprocessingEfficiency float32 `json:"reprocessing_efficiency" bson:"reprocessing_efficiency"` Services []string `json:"services" bson:"services"` StationID int32 `json:"station_id" bson:"_id"` SystemID int32 `json:"system_id" bson:"system_id"` TypeID int32 `json:"type_id" bson:"type_id"` }
type ESISystem ¶
type ESISystem struct { ConstellationID int `json:"constellation_id" bson:"constellation_id"` Name string `json:"name" bson:"name"` Planets []ESISystemPlanets `json:"planets" bson:"planets"` Position ESIPosition `json:"position" bson:"position"` SecurityClass string `json:"security_class" bson:"security_class"` SecurityStatus float64 `json:"security_status" bson:"security_status"` StarID int `json:"star_id" bson:"star_id"` Stargates []int `json:"stargates" bson:"stargates"` Stations []int `json:"stations" bson:"stations"` SystemID int `json:"system_id" bson:"_id"` }
type ESISystemPlanets ¶
type ESIType ¶
type ESIType struct { Capacity float64 `json:"capacity,omitempty" bson:"capacity,omitempty"` Description string `json:"description" bson:"description"` DogmaAttributes []TypeDogmaAttribute `json:"dogma_attributes,omitempty" bson:"dogma_attributes,omitempty"` DogmaEffects []TypeDogmaEffect `json:"dogma_effects,omitempty" bson:"dogma_effects,omitempty"` GraphicID int32 `json:"graphic_id,omitempty" bson:"graphic_id,omitempty"` GroupID int32 `json:"group_id" bson:"group_id"` IconID int32 `json:"icon_id,omitempty" bson:"icon_id,omitempty"` MarketGroupID int32 `json:"market_group_id,omitempty" bson:"market_group_id,omitempty"` Mass float64 `json:"mass,omitempty" bson:"mass,omitempty"` Name string `json:"name" bson:"name"` PackagedVolume float64 `json:"packaged_volume,omitempty" bson:"packaged_volume,omitempty"` PortionSize int32 `json:"portion_size,omitempty" bson:"portion_size,omitempty"` Published bool `json:"published" bson:"published"` Radius float64 `json:"radius,omitempty" bson:"radius,omitempty"` TypeID int32 `json:"type_id" bson:"_id"` Volume float64 `json:"volume,omitempty" bson:"volume,omitempty"` }
type ESIVictim ¶
type ESIVictim struct { AllianceID int `json:"alliance_id,omitempty" bson:"alliance_id,omitempty"` CorporationID int `json:"corporation_id" bson:"corporation_id"` CharacterID int `json:"character_id" bson:"character_id"` DamageTaken int `json:"damage_taken" bson:"damage_taken"` Items []ESIItem `json:"items" bson:"items"` Position ESIPosition `json:"position" bson:"position"` ShipTypeID int `json:"ship_type_id" bson:"ship_type_id"` }
type FittingAttributes ¶
type KillmailData ¶
type KillmailData struct { KillID int `json:"_id" bson:"_id"` KillData ESIKillmail `json:"killmail" bson:"killmail"` ZKBData ZKBData `json:"zkb,omitempty" bson:"zkb,omitempty"` AxiomAttribute FittingAttributes `json:"axiom,omitempty" bson:"axiom,omitempty"` }
type Queue ¶
type Queue struct { ID int `json:"id" bson:"id"` Args string `json:"args" bson:"args"` Attempts int `json:"attempts" bson:"attempts"` ReservedAt time.Time `json:"reserved_at" bson:"reservedAt"` AvailableAt time.Time `json:"available_at" bson:"availableAt"` CreatedAt time.Time `json:"created_at" bson:"createdAt"` Complete bool `json:"complete" bson:"complete"` }
type ScrapeQueue ¶
type Store ¶
type Store interface { // Insert new data InsertKillmail(kill KillmailData) error InsertKillIDHash(idhash ScrapeQueue) error // Get specific data GetKillmail(id int) (mail KillmailData, err error) //Update data UpdateKillmail(filter interface{}, update interface{}) error //RawFindRequest GetData(filter interface{}) (results []KillmailData, err error) // Queue management InsertQueueJob(job Queue) error PopQueueJob() (job Queue, err error) MaintainJobReservation(job Queue, time time.Time) error MarkJobComplete(job Queue) error // Killmail Maint ListAllExistingIDs() (ids []int, err error) ListAllExistingKillmails() (mails []KillmailData, err error) ListMissingKillmails() (mails []ScrapeQueue, err error) GetKillsMissingZKB() (hashes []ScrapeQueue, err error) GetKillsMissingAxiom() (mails []KillmailData, err error) UpdateManyHashes(hashes []ScrapeQueue) error // SetupTasks ListDatabaseNames() ([]string, error) SeedDB() error AddIndexes() error // StaticData DeleteStaticData() error InsertRegion(region ESIRegion) error InsertConstellation(cons ESIConstellation) error InsertSystem(system ESISystem) error InsertStar(star ESIStar) error InsertPlanet(planet ESIPlanet) error InsertMoon(moon ESIMoon) error InsertAsteroidBelt(belt ESIAsteroidBelt) error InsertStargate(gate ESIStargate) error InsertStation(station ESIStation) error InsertType(typeESI ESIType) error InsertGroup(group ESIGroup) error InsertCategory(category ESICategory) error GetSystems() (systems []ESISystem, err error) }
type TypeDogmaAttribute ¶
type TypeDogmaEffect ¶
type WSSKillmail ¶
type ZKBData ¶
type ZKBData struct { LocationID int `json:"locationID" bson:"location_id"` Hash string `json:"hash" bson:"hash"` FittedValue float64 `json:"fittedValue" bson:"fitted_value"` TotalValue float64 `json:"totalValue" bson:"total_value"` Points int `json:"points" bson:"points"` NPC bool `json:"npc" bson:"npc"` Solo bool `json:"solo" bson:"solo"` Awox bool `json:"awox" bson:"awox"` }
type ZKBResponse ¶
Click to show internal directories.
Click to hide internal directories.