mocks

package
v0.0.0-...-ac8a210 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMock

type AgentMock struct {
	mock.Mock
}

func (*AgentMock) Send

func (m *AgentMock) Send(ctx context.Context, contract *common.Contract, functionName string, args ...interface{}) (string, error)

type ConnectionMock

type ConnectionMock struct {
	mock.Mock
}

func (*ConnectionMock) Clean

func (m *ConnectionMock) Clean() error

func (*ConnectionMock) GetDB

func (m *ConnectionMock) GetDB() *gorm.DB

func (*ConnectionMock) Migrate

func (m *ConnectionMock) Migrate() error

type ContractMapperMock

type ContractMapperMock struct {
	mock.Mock
}

func (*ContractMapperMock) MapDTOToCommon

func (m *ContractMapperMock) MapDTOToCommon(d *dto.ContractDTO) *common.Contract

func (*ContractMapperMock) MapDTOToEntity

func (m *ContractMapperMock) MapDTOToEntity(d *dto.ContractDTO) *entities.Contract

func (*ContractMapperMock) MapEntityToDTO

func (m *ContractMapperMock) MapEntityToDTO(c *entities.Contract) *dto.ContractDTO

func (*ContractMapperMock) MapNewDTOToEntity

func (m *ContractMapperMock) MapNewDTOToEntity(d *dto.NewContractDTO) *entities.Contract

func (*ContractMapperMock) MapNewWithIdDTOToEntity

func (m *ContractMapperMock) MapNewWithIdDTOToEntity(d *dto.NewContractWithIdDTO) *entities.Contract

type ContractRepoMock

type ContractRepoMock struct {
	mock.Mock
}

func (*ContractRepoMock) Create

func (m *ContractRepoMock) Create(tx *gorm.DB, contract *entities.Contract) error

func (*ContractRepoMock) Find

func (m *ContractRepoMock) Find(tx *gorm.DB, id string) (*entities.Contract, error)

func (*ContractRepoMock) FindAll

func (m *ContractRepoMock) FindAll(tx *gorm.DB) ([]entities.Contract, error)

func (*ContractRepoMock) FindByTaskId

func (m *ContractRepoMock) FindByTaskId(tx *gorm.DB, taskId string) (*entities.Contract, error)

func (*ContractRepoMock) Update

func (m *ContractRepoMock) Update(tx *gorm.DB, contract *entities.Contract) error

type DeployerMock

type DeployerMock struct {
	mock.Mock
}

func (*DeployerMock) Deploy

func (m *DeployerMock) Deploy(ctx context.Context, contract *common.Contract, args ...interface{}) (string, string, error)

type EventBusMock

type EventBusMock struct {
	mock.Mock
}

func (*EventBusMock) Publish

func (m *EventBusMock) Publish(topic string, args ...interface{})

func (*EventBusMock) Subscribe

func (m *EventBusMock) Subscribe(topic string, fn interface{})

func (*EventBusMock) SubscribeOnce

func (m *EventBusMock) SubscribeOnce(topic string, fn interface{})

func (*EventBusMock) Unsubscribe

func (m *EventBusMock) Unsubscribe(topic string, fn interface{})

type HTTPClientMock

type HTTPClientMock struct {
	mock.Mock
}

func (*HTTPClientMock) Do

func (m *HTTPClientMock) Do(r *http.Request) (*http.Response, error)

type TaskFinishTopicMock

type TaskFinishTopicMock struct {
	mock.Mock
}

func (*TaskFinishTopicMock) Publish

func (m *TaskFinishTopicMock) Publish(e bus.TaskFinishEvent)

func (*TaskFinishTopicMock) Subscribe

func (m *TaskFinishTopicMock) Subscribe(fn interface{})

func (*TaskFinishTopicMock) Unsubscribe

func (m *TaskFinishTopicMock) Unsubscribe(fn interface{})

type TaskInputRequestTopicMock

type TaskInputRequestTopicMock struct {
	mock.Mock
}

func (*TaskInputRequestTopicMock) Publish

func (*TaskInputRequestTopicMock) Subscribe

func (m *TaskInputRequestTopicMock) Subscribe(fn interface{})

func (*TaskInputRequestTopicMock) Unsubscribe

func (m *TaskInputRequestTopicMock) Unsubscribe(fn interface{})

type TaskServiceMock

type TaskServiceMock struct {
	mock.Mock
}

func (*TaskServiceMock) Create

func (m *TaskServiceMock) Create(task *dto.NewTaskDTO) (*dto.TaskDTO, error)

func (*TaskServiceMock) FindNotFinishedAndExpired

func (m *TaskServiceMock) FindNotFinishedAndExpired() ([]*dto.TaskDTO, error)

func (*TaskServiceMock) FindNotFinishedAndHaveDeployedContract

func (m *TaskServiceMock) FindNotFinishedAndHaveDeployedContract() ([]*dto.TaskDTO, error)

func (*TaskServiceMock) FindNotFinishedTasksThatDontHaveIncompletedTransactions

func (m *TaskServiceMock) FindNotFinishedTasksThatDontHaveIncompletedTransactions() ([]*dto.TaskDTO, error)

func (*TaskServiceMock) FindNotFinishedThatHaveDeployedContractAndLimitedPendingTransactions

func (m *TaskServiceMock) FindNotFinishedThatHaveDeployedContractAndLimitedPendingTransactions(limit int) ([]*dto.TaskDTO, error)

func (*TaskServiceMock) Get

func (m *TaskServiceMock) Get(taskId string) (*dto.TaskDTO, error)

func (*TaskServiceMock) Update

func (m *TaskServiceMock) Update(task *dto.TaskDTO) error

Jump to

Keyboard shortcuts

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