entities

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 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 {
	Exchange   string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Pair       string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Period     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