Documentation ¶
Overview ¶
Package models provides the models being used by the application to store required information.
Index ¶
- type ByKillID
- type CRESTClient
- func (c *CRESTClient) CheckServerVersion(version string)
- func (c *CRESTClient) FetchConstellation(url string) (*CRESTConstellation, error)
- func (c *CRESTClient) FetchEndpoint(url string) ([]byte, error)
- func (c *CRESTClient) FetchItemType(typeID int64) (*CRESTItemType, error)
- func (c *CRESTClient) FetchLocationInfo(systemID int64) (*CRESTLocationInfo, error)
- func (c *CRESTClient) FetchRegion(url string) (*CRESTRegion, error)
- func (c *CRESTClient) FetchRoot() (*CRESTRoot, error)
- func (c *CRESTClient) FetchSolarSystem(systemID int64) (*CRESTSolarSystem, error)
- type CRESTConstellation
- type CRESTHref
- type CRESTItemType
- type CRESTLocationInfo
- type CRESTRegion
- type CRESTRoot
- type CRESTSolarSystem
- type Corporation
- type SlackAttachment
- type SlackField
- type SlackPayload
- type ZKillboardAttacker
- type ZKillboardEntry
- type ZKillboardItem
- type ZKillboardMiscellaneous
- type ZKillboardVictim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByKillID ¶
type ByKillID []ZKillboardEntry
ByKillID represents an array of kills or losses, used for sorting by kill ID
type CRESTClient ¶
type CRESTClient struct {
// contains filtered or unexported fields
}
CRESTClient is used for retrieving data from the EVE CREST and caching it locally
func NewCRESTClient ¶
func NewCRESTClient(root string) *CRESTClient
NewCRESTClient creates a new CRESTClient with the given root URL
func (*CRESTClient) CheckServerVersion ¶
func (c *CRESTClient) CheckServerVersion(version string)
CheckServerVersion compares the stored and provided server version, invalidating cached data if a change has been detected
func (*CRESTClient) FetchConstellation ¶
func (c *CRESTClient) FetchConstellation(url string) (*CRESTConstellation, error)
FetchConstellation retrieves the constellation information for the given ID
func (*CRESTClient) FetchEndpoint ¶
func (c *CRESTClient) FetchEndpoint(url string) ([]byte, error)
FetchEndpoint retrieves the given CREST endpoint and returns the read data
func (*CRESTClient) FetchItemType ¶
func (c *CRESTClient) FetchItemType(typeID int64) (*CRESTItemType, error)
FetchItemType retrieves the item type information for the given ID
func (*CRESTClient) FetchLocationInfo ¶
func (c *CRESTClient) FetchLocationInfo(systemID int64) (*CRESTLocationInfo, error)
FetchLocationInfo retrieves all available location info for the given solar system ID
func (*CRESTClient) FetchRegion ¶
func (c *CRESTClient) FetchRegion(url string) (*CRESTRegion, error)
FetchRegion retrieves the region information for the given ID
func (*CRESTClient) FetchRoot ¶
func (c *CRESTClient) FetchRoot() (*CRESTRoot, error)
FetchRoot retrieves the root CREST endpoint
func (*CRESTClient) FetchSolarSystem ¶
func (c *CRESTClient) FetchSolarSystem(systemID int64) (*CRESTSolarSystem, error)
FetchSolarSystem retrieves the solar system information for the given ID
type CRESTConstellation ¶
type CRESTConstellation struct { Name string `json:"name"` Region CRESTHref `json:"region"` Systems []CRESTHref `json:"systems"` }
CRESTConstellation represents information about a constellation as provided by the EVE CREST
type CRESTHref ¶
type CRESTHref struct {
Href string `json:"href"`
}
CRESTHref represents a link resource as provided by the EVE CREST
type CRESTItemType ¶
CRESTItemType represents information about an item type as provided by the EVE CREST
type CRESTLocationInfo ¶
type CRESTLocationInfo struct { SolarSystemID string SolarSystemName string SolarSystemSecurity float64 ConstellationID string ConstellationName string RegionID string RegionName string }
CRESTLocationInfo stores information about a solarsystem, constellation and region
type CRESTRegion ¶
type CRESTRegion struct { Name string `json:"name"` Constellations []CRESTHref `json:"constellations"` }
CRESTRegion represents information about a region as provided by the EVE CREST
type CRESTRoot ¶
type CRESTRoot struct { Endpoint CRESTHref `json:"crestEndpoint"` ItemTypes CRESTHref `json:"itemTypes"` ServerVersion string `json:"serverVersion"` ServerName string `json:"serverName"` }
CRESTRoot represents the root resource retrieved from the EVE CREST
type CRESTSolarSystem ¶
type CRESTSolarSystem struct { Name string `json:"name"` SecurityStatus float64 `json:"securityStatus"` Constellation CRESTHref `json:"constellation"` }
CRESTSolarSystem represents information about a solar system as provided by the EVE CREST
type Corporation ¶
type Corporation struct { ID int64 EVECorporationID int64 LastKillID int64 LastLossID int64 Name string KillComment string LossComment string IgnoredSolarSystems []int64 }
Corporation represents an EVE corporation to be tracked by the application
type SlackAttachment ¶
type SlackAttachment struct { Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` Fallback string `json:"fallback,omitempty"` Color string `json:"color,omitempty"` Fields []SlackField `json:"fields,omitempty"` }
SlackAttachment represents a single attachment as sent as a Slack payload
type SlackField ¶
type SlackField struct { Title string `json:"title,omitempty"` Value string `json:"value,omitempty"` Short bool `json:"short"` }
SlackField represents a single field used within Slack attachments for formatting
type SlackPayload ¶
type SlackPayload struct {
Attachments []SlackAttachment `json:"attachments"`
}
SlackPayload represents the payload to be sent to the Slack web hook
type ZKillboardAttacker ¶
type ZKillboardAttacker struct { CharacterID int64 `json:"characterID"` CharacterName string `json:"characterName"` CorporationID int64 `json:"corporationID"` CorporationName string `json:"corporationName"` AllianceID int64 `json:"allianceID"` AllianceName string `json:"allianceName"` FactionID int64 `json:"factionID"` FactionName string `json:"factionName"` ShipTypeID int64 `json:"shipTypeID"` WeaponTypeID int64 `json:"weaponTypeID"` DamageDone int64 `json:"damageDone"` FinalBlow int64 `json:"finalBlow"` SecurityStatus float64 `json:"securityStatus"` }
ZKillboardAttacker represents an attacker of a kill as received via the zKillboard API
type ZKillboardEntry ¶
type ZKillboardEntry struct { KillID int64 `json:"killID"` SolarSystemID int64 `json:"solarSystemID"` MoonID int64 `json:"moonID"` KillTime string `json:"killTime"` Victim ZKillboardVictim `json:"victim"` Attackers []ZKillboardAttacker `json:"attackers"` Items []ZKillboardItem `json:"items"` Misc ZKillboardMiscellaneous `json:"zkb"` }
ZKillboardEntry represents a kill or loss entry received via the zKillboard API
type ZKillboardItem ¶
type ZKillboardItem struct { TypeID int64 `json:"typeID"` Flag int64 `json:"flag"` QuantityDropped int64 `json:"qntDropped"` QuantityDestroyed int64 `json:"qntDestroyed"` Singleton int64 `json:"singleton"` }
ZKillboardItem represents an item of a kill as received via the zKillboard API
type ZKillboardMiscellaneous ¶
type ZKillboardMiscellaneous struct { Hash string `json:"hash"` TotalValue float64 `json:"totalValue"` Points int64 `json:"points"` }
ZKillboardMiscellaneous represents miscellaneous information about a kill as received via the zKillboard API
type ZKillboardVictim ¶
type ZKillboardVictim struct { CharacterID int64 `json:"characterID"` CharacterName string `json:"characterName"` CorporationID int64 `json:"corporationID"` CorporationName string `json:"corporationName"` AllianceID int64 `json:"allianceID"` AllianceName string `json:"allianceName"` FactionID int64 `json:"factionID"` FactionName string `json:"factionName"` ShipTypeID int64 `json:"shipTypeID"` DamageTaken int64 `json:"damageTaken"` }
ZKillboardVictim represents the victim of a kill as received via the zKillboard API