shared

package
v0.0.0-...-b4905c4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

*

  • Common app structures

Index

Constants

View Source
const (
	DB_DATETIME  = "2006-01-02 15:04:05"
	CONTENT_JSON = "application/json"
)

Variables

This section is empty.

Functions

func SendError

func SendError(w http.ResponseWriter, msg string, code int)

Types

type CCPTime

type CCPTime struct {
	time.Time
}

func (CCPTime) String

func (ct CCPTime) String() string

func (*CCPTime) UnmarshalJSON

func (ct *CCPTime) UnmarshalJSON(b []byte) (err error)

type CompHolder

type CompHolder struct {
	Items []CompItem `json:"items"`
}

type CompItem

type CompItem struct {
	ID uint64 `db:"itemId" json:"id"`
	// StationID uint64  `db:"stationId" json:"station_id"`
	Name      string  `db:"name" json:"name"`
	MinSell   float64 `db:"sMin" json:"sell_min"`
	MeanSell  float64 `db:"sMean" json:"sell_mean"`
	MinBuy    float64 `db:"bMin" json:"buy_min"`
	MeanBuy   float64 `db:"bMean" json:"buy_mean"`
	MinRatio  float64 `db:"rMin" json:"ratio_min"`
	MeanRatio float64 `db:"rMean" json:"ratio_mean"`
}

type NextHref

type NextHref struct {
	Url string `json:"href"`
}

func (NextHref) String

func (n NextHref) String() string

type Order

type Order struct {
	Buy       bool    `json:"buy"`
	Issued    CCPTime `json:"issued"`
	Price     float64 `json:"price"`
	Volume    uint64  `json:"volume"`
	Duration  int     `json:"duration"`
	Id        uint64  `json:"id"`
	StationID uint64  `json:"stationID"`
	ItemID    uint64  `json:"type"`
}

func (*Order) ExpiryDate

func (o *Order) ExpiryDate() string

type Station

type Station struct {
	Id     uint64 `json:"id"`
	Name   string `json:"name"`
	System string `json:"system"`
	Region string `json:"region"`
}

Jump to

Keyboard shortcuts

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