entities

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEntitiesToMap

func FromEntitiesToMap(exchanges []Exchange) []map[string]interface{}

FromEntitiesToMap will convert the entities to a map.

Types

type Exchange

type Exchange struct {
	Name string `db:"name"`
	Data []byte `db:"data"`
}

Exchange is the exchange entity.

func ExchangeFromModel

func ExchangeFromModel(model exchange.Exchange) (Exchange, error)

ExchangeFromModel will convert the model to an entity.

func (Exchange) ToModel

func (e Exchange) ToModel() exchange.Exchange

ToModel will convert the entity to a model.

type ExchangeData

type ExchangeData struct {
	Pairs        []string  `json:"pairs"`
	Periods      []string  `json:"periods"`
	Fees         float64   `json:"fees"`
	LastSyncTime time.Time `json:"last_sync_time"`
}

ExchangeData is the exchange data entity.

Jump to

Keyboard shortcuts

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