Versions in this module Expand all Collapse all v0 v0.1.2 Dec 27, 2016 v0.1.1 Dec 22, 2016 Changes in this version + var DB *gorm.DB + func NewOrm() (*gorm.DB, error) + type Algorithm struct + CreatedAt time.Time + DeletedAt *time.Time + Description string + EvnDefault string + ID int64 + Name string + Script string + Traders []Trader + UpdatedAt time.Time + UserID int64 + type Exchange struct + AccessKey string + CreatedAt time.Time + DeletedAt *time.Time + ID int64 + Name string + SecretKey string + Type string + UpdatedAt time.Time + UserID int64 + type Log struct + Amount float64 + ExchangeType string + ID int64 + Message string + Price float64 + StockType string + Time time.Time + Timestamp int64 + TraderID int64 + Type string + type Logger struct + ExchangeType string + TraderID int64 + func (l Logger) Log(method string, stockType string, price, amount float64, ...) + type Trader struct + Algorithm Algorithm + AlgorithmID int64 + CreatedAt time.Time + DeletedAt *time.Time + Environment string + Exchanges []Exchange + ID int64 + LastRunAt time.Time + Name string + Status int64 + UpdatedAt time.Time + UserID int64 + type TraderExchange struct + ExchangeID int64 + ID int64 + TraderID int64 + type User struct + CreatedAt time.Time + DeletedAt *time.Time + ID int64 + Level int64 + Password string + UpdatedAt time.Time + Username string + func GetUser(username interface{}) (user User, err error) + func GetUserByID(id interface{}) (user User, err error) + func (user User) GetTrader(id interface{}) (trader Trader, err error) + func (user User) GetTraderExchanges(id interface{}) (traderExchanges []TraderExchange, err error) + func (user User) ListAlgorithm(size, page int64, order string) (total int64, algorithms []Algorithm, err error) + func (user User) ListExchange(size, page int64, order string) (total int64, exchanges []Exchange, err error) + func (user User) ListLog(id, size, page int64) (total int64, logs []Log, err error) + func (user User) ListTrader(algorithmID int64) (traders []Trader, err error) + func (user User) ListUser(size, page int64, order string) (total int64, users []User, err error) + func (user User) UpdateTrader(req Trader) (err error)