database

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBTableMarketName string
)

Functions

func Connect added in v0.1.0

func Connect(config *Config)

func Init added in v0.1.0

func Init(cfg *Config) (err error)

Types

type BinanceDepthResponse

type BinanceDepthResponse struct {
	Snapshot *binance.DepthResponse
	Response *binance.WsDepthEvent
}

func (*BinanceDepthResponse) InsertIntoDatabase

func (resp *BinanceDepthResponse) InsertIntoDatabase(sym string) error

type BinanceFuturesDepthResponse added in v0.1.0

type BinanceFuturesDepthResponse struct {
	Snapshot *futures.DepthResponse
	Response *futures.WsDepthEvent
}

func (*BinanceFuturesDepthResponse) InsertIntoDatabase added in v0.1.0

func (resp *BinanceFuturesDepthResponse) InsertIntoDatabase(sym string) error

type Config added in v0.1.0

type Config struct {
	DBName            string `mapstructure:"POSTGRES_DB"`
	DBUser            string `mapstructure:"POSTGRES_USER"`
	DBPassword        string `mapstructure:"POSTGRES_PASSWORD"`
	DBServer          string `mapstructure:"POSTGRES_SERVER"`
	DBPort            string `mapstructure:"POSTGRES_PORT"`
	Debug             bool   `mapstructure:"Debug"`
	DBTableMarketName string
	DBDeleteOldSnap   bool
}

type Tabler added in v0.1.0

type Tabler interface {
	TableName() string
}

Jump to

Keyboard shortcuts

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