models

package
v0.0.0-...-dbefbc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SQLTimeFormat = "2006-01-02 15:04:05"
)

Functions

func AddCRESTToken

func AddCRESTToken(characterID int32, tokenCharacterID int32, characterName string, tok *oauth2.Token, scopes, ownerHash string, corporationID, allianceID, factionID int32) error

AddCRESTToken adds an SSO token to the database or updates it if one exists. resetting status and if errors were mailed to the user.

func AddContactSync

func AddContactSync(characterID int32, source int, destination int) error

func AddDiscordService

func AddDiscordService(characterID, entityID int32, serverID string) error

func AddIntegrationChannel

func AddIntegrationChannel(integrationID int32, channelID, channelName string) error

func AddIntegrationToken

func AddIntegrationToken(tokenType string, characterID int32, userID string, userName string, tok *oauth2.Token, scopes string) error

AddIntegrationToken adds a oauth2 token to the database for integrations or updates it if one exists. resetting status and if errors were mailed to the user.

func AddLPOffer

func AddLPOffer(offerID int64, corporationID int64, typeID int64, quantity int64, lpCost int64, akCost, iskCost int64) error

func AddLPOfferRequirements

func AddLPOfferRequirements(offerID int64, typeID int64, quantity int64) error

func AddShare

func AddShare(characterID, tokenCharacterID, entityID int32, types string) error

func Begin

func Begin() (*sqlx.Tx, error)

func DeleteCRESTToken

func DeleteCRESTToken(characterID int32, tokenCharacterID int32) error

func DeleteContactSync

func DeleteContactSync(characterID int32, destination int) error

func DeleteIntegrationChannel

func DeleteIntegrationChannel(integrationID int32, channelID string) error

func DeleteIntegrationToken

func DeleteIntegrationToken(tokenType string, characterID int32, integrationUserID string) error

func DeleteService

func DeleteService(characterID, integrationID int32) error

func DeleteShare

func DeleteShare(characterID, tokenCharacterID, entityID int32) error

func DumpDatabase

func DumpDatabase(file string, db string) (err error)

func Escape

func Escape(value string) string

Escape MySQL string

func FormatValue

func FormatValue(v float64) string

func GetCelestialName

func GetCelestialName(id int64) (string, error)

func GetCharacterGroupsByScopesString

func GetCharacterGroupsByScopesString(scopes string) string

GetCharacterGroupsByScopesString takes a space seperated string of scopes and returns the groups

func GetCharacterIDByName

func GetCharacterIDByName(character string) (int32, error)

func GetCharacterScopeGroups

func GetCharacterScopeGroups() map[string]string

func GetCharacterScopes

func GetCharacterScopes() []string

func GetCharacterScopesByGroups

func GetCharacterScopesByGroups(groups []string) []string

func GetCharacterShareGroups

func GetCharacterShareGroups() map[string]string

func GetIntegrations

func GetIntegrations(characterID int32) ([]conservator.Service, error)

func GetItemAttributes

func GetItemAttributes(id int64) (*[]ItemAttributes, error)

func GetKnownKillmails

func GetKnownKillmails() ([]int64, error)

func GetServiceState

func GetServiceState(service string) (time.Time, int32, error)

GetServiceState Get service state (page number, cache expired, etc).

func GetShares

func GetShares(characterID int32) ([]conservator.Share, error)

func GetSystemName

func GetSystemName(id int64) (string, error)

func GetTypeName

func GetTypeName(id int64) (string, error)

func SearchByID

func SearchByID(id int64) string

SearchByID looks for entities by ID

func SetCursorCharacter

func SetCursorCharacter(characterID int32, cursorCharacterID int32) error

func SetDatabase

func SetDatabase(DB *sqlx.DB)

Set Database handle

func SetServiceState

func SetServiceState(state string, cacheUntil time.Time, page int32) error

SetServiceState sets state information: nextCheck, value (page, etc).

func SetServiceStateByDays

func SetServiceStateByDays(state string, daysToCache int32, page int32) error

SetServiceStateByDays sets state information: nextCheck, value (page, etc).

func SetupDatabase

func SetupDatabase(driver string, spec string) (*sqlx.DB, error)

func UpdateAlliance

func UpdateAlliance(allianceID int32, name string, memberCount int, shortName string, executorCorp int32,
	startDate time.Time, cacheUntil time.Time) error

UpdateAlliance Update an alliances information.

func UpdateChannel

func UpdateChannel(integrationID int32, channelID, options, services string) error

func UpdateCharacter

func UpdateCharacter(characterID int32, name string, bloodlineID int32, ancestryID int32, corporationID int32, allianceID int32,
	race int32, gender string, securityStatus float32, cacheUntil time.Time) error

func UpdateCorporation

func UpdateCorporation(corporationID int32, name string, ticker string, ceoID int32,
	allianceID int32, factionID int32, memberCount int32, cacheUntil time.Time) error

func UpdateService

func UpdateService(integrationID int32, options, services string) error

Types

type ActiveWarList

type ActiveWarList struct {
	WarID         int64       `db:"warID" json:"warID"`
	TimeStarted   time.Time   `db:"timeStarted" json:"timeStarted"`
	TimeFinished  time.Time   `db:"timeFinished" json:"timeFinished"`
	OpenForAllies bool        `db:"openForAllies" json:"openForAllies"`
	AggressorID   int64       `db:"aggressorID" json:"aggressorID"`
	AggressorType null.String `db:"aggressorType" json:"aggressorType"`
	AggressorName null.String `db:"aggressorName" json:"aggressorName"`
	DefenderID    int64       `db:"defenderID" json:"defenderID"`
	DefenderType  null.String `db:"defenderType" json:"defenderType"`
	DefenderName  null.String `db:"defenderName" json:"defenderName"`
	Mutual        bool        `db:"mutual" json:"mutual"`
	WarKills      int64       `db:"warKills" json:"warKills"`
	WarLosses     int64       `db:"warLosses" json:"warLosses"`
	Efficiency    float64     `db:"efficiency" json:"efficiency"`
	Kills         int64       `db:"kills" json:"kills"`
	Losses        int64       `db:"losses" json:"losses"`
}

func GetActiveWarList

func GetActiveWarList() ([]ActiveWarList, error)

func GetWarsForEntityByID

func GetWarsForEntityByID(id int64) ([]ActiveWarList, error)

type Alliance

type Alliance struct {
	AllianceID              int64     `db:"allianceID" json:"allianceID"`
	AllianceName            string    `db:"allianceName" json:"allianceName"`
	AllianceTicker          string    `db:"allianceTicker" json:"allianceTicker"`
	CorporationsCount       int64     `db:"corporationsCount" json:"corporationsCount"`
	StartDate               time.Time `db:"startDate" json:"startDate"`
	ExecutorCorporationID   int64     `db:"executorCorporationID" json:"executorCorporationID"`
	ExecutorCorporationName string    `db:"executorCorporationName" json:"executorCorporationName"`
	Efficiency              float64   `db:"efficiency" json:"efficiency"`
	CapKills                int64     `db:"capKills" json:"capKills"`
	Kills                   int64     `db:"kills" json:"kills"`
	Losses                  int64     `db:"losses" json:"losses"`
}

Alliance resultset

func GetAlliance

func GetAlliance(id int64) (*Alliance, error)

GetAlliance Obtain alliance information by ID.

type AllianceMember

type AllianceMember struct {
	ID              int64  `db:"corporationID" json:"id"`
	CorporationName string `db:"corporationName" json:"name"`
	MemberCount     int64  `db:"memberCount" json:"memberCount"`
	Type            string `db:"type" json:"type"`
}

func GetAllianceMembers

func GetAllianceMembers(id int64) ([]AllianceMember, error)

type ArbitrageCalculator

type ArbitrageCalculator struct {
	TypeID   int64  `db:"typeID" json:"typeID" `
	TypeName string `db:"typeName" json:"typeName" `
	Volume   int64  `db:"volume" json:"volume" `
	Buys     int64  `db:"buys" json:"buys" `
	Margin   string `db:"margin" json:"margin" `
}

func GetArbitrageCalculator

func GetArbitrageCalculator(stationID int64, minVolume int64, maxPrice int64, brokersFee float64, tax float64, method string) ([]ArbitrageCalculator, error)

type ArbitrageCalculatorStations

type ArbitrageCalculatorStations struct {
	StationName string `db:"stationName" json:"stationName" `
	StationID   string `db:"stationID" json:"stationID" `
}

func GetArbitrageCalculatorStations

func GetArbitrageCalculatorStations() ([]ArbitrageCalculatorStations, error)

type AssetCharacters

type AssetCharacters struct {
	CharacterID   int32      `db:"characterID" json:"characterID"`
	CharacterName string     `db:"characterName" json:"characterName"`
	Buy           null.Float `db:"buy" json:"buy,omitempty"`
	Sell          null.Float `db:"sell" json:"sell,omitempty"`
}

func GetAssetCharacters

func GetAssetCharacters(characterID int32, ownerHash string, marketable bool) ([]AssetCharacters, error)

type AssetLocations

type AssetLocations struct {
	LocationFlag    string     `db:"locationFlag" json:"locationFlag"`
	LocationID      int64      `db:"locationID" json:"locationID"`
	LocationName    string     `db:"locationName" json:"locationName,omitempty"`
	SolarSystemName string     `db:"solarSystemName" json:"solarSystemName,omitempty"`
	Buy             null.Float `db:"buy" json:"buy,omitempty"`
	Sell            null.Float `db:"sell" json:"sell,omitempty"`
}

func GetAssetLocations

func GetAssetLocations(characterID int32, ownerHash string, filterCharacterID int32, marketable bool) ([]AssetLocations, error)

type Assets

type Assets struct {
	CharacterID   int32      `db:"characterID" json:"characterID"`
	CharacterName string     `db:"characterName" json:"characterName"`
	LocationFlag  string     `db:"locationFlag" json:"locationFlag"`
	LocationID    int64      `db:"locationID" json:"locationID"`
	TypeID        int64      `db:"typeID" json:"typeID"`
	ItemID        int64      `db:"itemID" json:"itemID"`
	TypeName      string     `db:"typeName" json:"typeName"`
	Quantity      int64      `db:"quantity" json:"quantity"`
	SubCount      int64      `db:"subCount" json:"subCount"`
	Buy           null.Float `db:"buy" json:"buy,omitempty"`
	Sell          null.Float `db:"sell" json:"sell,omitempty"`
	SubItems      []Assets   `db:"subItems" json:"subItems,omitempty"`
}

func GetAssets

func GetAssets(characterID int32, ownerHash string, filterCharacterID int32, locationID int64) ([]Assets, error)

type AvailableIntegrations

type AvailableIntegrations struct {
	IntegrationID     int32     `db:"integrationID" json:"integrationID"`
	Address           string    `db:"address" json:"address"`
	Reason            string    `db:"reason" json:"reason"`
	Name              string    `db:"name" json:"name"`
	CharacterName     string    `db:"characterName" json:"characterName" `
	CharacterID       int32     `db:"characterID" json:"characterID"`
	TokenCharacterID  int32     `db:"tokenCharacterID" json:"tokenCharacterID"`
	IntegrationUserID string    `db:"integrationUserID" json:"integrationUserID"`
	Type              string    `db:"type" json:"type"`
	EntityID          int32     `db:"entityID" json:"entityID"`
	EntityName        string    `db:"entityName" json:"entityName"`
	EntityType        string    `db:"entityType" json:"entityType"`
	Expiry            time.Time `db:"expiry" json:"expiry,omitempty"`
	AccessToken       string    `db:"accessToken" json:"accessToken,omitempty"`
	RefreshToken      string    `db:"refreshToken" json:"refreshToken,omitempty"`
}

func GetAvailableIntegrations

func GetAvailableIntegrations(characterID int32) ([]AvailableIntegrations, error)

func GetIntegrationsForCharacter

func GetIntegrationsForCharacter(characterID, integrationID int32) (*AvailableIntegrations, error)

type CRESTToken

type CRESTToken struct {
	Expiry           time.Time           `db:"expiry" json:"expiry,omitempty"`
	CharacterID      int32               `db:"characterID" json:"characterID,omitempty"`
	CorporationID    int32               `db:"corporationID" json:"corporationID,omitempty"`
	AllianceID       int32               `db:"allianceID" json:"allianceID,omitempty"`
	TokenType        string              `db:"tokenType" json:"tokenType,omitempty"`
	TokenCharacterID int32               `db:"tokenCharacterID" json:"tokenCharacterID,omitempty"`
	CharacterName    string              `db:"characterName" json:"characterName,omitempty"`
	CorporationName  null.String         `db:"corporationName" json:"corporationName,omitempty"`
	AllianceName     null.String         `db:"allianceName" json:"allianceName,omitempty"`
	LastCode         int64               `db:"lastCode" json:"lastCode,omitempty"`
	LastStatus       null.String         `db:"lastStatus" json:"lastStatus,omitempty"`
	AccessToken      string              `db:"accessToken" json:"accessToken,omitempty"`
	RefreshToken     string              `db:"refreshToken" json:"refreshToken,omitempty"`
	Scopes           string              `db:"scopes" json:"scopes"`
	SharingInt       string              `db:"sharingint" json:"_,omitempty"`
	Sharing          []conservator.Share `json:"sharing"`
}

func GetCRESTToken

func GetCRESTToken(characterID int32, ownerHash string, tokenCharacterID int32) (*CRESTToken, error)

Obtain an authenticated client from a stored access/refresh token.

func GetCRESTTokens

func GetCRESTTokens(characterID int32, ownerHash string) ([]CRESTToken, error)

type Character

type Character struct {
	CharacterID     int32       `db:"characterID" json:"characterID"`
	CharacterName   string      `db:"characterName" json:"characterName"`
	CorporationID   int32       `db:"corporationID" json:"corporationID"`
	CorporationName string      `db:"corporationName" json:"corporationName"`
	AllianceID      int32       `db:"allianceID" json:"allianceID"`
	AllianceName    null.String `db:"allianceName" json:"allianceName"`
	Race            string      `db:"race" json:"race"`
	SecurityStatus  float64     `db:"securityStatus" json:"securityStatus"`
	Efficiency      float64     `db:"efficiency" json:"efficiency"`
	CapKills        int64       `db:"capKills" json:"capKills"`
	Kills           int64       `db:"kills" json:"kills"`
	Losses          int64       `db:"losses" json:"losses"`
}

func GetCharacter

func GetCharacter(id int32) (*Character, error)

type ConstellationActivity

type ConstellationActivity struct {
	Number            int64  `db:"number" json:"number"`
	SolarSystemIDs    string `db:"solarSystemIDs" json:"solarSystemIDs"`
	SolarSystemNames  string `db:"solarSystemNames" json:"solarSystemNames"`
	ConstellationID   int64  `db:"constellationID" json:"constellationID"`
	ConstellationName string `db:"constellationName" json:"constellationName"`
	RegionID          int64  `db:"regionID" json:"regionID"`
	RegionName        string `db:"regionName" json:"regionName"`
}

[TODO] Break out the CSV into an array

func GetConstellationActivity

func GetConstellationActivity(id int64, entityType string) ([]ConstellationActivity, error)

type ContactSync

type ContactSync struct {
	Source          int32       `db:"source" json:"source"`
	SourceName      null.String `db:"sourceName" json:"sourceName"`
	Destination     int32       `db:"destination" json:"destination"`
	DestinationName null.String `db:"destinationName" json:"destinationName"`
	CharacterID     int32       `db:"characterID" json:"characterID"`
	LastError       null.String `db:"lastError" json:"lastError"`
	NextSync        time.Time   `db:"nextSync" json:"nextSync"`
}

func GetContactSyncs

func GetContactSyncs(characterID int32) ([]ContactSync, error)

func (*ContactSync) Error

func (c *ContactSync) Error(e string) error

func (*ContactSync) Updated

func (c *ContactSync) Updated(nextSync time.Time) error

type Corporation

type Corporation struct {
	CorporationID   int64       `db:"corporationID" json:"corporationID"`
	CorporationName string      `db:"corporationName" json:"corporationName"`
	AllianceID      int64       `db:"allianceID" json:"allianceID"`
	AllianceName    null.String `db:"allianceName" json:"allianceName"`
	CEOID           int64       `db:"ceoID" json:"ceoID"`
	CEOName         string      `db:"ceoName" json:"ceoName"`
	MemberCount     int64       `db:"memberCount" json:"memberCount"`
	Efficiency      float64     `db:"efficiency" json:"efficiency"`
	CapKills        int64       `db:"capKills" json:"capKills"`
	Kills           int64       `db:"kills" json:"kills"`
	Losses          int64       `db:"losses" json:"losses"`
}

func GetCorporation

func GetCorporation(id int64) (*Corporation, error)

type CursorCharacter

type CursorCharacter struct {
	CursorCharacterID   int32  `db:"cursorCharacterID" json:"cursorCharacterID"`
	CursorCharacterName string `db:"cursorCharacterName" json:"cursorCharacterName"`
}

func GetCursorCharacter

func GetCursorCharacter(characterID int32) (CursorCharacter, error)

type Entity

type Entity struct {
	EntityID   int32  `db:"entityID" json:"entityID"`
	EntityName string `db:"entityName" json:"entityName"`
	EntityType string `db:"entityType" json:"entityType"`
}

func GetEntitiesWithRole

func GetEntitiesWithRole(characterID int32, role string) ([]Entity, error)

type EntityName

type EntityName struct {
	Name       string `db:"name" json:"name"`
	EntityType string `db:"type" json:"type"`
}

func GetEntityName

func GetEntityName(id int64) (*EntityName, error)

type ExpiredContactSync

type ExpiredContactSync struct {
	Source       int32  `db:"source" json:"source"`
	Destinations string `db:"destinations" json:"destinations"`
	CharacterID  int32  `db:"characterID" json:"characterID"`
}

type FactionWarEntities

type FactionWarEntities struct {
	ID   int64  `db:"id" json:"id"`
	Name string `db:"name" json:"name"`
	Type string `db:"type" json:"type"`
}

type IntegrationDetails

type IntegrationDetails struct {
	conservator.Service
	Channels []conservator.Channel
	Shares   []conservator.Share
}

func GetIntegrationDetails

func GetIntegrationDetails(characterID, serverID int32) (IntegrationDetails, error)

type IntegrationToken

type IntegrationToken struct {
	Type                string      `db:"type" json:"type,omitempty"`
	Expiry              time.Time   `db:"expiry" json:"expiry,omitempty"`
	CharacterID         int32       `db:"characterID" json:"characterID,omitempty"`
	IntegrationUserID   string      `db:"integrationUserID" json:"integrationUserID,omitempty"`
	IntegrationUserName string      `db:"integrationUserName" json:"integrationUserName,omitempty"`
	TokenType           string      `db:"tokenType" json:"tokenType,omitempty"`
	LastCode            int64       `db:"lastCode" json:"lastCode,omitempty"`
	LastStatus          null.String `db:"lastStatus" json:"lastStatus,omitempty"`
	AccessToken         string      `db:"accessToken" json:"accessToken,omitempty"`
	RefreshToken        string      `db:"refreshToken" json:"refreshToken,omitempty"`
	Scopes              string      `db:"scopes" json:"scopes"`
}

func GetIntegrationTokens

func GetIntegrationTokens(characterID int32) ([]IntegrationToken, error)

type IskPerLP

type IskPerLP struct {
	ItemName      string      `db:"itemName" json:"itemName"`
	TypeID        int64       `db:"typeID" json:"typeID"`
	TypeName      string      `db:"typeName" json:"typeName"`
	JitaPrice     float64     `db:"JitaPrice" json:"jitaPrice"`
	ItemCost      float64     `db:"itemCost" json:"itemCost"`
	IskPerLP      int64       `db:"iskPerLP" json:"iskPerLP"`
	JitaVolume    int64       `db:"JitaVolume" json:"jitaVolume"`
	IskVolume     float64     `db:"iskVolume" json:"iskVolume"`
	Requirements  null.String `db:"requirements" json:"requirements"`
	AvailableFrom string      `db:"availableFrom" json:"availableFrom"`
}

func GetISKPerLP

func GetISKPerLP(corporationName string) ([]IskPerLP, error)

func GetISKPerLPByConversion

func GetISKPerLPByConversion() ([]IskPerLP, error)

type IskPerLPCorporation

type IskPerLPCorporation struct {
	ItemName string `db:"itemName" json:"itemName" `
}

func GetISKPerLPCorporations

func GetISKPerLPCorporations() ([]IskPerLPCorporation, error)

type ItemAttributes

type ItemAttributes struct {
	AttributeID         int64       `db:"attributeID" json:"attributeID"`
	Value               float64     `db:"value" json:"value"`
	AttributeName       string      `db:"attributeName" json:"attributeName"`
	Description         null.String `db:"description" json:"description"`
	CategoryID          int64       `db:"categoryID" json:"categoryID"`
	CategoryName        null.String `db:"categoryName" json:"categoryName"`
	CategoryDescription null.String `db:"categoryDescription" json:"categoryDescription"`
}

type ItemType

type ItemType struct {
	TypeID      int64   `db:"typeID" json:"typeID"`
	TypeName    string  `db:"typeName" json:"typeName"`
	Description string  `db:"description" json:"description"`
	Mass        float64 `db:"mass" json:"mass"`
	Volume      float64 `db:"volume" json:"volume"`
	Capacity    int64   `db:"capacity" json:"capacity"`
	PortionSize int64   `db:"portionSize" json:"portionSize"`
	RaceID      int64   `db:"raceID" json:"raceID"`
	RaceName    string  `db:"raceName" json:"raceName"`
	BasePrice   float64 `db:"basePrice" json:"basePrice"`
	IconID      int64   `db:"iconID" json:"iconID"`
	SoundID     int64   `db:"soundID" json:"soundID"`
	GraphicID   int64   `db:"graphicID" json:"graphicID"`
}

func GetItem

func GetItem(id int64) (*ItemType, error)

type JournalEntry

type JournalEntry struct {
	RefID         int64       `db:"refID" json:"refID"`
	RefTypeID     int64       `db:"refTypeID" json:"refTypeID"`
	OwnerID1      int64       `db:"ownerID1" json:"ownerID1"`
	OwnerName1    null.String `db:"ownerName1" json:"ownerName1"`
	OwnerID2      int64       `db:"ownerID2" json:"ownerID2"`
	OwnerName2    null.String `db:"ownerName2" json:"ownerName2"`
	ArgID1        int64       `db:"argID1" json:"argID1"`
	ArgName1      string      `db:"argName1" json:"argName1"`
	Amount        float64     `db:"amount" json:"amount"`
	Reason        string      `db:"reason" json:"reason"`
	TaxAmount     float64     `db:"taxAmount" json:"taxAmount"`
	Date          time.Time   `db:"date" json:"date"`
	CharacterID   int64       `db:"characterID" json:"characterID"`
	CharacterName string      `db:"characterName" json:"characterName"`
}

type KillmailHeatMap

type KillmailHeatMap struct {
	Day   int64 `db:"day" json:"day"`
	Hour  int64 `db:"hour" json:"hour"`
	Value int64 `db:"value" json:"value"`
}

[TODO] Break out the CSV into an array

func GetKillmailHeatMap

func GetKillmailHeatMap(id int64, entityType string) ([]KillmailHeatMap, error)

type KillmailList

type KillmailList struct {
	ID            int32     `db:"id" json:"id"`
	SolarSystemID int32     `db:"solarSystemID" json:"solarSystemID"`
	ShipType      int32     `db:"shipType" json:"shipType"`
	WarID         int32     `db:"warID" json:"warID"`
	IsLoss        int32     `db:"isLoss" json:"isLoss"`
	Killtime      time.Time `db:"killtime" json:"killtime"`
}

KillmailList is brief list of killmails

func GetKillmailsForEntity

func GetKillmailsForEntity(id int64, entityType string) ([]KillmailList, error)

GetKillmailsForEntity fetches all the killmails for an entity

type KnownAllies

type KnownAllies struct {
	Number int64  `db:"number" json:"number"`
	AllyID int64  `db:"allyID" json:"id"`
	Name   string `db:"name" json:"name"`
	Type   string `db:"type" json:"type"`
}

func GetKnownAlliesByID

func GetKnownAlliesByID(id int64) ([]KnownAllies, error)

type KnownShipTypes

type KnownShipTypes struct {
	Number   int64  `db:"number" json:"number"`
	ShipType int64  `db:"shipType" json:"shipType"`
	ShipName string `db:"shipName" json:"shipName"`
}

func GetKnownShipTypes

func GetKnownShipTypes(id int64, entityType string) ([]KnownShipTypes, error)

type LocalIntelData

type LocalIntelData struct {
	Number         int64   `db:"number" json:"number"`
	ID             int64   `db:"id" json:"id"`
	EntityName     string  `db:"entityName" json:"entityName"`
	FactionName    string  `db:"factionName" json:"factionName"`
	Type           string  `db:"type" json:"type"`
	MemberCount    int64   `db:"memberCount" json:"memberCount"`
	WarAggressor   int64   `db:"warAggressor" json:"warAggressor"`
	WarDefender    int64   `db:"warDefender" json:"warDefender"`
	Kills          int64   `db:"kills" json:"kills"`
	Losses         int64   `db:"losses" json:"losses"`
	CapKills       int64   `db:"capKills" json:"capKills"`
	Efficiency     float64 `db:"efficiency" json:"efficiency"`
	CapProbability float64 `db:"capProbability" json:"capProbability"`
}

func GetLocalIntel

func GetLocalIntel(names []interface{}) ([]LocalIntelData, error)

FALSE Positive AST, concatenation is for replace tokens, actual values are fed through vargs.

type LocatorResults

type LocatorResults struct {
	SystemID          int64       `db:"systemID" json:"systemID,omitempty"`
	SystemName        string      `db:"systemName" json:"systemName,omitempty"`
	RegionID          int64       `db:"regionID" json:"regionID,omitempty"`
	RegionName        string      `db:"regionName" json:"regionName,omitempty"`
	ConstellationID   int64       `db:"constellationID" json:"constellationID,omitempty"`
	ConstellationName string      `db:"constellationName" json:"constellationName,omitempty"`
	CharacterID       int32       `db:"characterID" json:"characterID,omitempty"`
	CharacterName     string      `db:"characterName" json:"characterName,omitempty"`
	CorporationID     int32       `db:"corporationID" json:"corporationID,omitempty"`
	CorporationName   string      `db:"corporationName" json:"corporationName,omitempty"`
	AllianceID        int32       `db:"allianceID" json:"allianceID,omitempty"`
	AllianceName      null.String `db:"allianceName" json:"allianceName,omitempty"`
	Time              time.Time   `db:"time" json:"time"`
}

func GetLocatorResponses

func GetLocatorResponses(characterID int32) ([]LocatorResults, error)

type MarketHistory

type MarketHistory struct {
	Date     time.Time `db:"date" json:"date"`
	Low      float64   `db:"low" json:"low"`
	High     float64   `db:"high" json:"high"`
	Open     float64   `db:"open" json:"open"`
	Close    float64   `db:"close" json:"close"`
	Quantity int64     `db:"quantity" json:"quantity"`
}

func GetMarketHistory

func GetMarketHistory(itemID int64, regionID int32) ([]MarketHistory, error)

type MarketItemList

type MarketItemList struct {
	TypeID     int64  `db:"typeID"`
	TypeName   string `db:"typeName"`
	Categories string `db:"Categories"`
	Count      int64
}

func SearchMarketNames

func SearchMarketNames(query string) ([]MarketItemList, error)

type MarketItems

type MarketItems struct {
	StationName string `db:"stationName" json:"stationName"`
	StationID   string `db:"stationID"   json:"stationID"   `
	Quantity    string `db:"quantity"    json:"quantity"   `
	Price       string `db:"price"       json:"price"      `
}

func MarketRegionItems

func MarketRegionItems(regionID int, itemID int, secFlags int, buy bool) ([]MarketItems, error)

type MarketOrderCharacters

type MarketOrderCharacters struct {
	CharacterID   int32  `db:"characterID" json:"characterID"`
	CharacterName string `db:"characterName" json:"characterName"`
}

func GetOrderCharacters

func GetOrderCharacters(characterID int32, ownerHash string) ([]MarketOrderCharacters, error)

type MarketOrders

type MarketOrders struct {
	TypeID        int64           `db:"typeID" json:"typeID"`
	TypeName      string          `db:"typeName" json:"typeName"`
	CharacterID   int64           `db:"characterID" json:"characterID"`
	CharacterName string          `db:"characterName" json:"characterName"`
	StationName   string          `db:"stationName" json:"stationName"`
	StationID     int64           `db:"stationID" json:"stationID"`
	OrderID       int64           `db:"orderID" json:"orderID"`
	RegionName    string          `db:"regionName" json:"regionName"`
	LocationID    int64           `db:"locationID" json:"locationID"`
	IsBuyOrder    int64           `db:"isBuyOrder" json:"isBuyOrder"`
	VolumeRemain  int64           `db:"volumeRemain" json:"volumeRemain"`
	VolumeTotal   int64           `db:"volumeTotal" json:"volumeTotal"`
	Price         sql.NullFloat64 `db:"price" json:"price"`
	CurrentPrice  sql.NullFloat64 `db:"currentPrice" json:"currentPrice"`
	RegionPrice   sql.NullFloat64 `db:"regionPrice" json:"regionPrice"`
	NumOrders     int64           `db:"numOrders" json:"numOrders"`
}

func GetOrders

func GetOrders(characterID int32, ownerHash string, filterCharacterID int32) ([]MarketOrders, error)

GetOrders for a character

type MarketRegion

type MarketRegion struct {
	RegionID   int32  `db:"regionID" json:"regionID"`
	RegionName string `db:"regionName" json:"regionName"`
	Orders     int64  `db:"orders" json:"orders"`
}

func GetMarketRegions

func GetMarketRegions() ([]MarketRegion, error)

Anywhere can now have a public market.

type MarketStationStockerItems

type MarketStationStockerItems struct {
	TypeID            string  `db:"typeID" json:"typeID"`
	TypeName          string  `db:"typeName" json:"typeName"`
	DestinationTraded int64   `db:"destinationTraded" json:"destinationTraded"`
	DestinationVolume float64 `db:"destinationVolume" json:"destinationVolume"`
	MarketPrice       float64 `db:"marketPrice" json:"marketPrice"`
	DestinationPrice  float64 `db:"destinationPrice" json:"destinationPrice"`
	RegionPrice       float64 `db:"regionPrice" json:"regionPrice"`
	RegionOrders      int64   `db:"regionOrders" json:"regionOrders"`
	Selling           int64   `db:"selling" json:"selling"`
}

func MarketStationStocker

func MarketStationStocker(characterID int32, marketRegion int64, destinationRegion int64, markup float64) ([]MarketStationStockerItems, error)

MarketStationStocker Looks for good deals on items to sell in other regions

type MarketType

type MarketType struct {
	TypeID   int32  `db:"typeID"`
	TypeName string `db:"typeName"`
}

func GetMarketTypes

func GetMarketTypes() ([]MarketType, error)

type MarketUnderValuedItems

type MarketUnderValuedItems struct {
	TypeID            string  `db:"typeID" json:"typeID"`
	TypeName          string  `db:"typeName" json:"typeName"`
	DestinationVolume float64 `db:"destinationVolume" json:"destinationVolume"`
	MarketPrice       float64 `db:"marketPrice" json:"marketPrice"`
	DestinationPrice  float64 `db:"destinationPrice" json:"destinationPrice"`
	RegionPrice       float64 `db:"regionPrice" json:"regionPrice"`
	RegionOrders      int64   `db:"regionOrders" json:"regionOrders"`
}

func MarketUnderValued

func MarketUnderValued(marketRegion int64, sourceRegion int64, destinationRegion int64, discount float64) ([]MarketUnderValuedItems, error)

MarketUnderValued looks for items below destination or market price

type MarketableAssets

type MarketableAssets struct {
	TypeID        int64      `db:"typeID" json:"typeID"`
	TypeName      string     `db:"typeName" json:"typeName"`
	Quantity      int64      `db:"quantity" json:"quantity"`
	Buy           null.Float `db:"buy" json:"buy,omitempty"`
	Sell          null.Float `db:"sell" json:"sell,omitempty"`
	StationPrice  null.Float `db:"stationPrice" json:"stationPrice,omitempty"`
	StationOrders null.Float `db:"stationOrders" json:"stationOrders,omitempty"`
	RegionPrice   null.Float `db:"regionPrice" json:"regionPrice,omitempty"`
	RegionOrders  null.Float `db:"regionOrders" json:"regionOrders,omitempty"`
}

func GetMarketableAssets

func GetMarketableAssets(characterID int32, ownerHash string, tokenCharacterID int32, locationID int64) ([]MarketableAssets, error)

type NamesItemList

type NamesItemList struct {
	ID   int64  `db:"id" json:"id"`
	Dead int64  `db:"dead" json:"dead"`
	Name string `db:"name" json:"name"`
	Type string `db:"type" json:"type"`
}

func SearchEntities

func SearchEntities(query string) ([]NamesItemList, error)

func SearchNames

func SearchNames(query string) ([]NamesItemList, error)

type NullSystems

type NullSystems struct {
	SolarSystemID   int32  `db:"solarSystemID" json:"solarSystemID"`
	SolarSystemName string `db:"solarSystemName" json:"solarSystemName"`
	RegionName      string `db:"regionName" json:"regionName"`
}

func GetNullSystems

func GetNullSystems() ([]NullSystems, error)

type ScopeGroup

type ScopeGroup struct {
	Scope string
	Group string
}

type SystemCelestials

type SystemCelestials struct {
	Type           string  `db:"type" json:"type"`
	Name           string  `db:"name" json:"name"`
	DNA            string  `db:"DNA" json:"DNA"`
	X              float64 `db:"x" json:"x"`
	Y              float64 `db:"y" json:"y"`
	Z              float64 `db:"z" json:"z"`
	SX             float64 `db:"sx" json:"sx,omitempty"`
	SY             float64 `db:"sy" json:"sy,omitempty"`
	SZ             float64 `db:"sz" json:"sz,omitempty"`
	DX             float64 `db:"dx" json:"dx,omitempty"`
	DY             float64 `db:"dy" json:"dy,omitempty"`
	DZ             float64 `db:"dz" json:"dz,omitempty"`
	Radius         float64 `db:"radius" json:"radius,omitempty"`
	CelestialIndex int64   `db:"celestialIndex" json:"celestialIndex,omitempty"`
	OrbitIndex     int64   `db:"orbitIndex" json:"orbitIndex,omitempty"`
}

func GetSystemCelestials

func GetSystemCelestials(systemID int32) ([]SystemCelestials, error)

type SystemVertex

type SystemVertex struct {
	FromSolarSystemID int    `db:"fromSolarSystemID"`
	Connections       string `db:"connections"`
}

func GetSystemVertices

func GetSystemVertices() ([]SystemVertex, error)

type WalletSummary

type WalletSummary struct {
	RefTypeID      int64          `db:"refTypeID" json:"refTypeID"`
	RefTypeName    string         `db:"refTypeName" json:"refTypeName"`
	Balance        float64        `db:"balance" json:"balance"`
	JournalEntries []JournalEntry `db:"journalEntries" json:"journalEntries,omitempty"`
}

func GetWalletSummary

func GetWalletSummary(characterID int32, rangeI int64) ([]WalletSummary, error)

type WarEntity

type WarEntity struct {
	ID   int64
	Type string
}

Entity denormalizes corporations, alliance, and characters

func GetActiveWarsByID

func GetActiveWarsByID(id int64) ([]WarEntity, error)

func GetFinishedWarsByID

func GetFinishedWarsByID(id int64) ([]WarEntity, error)

func GetPendingWarsByID

func GetPendingWarsByID(id int64) ([]WarEntity, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL