entities

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEntityListToModelList

func FromEntityListToModelList(entities []Candlestick) (*candlestick.List, error)

Types

type Candlestick

type Candlestick struct {
	ExchangeName string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PairSymbol   string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PeriodSymbol string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Time         time.Time `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Open         float64
	High         float64
	Low          float64
	Close        float64
	Volume       float64
	Uncomplete   bool
}

func FromModelListToEntityList

func FromModelListToEntityList(list *candlestick.List) []Candlestick

func (*Candlestick) FromModel

func (c *Candlestick) FromModel(exchange, pair, period string, t time.Time, model candlestick.Candlestick)

func (Candlestick) ToModel

func (c Candlestick) ToModel() (exchange, pair, period string, t time.Time, model candlestick.Candlestick)

Jump to

Keyboard shortcuts

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