Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromAccountModels ¶
FromAccountModels converts a map of account.Account to a map of Account.
func ToAccountModels ¶
ToAccountModels converts a map of Account to a map of account.Account.
Types ¶
type Forwardtest ¶
type Forwardtest struct {
ID string `db:"id"`
UpdatedAt time.Time `db:"updated_at"`
Data []byte `db:"data"`
}
Forwardtest is the entity for a forwardtest.
func FromForwardtestModel ¶
func FromForwardtestModel(ft forwardtest.Forwardtest) (Forwardtest, error)
FromForwardtestModel converts a Forwardtest model to a Forwardtest entity.
func (Forwardtest) ToModel ¶
func (ft Forwardtest) ToModel() (forwardtest.Forwardtest, error)
ToModel converts a Forwardtest entity to a Forwardtest model.
type ForwardtestData ¶
type ForwardtestData struct {
Accounts map[string]Account `json:"accounts"`
Orders []Order `json:"orders"`
}
ForwardtestData is the data for a forwardtest.
type Order ¶
type Order struct {
ID string `json:"id"`
ExecutionTime *time.Time `json:"execution_time"`
Type string `json:"type"`
Exchange string `json:"exchange"`
Pair string `json:"pair"`
Side string `json:"side"`
Quantity float64 `json:"quantity"`
Price float64 `json:"price"`
}
Order is the entity for an order.
func FromOrderModel ¶
FromOrderModel converts an Order model to an entity.
func FromOrderModels ¶
FromOrderModels converts a list of order.Order to a list of Order.
Click to show internal directories.
Click to hide internal directories.