Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromEntitiesToMap ¶
func FromEntitiesToMap(entities []Candlestick) []map[string]interface{}
FromEntitiesToMap will convert a list of candlestick entities to a map.
func FromEntityListToModelList ¶
func FromEntityListToModelList(entities []Candlestick) (*candlestick.List, error)
FromEntityListToModelList will convert a candlestick entity list to a candlestick model list.
Types ¶
type Candlestick ¶
type Candlestick struct {
Exchange string `db:"exchange"`
Pair string `db:"pair"`
Period string `db:"period"`
Time time.Time `db:"time"`
Data []byte `db:"data"`
}
Candlestick is the entity for a candlestick.
func FromModelListToEntityList ¶
func FromModelListToEntityList(list *candlestick.List) ([]Candlestick, error)
FromModelListToEntityList will convert a candlestick model list to a candlestick entity list.
func (*Candlestick) FromModel ¶
func (c *Candlestick) FromModel(exchange, pair, period string, model candlestick.Candlestick) error
FromModel will convert a candlestick model to a candlestick entity.
func (Candlestick) ToModel ¶
func (c Candlestick) ToModel() (exchange, pair, period string, model candlestick.Candlestick, err error)
ToModel will convert a candlestick entity to a candlestick model.
Click to show internal directories.
Click to hide internal directories.