reference

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptionSymbol

type OptionSymbol map[string][]string

OptionSymbol represents one datum of that returned by the ref-data/options/symbols endpoint.

func GoldenOptionSymbol

func GoldenOptionSymbol() (symbols OptionSymbol)

GoldenOptionSymbol returns golden data for the OptionSymbol type

type Symbol

type Symbol struct {
	ID        int       `json:"-"`
	CreatedAt time.Time `json:"-"`
	Symbol    string    `json:"symbol" gorm:"type:character varying;not null;index"`
	Exchange  string    `json:"exchange" gorm:"type:character varying"`
	Name      string    `json:"name" gorm:"type:character varying"`
	Date      time.Time `json:"-" gorm:"type:date"`
	Enabled   bool      `json:"isEnabled"`
	Type      string    `json:"type" gorm:"type:character varying"`
	Region    string    `json:"region" gorm:"type:character(2)"`
	Currency  string    `json:"currency" gorm:"type:character(3)"`
	IEXID     string    `` // nolint:lll
	/* 140-byte string literal not displayed */
	FIGI string `json:"figi" gorm:"type:character(12);uniqueIndex:,where:figi IS NOT NULL"`
	CIK  string `json:"cik" gorm:"type:character(10);uniqueIndex:,where:cik IS NOT NULL"`
}

Symbol represents one datum of that returned by the ref-data/symbols endpoint.

func GoldenSymbol

func GoldenSymbol() (symbols []Symbol)

GoldenSymbol returns golden data for the Symbol type

func (*Symbol) MarshalJSON

func (s *Symbol) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", into a time.Time by using time.Parse().

func (*Symbol) UnmarshalJSON

func (s *Symbol) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", into a time.Time by using time.Parse().

func (*Symbol) Validate

func (s *Symbol) Validate() error

Validate satisfies the Validator interface. It will return an error if the Symbol, IEXID, or Date fields are equal to their zero value.

Jump to

Keyboard shortcuts

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