sql

package
v0.0.0-...-e7652ed Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGormConfig = &gorm.Config{
		Logger: logger.Default.LogMode(logger.Silent),
	}
)
View Source
var (
	ErrInvalidConfig = errors.New("invalid sql config")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}

func (*Config) Load

func (c *Config) Load() *Config

func (Config) URL

func (c Config) URL() string

func (Config) Validate

func (c Config) Validate() error

type DB

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

func New

func New() (*DB, error)

func (*DB) ClearAllSymbolListenersCount

func (sqldb *DB) ClearAllSymbolListenersCount(ctx context.Context) error

func (*DB) ClearSymbolListenerSubscribers

func (sqldb *DB) ClearSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) error

func (*DB) DecrementSymbolListenerSubscribers

func (sqldb *DB) DecrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

func (*DB) GetSymbolListenerSubscribers

func (sqldb *DB) GetSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

func (*DB) IncrementSymbolListenerSubscribers

func (sqldb *DB) IncrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

func (*DB) Reset

func (d *DB) Reset() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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