Documentation ¶
Index ¶
- type Actions
- func (a Actions) AddExchange(user domain.User, exchangeNumber int, data []byte) error
- func (a Actions) AgentCreate(user domain.User, strategyId domain.StrategyId, data []byte, ...) (*domain.Agent, error)
- func (a Actions) AgentSetStatus(agent *domain.Agent, status domain.AgentStatus) error
- func (a Actions) AgentUpdateData(agent *domain.Agent, data []byte) error
- func (a Actions) FindAgents(filter AgentFilter) ([]domain.Agent, error)
- func (a Actions) FindExchanges(filter ExchangeFilter) ([]ExchangeData, error)
- func (a Actions) GetAgentInfo(agent domain.Agent) *AgentInfo
- func (a Actions) GetUserAgents(user domain.User) ([]domain.Agent, error)
- func (a Actions) StartAgents(ctx context.Context) error
- func (a Actions) UserGetOrCreate(name string, links UserLinks) (*domain.User, error)
- type AgentFilter
- type AgentInfo
- type AgentRepo
- type AppExchange
- type AppStorage
- type ExchangeData
- type ExchangeFilter
- type ExchangeRepo
- type StorageRepo
- type UserLinks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions struct {
// contains filtered or unexported fields
}
func GetAppActions ¶
func GetAppActions(storage AppStorage, exchange AppExchange, appLogger domain.LoggerRepo) *Actions
func (Actions) AddExchange ¶
func (Actions) AgentCreate ¶
func (a Actions) AgentCreate(user domain.User, strategyId domain.StrategyId, data []byte, exchanges []ExchangeData) (*domain.Agent, error)
func (Actions) AgentSetStatus ¶
func (Actions) AgentUpdateData ¶
func (Actions) FindAgents ¶
func (a Actions) FindAgents(filter AgentFilter) ([]domain.Agent, error)
func (Actions) FindExchanges ¶
func (a Actions) FindExchanges(filter ExchangeFilter) ([]ExchangeData, error)
func (Actions) GetUserAgents ¶
type AgentFilter ¶
type AgentFilter struct { Id int64 Status domain.AgentStatus UserId int64 }
type AgentInfo ¶
type AgentInfo struct { Name string StrategyName string Exchanges []string Parameters []domain.StrategyParameter }
type AppExchange ¶
type AppStorage ¶
type AppStorage interface { // User UserGetOrCreate(links UserLinks) (*domain.User, error) // Agent FindAgents(filter AgentFilter) ([]domain.Agent, error) AgentSave(agent domain.Agent) (*domain.Agent, error) AgentSetStatus(agent *domain.Agent, status domain.AgentStatus) error AgentUpdateData(agent *domain.Agent, data []byte) error //GetStrategyData(agentId string) []byte GetAgentStorage(strategyId domain.Agent) interface{} GetAgentExchanges(agentId int64) ([]ExchangeData, error) FindExchanges(filter ExchangeFilter) ([]ExchangeData, error) AddExchange(userId int64, exchangeNumber int, data []byte) error AgentAddExchange(agent *domain.Agent, exchanges []ExchangeData) error }
type ExchangeData ¶
type ExchangeFilter ¶
type ExchangeRepo ¶
type ExchangeRepo struct {
// contains filtered or unexported fields
}
func (ExchangeRepo) GetAgentExchanges ¶
func (e ExchangeRepo) GetAgentExchanges(agentId int64) ([]domain.Exchange, error)
type StorageRepo ¶
type StorageRepo struct {
// contains filtered or unexported fields
}
func (StorageRepo) GetAgentStorage ¶
func (s StorageRepo) GetAgentStorage(agent domain.Agent) interface{}
Directories ¶
Path | Synopsis |
---|---|
tests/mocks
Package mock_domain is a generated GoMock package.
|
Package mock_domain is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.