evedb

package
v0.0.0-...-c83d288 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 4 Imported by: 11

Documentation

Overview

Package evedb manages interaction with the EVE Static Dump.

This package is intended to abstract access to the various different tables and assets provided in the EVE Static Dump.

Index

Constants

This section is empty.

Variables

View Source
var InterestingItemCategories = []int{
	2, 4, 5, 6, 7, 8, 16, 17, 18,
	20, 22, 23, 24, 25, 30, 32, 34, 35, 39,
	40, 41, 42, 43, 46, 63, 65, 66, 87}

InterestingItemCategories contains a list of category IDs generally considered interesting.

It doesn't contain the Blueprints category ID.

View Source
var InterestingItemCategoriesAndBlueprints = []int{
	2, 4, 5, 6, 7, 8, 9, 16, 17, 18,
	20, 22, 23, 24, 25, 30, 32, 34, 35, 39,
	40, 41, 42, 43, 46, 63, 65, 66, 87}

InterestingItemCategoriesAndBlueprints contains a list of all published category IDs.

Functions

This section is empty.

Types

type Ancestry

type Ancestry struct {
	ID               int    `json:"id"`
	Name             string `json:"name"`
	Description      string `json:"description"`
	BloodlineID      int    `json:"bloodline_id"`
	Perception       int    `json:"perception"`
	Willpower        int    `json:"willpower"`
	Charisma         int    `json:"charisma"`
	Memory           int    `json:"memory"`
	Intelligence     int    `json:"intelligence"`
	ShortDescription string `json:"short_description"`

	Icon
}

type Bloodline

type Bloodline struct {
	ID                     int    `json:"id"`
	Name                   string `json:"name"`
	RaceID                 int    `json:"race_id"`
	Description            string `json:"description"`
	MaleDescription        string `json:"male_description"`
	FemaleDescription      string `json:"female_description"`
	ShipTypeID             int    `json:"ship_type_id"`
	CorporationID          int    `json:"corporation_id"`
	Perception             int    `json:"perception"`
	Willpower              int    `json:"willpower"`
	Charisma               int    `json:"charisma"`
	Memory                 int    `json:"memory"`
	Intelligence           int    `json:"intelligence"`
	ShortDescription       string `json:"short_description"`
	ShortMaleDescription   string `json:"short_male_description"`
	ShortFemaleDescription string `json:"short_female_description"`

	Icon
}

type Constellation

type Constellation struct {
	ConstellationID int    `json:"constellation_id"`
	Name            string `json:"name"`
	RegionID        int    `json:"region_id"`
}

type EveDB

type EveDB struct {
	// contains filtered or unexported fields
}

EveDB is the central service for accessing all EVE Static Dump data.

func New

func New(p *db.ConnPool) *EveDB

New creates a new EveDB using the given connection pool.

func (*EveDB) GetAllRegions

func (e *EveDB) GetAllRegions() ([]*Region, error)

func (*EveDB) GetAncestry

func (e *EveDB) GetAncestry(id int) (*Ancestry, error)

func (*EveDB) GetBloodline

func (e *EveDB) GetBloodline(id int) (*Bloodline, error)

func (*EveDB) GetBlueprint

func (e *EveDB) GetBlueprint(typeID int) (*MaterialSheet, error)

GetBlueprint fetches a MaterialSheet from the database.

func (*EveDB) GetBlueprints

func (e *EveDB) GetBlueprints(typeIDs ...int) ([]*MaterialSheet, error)

GetBlueprints is a utility function to retrieve multiple Blueprints.

func (*EveDB) GetConstellation

func (e *EveDB) GetConstellation(id int) (*Constellation, error)

func (*EveDB) GetItemType

func (e *EveDB) GetItemType(typeID int) (*ItemType, error)

GetItemType fetches a specific ItemType from the database.

func (*EveDB) GetItemTypeDetail

func (e *EveDB) GetItemTypeDetail(typeID int) (*ItemTypeDetail, error)

GetItemTypeDetail fetches a specific ItemType with extra details from the database.

func (*EveDB) GetRace

func (e *EveDB) GetRace(id int) (*Race, error)

func (*EveDB) GetRaces

func (e *EveDB) GetRaces() ([]*Race, error)

GetRaces fetches all Races from the database.

func (*EveDB) GetRegion

func (e *EveDB) GetRegion(id int) (*Region, error)

func (*EveDB) GetStation

func (e *EveDB) GetStation(stationID int) (*Station, error)

func (*EveDB) GetSystem

func (e *EveDB) GetSystem(id int) (*System, error)

func (*EveDB) QueryItemTypeDetails

func (e *EveDB) QueryItemTypeDetails(query string, catIDs ...int) ([]*ItemTypeDetail, error)

QueryItemTypeDetails returns a list of matching items given the query.

func (*EveDB) QueryItemTypes

func (e *EveDB) QueryItemTypes(query string, catIDs ...int) ([]*ItemType, error)

QueryItemTypes returns a list of matching items given the query.

type Icon

type Icon struct {
	IconID          int    `json:"icon_id"`
	IconFile        string `json:"icon_file"`
	IconDescription string `json:"icon_description"`
}

type ItemType

type ItemType struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

An ItemType is a type of item in EVE.

type ItemTypeDetail

type ItemTypeDetail struct {
	*ItemType

	GroupID   int    `json:"group_id"`
	GroupName string `json:"group_name"`

	CategoryID   int    `json:"category_id"`
	CategoryName string `json:"category_name"`

	Mass        decimal.Decimal `json:"mass"`
	Volume      decimal.Decimal `json:"volume"`
	Capacity    decimal.Decimal `json:"capacity"`
	PortionSize int             `json:"portion_size"`
	BasePrice   decimal.Decimal `json:"base_price"`

	ParentTypeID      int   `json:"parent_type_id"`
	BlueprintID       int   `json:"blueprint_id"`
	DerivativeTypeIDs []int `json:"derivative_type_i_ds"`
}

type Material

type Material struct {
	*ItemType
	Quantity int `json:"quantity"`
}

A Material is a type and quantity of an item used for manufacturing.

type MaterialSheet

type MaterialSheet struct {
	*ItemType
	Materials   []*Material `json:"materials"`
	ProducesQty int         `json:"produces_qty"`
}

A MaterialSheet describes what is necessary to build an item.

type Race

type Race struct {
	ID               int    `json:"id"`
	Name             string `json:"name"`
	Description      string `json:"description"`
	ShortDescription string `json:"short_description"`

	Icon
}

A Race is a race in EVE.

type Region

type Region struct {
	RegionID int    `json:"region_id"`
	Name     string `json:"name"`
}

type Station

type Station struct {
	StationID       int    `json:"station_id"`
	StationTypeID   int    `json:"station_type_id"`
	CorporationID   int    `json:"corporation_id"`
	SystemID        int    `json:"system_id"`
	ConstellationID int    `json:"constellation_id"`
	RegionID        int    `json:"region_id"`
	Name            string `json:"name"`
}

type System

type System struct {
	SystemID        int     `json:"system_id"`
	Name            string  `json:"name"`
	RegionID        int     `json:"region_id"`
	ConstellationID int     `json:"constellation_id"`
	Security        float64 `json:"security"`
}

Jump to

Keyboard shortcuts

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