mock

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigLoader

func NewConfigLoader(data string) ports.ConfigLoader

func NewPrimaryAdapter

func NewPrimaryAdapter() primary.PrimaryPort

NewPrimaryAdapter returns mocked ports.PrimaryPort

func NewPrimaryHandler

func NewPrimaryHandler(numTask int) domain.PrimaryAdapterHandler

NewPrimaryHandler returns mocked ports.PrimaryHandler with given number of tasks

func NewSecondaryAdapter

func NewSecondaryAdapter(name string, duration time.Duration, failCount int) secondary.SecodaryPort

NewSecondaryAdapter creates mocked implementation of ports.SecondaryPort

func NewSecondaryAdapterClient

func NewSecondaryAdapterClient() secondary.SecondaryAdapterClient

Types

type ConfigLoaderMock

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

ConfigLoaderMock should implement ConfigLoader from `github.com/hanapedia/hexagon/internal/config/application/ports`

func (ConfigLoaderMock) Load

Load for mock config loader does not validate cofiguration for separation of concerns

func (ConfigLoaderMock) LoadClusterConfig

func (clm ConfigLoaderMock) LoadClusterConfig() (*model.ClusterConfig, error)

type PrimaryAdapterMock

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

func (PrimaryAdapterMock) Register

func (pam PrimaryAdapterMock) Register(primaryHander *domain.PrimaryAdapterHandler) error

Register mock implementation

func (PrimaryAdapterMock) Serve

func (pam PrimaryAdapterMock) Serve(ctx context.Context, swg, rwg *sync.WaitGroup) error

Serve mock implementation

type SecondaryAdapterClientMock

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

func (SecondaryAdapterClientMock) Close

func (sacm SecondaryAdapterClientMock) Close()

Close mock implementation

type SecondaryAdapterMock

type SecondaryAdapterMock struct {
	secondary.SecondaryPortBase
	// contains filtered or unexported fields
}

SecondaryAdapterMock should mock SecodaryPort from "github.com/hanapedia/hexagon/internal/service-unit/application/ports"

func (*SecondaryAdapterMock) Call

Call mock implementation

Jump to

Keyboard shortcuts

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