entities20210831

package
v0.0.0-...-3099d22 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Symbol string `gorm:"primaryKey;autoIncrement:false"`
}

type Candlestick

type Candlestick struct {
	ExchangeName    string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PairBaseSymbol  string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PairQuoteSymbol string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PeriodName      string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Timestamp       uint64 `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Open            float64
	High            float64
	Low             float64
	Close           float64
	Volume          float64
	Uncomplete      bool
	Exchange        Exchange
	Pair            Pair
	Period          Period
}

type Exchange

type Exchange struct {
	Name    string   `gorm:"primaryKey;autoIncrement:false"`
	Pairs   []Pair   `gorm:"many2many:exchange_pair;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	Periods []Period `gorm:"many2many:exchange_period;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type Pair

type Pair struct {
	BaseSymbol  string `gorm:"primaryKey;autoIncrement:false"`
	QuoteSymbol string `gorm:"primaryKey;autoIncrement:false"`
	Base        Asset
	Quote       Asset
}

type Period

type Period struct {
	Name     string `gorm:"primaryKey;autoIncrement:false"`
	Duration uint64 `gorm:"index:duration,unique"`
	Unit     string `gorm:"index:duration,unique"`
}

Jump to

Keyboard shortcuts

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