storage

package
v0.0.0-...-f351f3f Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BaseSelectAgensQuery = "SELECT id, user_id, status, strategy_number, strategy_data FROM agents"
View Source
const SelectAgentExchangesQuery = `` /* 185-byte string literal not displayed */
View Source
const SelectUserExchangesQuery = "SELECT id, data from exchanges"
View Source
const UserInsertQuery = "INSERT INTO users (id) values (1)"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStorage

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

func GetSqliteAppStorage

func GetSqliteAppStorage(filename string) (*AppStorage, error)

func (AppStorage) AddExchange

func (as AppStorage) AddExchange(userId int64, exchangeNumber int, data []byte) error

func (AppStorage) AgentAddExchange

func (as AppStorage) AgentAddExchange(agent *domain.Agent, exchanges []app.ExchangeData) error

func (AppStorage) AgentSave

func (as AppStorage) AgentSave(agent domain.Agent) (*domain.Agent, error)

func (AppStorage) AgentSetStatus

func (as AppStorage) AgentSetStatus(agent *domain.Agent, status domain.AgentStatus) error

func (AppStorage) AgentUpdateData

func (as AppStorage) AgentUpdateData(agent *domain.Agent, data []byte) error

func (AppStorage) Connect

func (as AppStorage) Connect() error

func (AppStorage) Disconnect

func (as AppStorage) Disconnect() error

func (AppStorage) FindAgents

func (as AppStorage) FindAgents(filter app.AgentFilter) ([]domain.Agent, error)

func (AppStorage) FindExchanges

func (as AppStorage) FindExchanges(filter app.ExchangeFilter) ([]app.ExchangeData, error)

func (AppStorage) GetAgentExchanges

func (as AppStorage) GetAgentExchanges(agentId int64) ([]app.ExchangeData, error)

func (AppStorage) GetAgentStorage

func (as AppStorage) GetAgentStorage(agent domain.Agent) interface{}

func (AppStorage) UserGetOrCreate

func (as AppStorage) UserGetOrCreate(links app.UserLinks) (*domain.User, error)

type Driver

type Driver interface {
	// contains filtered or unexported methods
}

type SimpleStorage

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

func (SimpleStorage) GetTrades

func (ss SimpleStorage) GetTrades(filter *domain.SimpleTradeFilter) ([]domain.SimpleTrade, error)

func (SimpleStorage) SaveTrade

func (ss SimpleStorage) SaveTrade(trade *domain.SimpleTrade) error

type SqliteDriver

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

Jump to

Keyboard shortcuts

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