storage

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bunt added in v0.0.11

type Bunt struct {
	// contains filtered or unexported fields
}

func (*Bunt) CreateOrder added in v0.0.11

func (b *Bunt) CreateOrder(order *model.Order) error

func (Bunt) Orders added in v0.0.11

func (b Bunt) Orders(filters ...OrderFilter) ([]*model.Order, error)

func (Bunt) UpdateOrder added in v0.0.11

func (b Bunt) UpdateOrder(order *model.Order) error

type OrderFilter added in v0.0.11

type OrderFilter func(model.Order) bool

func WithPair added in v0.0.11

func WithPair(pair string) OrderFilter

func WithStatus added in v0.0.11

func WithStatus(status model.OrderStatusType) OrderFilter

func WithStatusIn added in v0.0.11

func WithStatusIn(status ...model.OrderStatusType) OrderFilter

func WithUpdateAtBeforeOrEqual added in v0.0.11

func WithUpdateAtBeforeOrEqual(time time.Time) OrderFilter

type Storage added in v0.0.10

type Storage interface {
	CreateOrder(order *model.Order) error
	UpdateOrder(order *model.Order) error
	Orders(filters ...OrderFilter) ([]*model.Order, error)
}

func FromFile

func FromFile(file string) (Storage, error)

func FromMemory

func FromMemory() (Storage, error)

Jump to

Keyboard shortcuts

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