closure

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentHandlerMock

type AgentHandlerMock struct {
	DbConnectionMock
	SetConfigMock     func(agentId uint, service, otherUUID string, set, running []byte) error
	RemoveConfigMock  func(agentId uint, service, otherUUID string) error
	UpdateConfigsMock func(agentId uint, configs []proto.AgentConfig, reset bool) error
	CreateAgentMock   func(agent proto.Agent) (string, error)
	UpdateAgentMock   func(agentId uint, agent proto.Agent) error
	UpdateVersionMock func(agentId uint, version proto.Version) error
	AgentVersionsMock func(agentId uint) (map[string]string, error)
	GetMock           func(uuid string) (uint, *proto.Agent, error)
}

func (*AgentHandlerMock) AgentVersions

func (a *AgentHandlerMock) AgentVersions(agentId uint) (versions map[string]string, err error)

func (*AgentHandlerMock) CloseDbh

func (a *AgentHandlerMock) CloseDbh(dbKey string) error

func (*AgentHandlerMock) Create

func (a *AgentHandlerMock) Create(agent proto.Agent) (string, error)

func (*AgentHandlerMock) Delete

func (a *AgentHandlerMock) Delete(agentId uint) (err error)

func (*AgentHandlerMock) Get

func (a *AgentHandlerMock) Get(uuid string) (uint, *proto.Agent, error)

func (*AgentHandlerMock) GetAll

func (a *AgentHandlerMock) GetAll() ([]proto.Agent, error)

func (*AgentHandlerMock) OpenDbh

func (a *AgentHandlerMock) OpenDbh(dsn string, dbKey string) error

func (*AgentHandlerMock) Remove

func (a *AgentHandlerMock) Remove(agentId uint) (err error)

func (*AgentHandlerMock) RemoveConfig

func (a *AgentHandlerMock) RemoveConfig(agentId uint, service, otherUUID string) error

func (*AgentHandlerMock) SetConfig

func (a *AgentHandlerMock) SetConfig(agentId uint, service, otherUUID string, set, running []byte) error

func (*AgentHandlerMock) Update

func (a *AgentHandlerMock) Update(agentId uint, agent proto.Agent) error

func (*AgentHandlerMock) UpdateConfigs

func (a *AgentHandlerMock) UpdateConfigs(agentId uint, configs []proto.AgentConfig, reset bool) error

func (*AgentHandlerMock) UpdateVersion

func (a *AgentHandlerMock) UpdateVersion(agentId uint, version proto.Version) (err error)

type AuthHandlerMock

type AuthHandlerMock struct {
	AgentMock func(agentUuid string) (uint, *proto.AuthResponse, error)
}

func (*AuthHandlerMock) Agent

func (a *AuthHandlerMock) Agent(agentUuid string) (uint, *proto.AuthResponse, error)

type DbConnectionMock

type DbConnectionMock struct {
	OpenMock     func(dsn string) error
	GetDsnMock   func() string
	OpenDbMock   func(dbKey string) error
	OpenDbhMock  func(dsn string, dbKey string) error
	ConnectMock  func(dsn string, tries uint) error
	CloseMock    func() error
	CloseDbhMock func(dbKey string) error
	UseMock      func(db string) error
	BeginMock    func() error
	CommitMock   func() error
}

func (*DbConnectionMock) AddDb

func (a *DbConnectionMock) AddDb(dsn string, dbKey string)

func (*DbConnectionMock) Begin

func (a *DbConnectionMock) Begin() (err error)

func (*DbConnectionMock) Close

func (a *DbConnectionMock) Close() (err error)

func (*DbConnectionMock) CloseDbh

func (a *DbConnectionMock) CloseDbh(dbKey string) error

func (*DbConnectionMock) Commit

func (a *DbConnectionMock) Commit() (err error)

func (*DbConnectionMock) Connect

func (a *DbConnectionMock) Connect(dsn string, tries uint) error

func (*DbConnectionMock) Dbh

func (a *DbConnectionMock) Dbh(dbKey string) *sql.DB

func (*DbConnectionMock) GetDsn

func (a *DbConnectionMock) GetDsn() string

func (*DbConnectionMock) Open

func (a *DbConnectionMock) Open(dsn string) (err error)

func (*DbConnectionMock) OpenDb

func (a *DbConnectionMock) OpenDb(dbKey string) error

func (*DbConnectionMock) OpenDbh

func (a *DbConnectionMock) OpenDbh(dsn string, dbKey string) error

func (*DbConnectionMock) Use

func (a *DbConnectionMock) Use(db string) (err error)

type RabbitmqProducerMock

type RabbitmqProducerMock struct {
	OpenMock  func() (err error)
	CloseMock func() (err error)
	QueueMock func(msg interface{}) (err error)
}

func (*RabbitmqProducerMock) Close

func (self *RabbitmqProducerMock) Close() (err error)

func (*RabbitmqProducerMock) Open

func (self *RabbitmqProducerMock) Open() (err error)

func (*RabbitmqProducerMock) Queue

func (self *RabbitmqProducerMock) Queue(msg interface{}) (err error)

Jump to

Keyboard shortcuts

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