mapper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func NewDB

func NewDB()

func NewEtcdClient

func NewEtcdClient() *clientv3.Client

Types

type Mapper

type Mapper struct {
}

func NewMapper

func NewMapper() *Mapper

func (*Mapper) Create

func (m *Mapper) Create(model interface{}) error

func (*Mapper) Delete

func (m *Mapper) Delete(model interface{}) error

func (*Mapper) Find

func (m *Mapper) Find(models interface{}) error

func (*Mapper) FindByFuturesID

func (m *Mapper) FindByFuturesID(models interface{}, futuresID string) error

func (*Mapper) FindByFuturesName

func (m *Mapper) FindByFuturesName(models interface{}, futuresName string) error

func (*Mapper) FindOrders

func (m *Mapper) FindOrders(models interface{}, futuresID string, traderName string, status string, page int, total *int) error

func (*Mapper) FindOrdersWithCondition

func (m *Mapper) FindOrdersWithCondition(models interface{}, firmID int, futuresID string, traderName string, status string, page int, total *int) error

func (*Mapper) FindTrades

func (m *Mapper) FindTrades(models interface{}, futuresID string, traderName string, page int, total *int) error

func (*Mapper) FindTradesWithCondition

func (m *Mapper) FindTradesWithCondition(models interface{}, firmID int, futuresID string, traderName string, page int, total *int) error

func (*Mapper) FindWithLimit

func (m *Mapper) FindWithLimit(models interface{}, limit int) error

func (*Mapper) FindWithPage

func (m *Mapper) FindWithPage(models interface{}, page int, total *int) error

func (*Mapper) FirstByFirmName

func (m *Mapper) FirstByFirmName(model interface{}, firmName string) error

func (*Mapper) FirstByID

func (m *Mapper) FirstByID(model interface{}, id int) error

func (*Mapper) FutureIDs

func (m *Mapper) FutureIDs() ([]string, error)

func (*Mapper) FuturesNames

func (m *Mapper) FuturesNames() ([]string, error)

func (*Mapper) Save

func (m *Mapper) Save(model interface{}) error

func (*Mapper) Update

func (m *Mapper) Update(model interface{}, column string, value string) error

func (*Mapper) WhereByUUID

func (m *Mapper) WhereByUUID(model interface{}, column string, uuid string) error

Jump to

Keyboard shortcuts

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