Documentation
¶
Index ¶
- Constants
- func ConnectMongo(ctx context.Context, conf MongoConf) (*mongo.Database, error)
- func DeleteInt64(ctx context.Context, coll *mongo.Collection, key string) error
- func DeleteKey(ctx context.Context, coll *mongo.Collection, key string) error
- func IsDuplicateError(err error) bool
- func LoadInt64(ctx context.Context, coll *mongo.Collection, key string) (int64, error)
- func LoadKey(ctx context.Context, coll *mongo.Collection, key string, value interface{}) error
- func MergeTick(o1, h1, l1, c1, v1, o2, h2, l2, c2, v2 float64) (open, high, low, close, volume float64)
- func NewZapLogger(conf LogConf) (*zap.Logger, error)
- func ParseJsonConfig(filename string, config interface{}) error
- func SaveInt64(ctx context.Context, coll *mongo.Collection, key string, value int64) error
- func SaveKey(ctx context.Context, coll *mongo.Collection, key string, value interface{}) error
- type BroadcastConf
- type Candle
- type ExchangeConf
- type FloatTuple
- type GinConf
- type Grid
- type GridStrategyConf
- type HistoryConf
- type KVSlice
- type LogConf
- type MongoConf
- type MySQLConf
- type RestGridStrategyConf
- type SQLiteConf
- type Ticker
Constants ¶
View Source
const ( GateIO = "gate" MXC = "mxc" OKEx = "okex" Huobi = "huobi" Binance = "binance" )
Variables ¶
This section is empty.
Functions ¶
func DeleteInt64 ¶
func IsDuplicateError ¶
func ParseJsonConfig ¶
Types ¶
type BroadcastConf ¶
type Candle ¶
type ExchangeConf ¶
type FloatTuple ¶
type FloatTuple struct { Key interface{} Value float64 }
type GridStrategyConf ¶
type HistoryConf ¶
type KVSlice ¶
type KVSlice []FloatTuple
type RestGridStrategyConf ¶
type SQLiteConf ¶
type SQLiteConf struct {
Location string
}
Click to show internal directories.
Click to hide internal directories.