persistence

package
v0.0.0-...-787e22e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MYSQL_DATABASE = os.Getenv("MYSQL_DATABASE")
	GCS_BUCKET     = os.Getenv("GCS_BUCKET")
)

Functions

func NewCandleMockRepository

func NewCandleMockRepository(candleTableName, timeFormat, productCode string, duration time.Duration) repository.CandleRepository

func NewCandleRepository

func NewCandleRepository(db DB, candleTableName, timeFormat string) repository.CandleRepository

func NewCookie

func NewCookie(name string, path string, maxAge int, secureCookie *securecookie.SecureCookie) repository.Cookie

func NewMySQLTransaction

func NewMySQLTransaction(dsn string) *sql.Tx

func NewSessionRepository

func NewSessionRepository(db DB) repository.SessionRepository

func NewSignalEventRepository

func NewSignalEventRepository(db DB, timeFormat string) repository.SignalEventRepository

func NewTradeParamsRepository

func NewTradeParamsRepository(db DB) repository.TradeParamsRepository

func NewUserRepository

func NewUserRepository(db DB) repository.UserRepository

Types

type DB

type DB interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
}

Jump to

Keyboard shortcuts

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