domain

package
v0.0.0-...-919210b Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheckResult

type HealthCheckResult struct {
	CreateDuration  time.Duration
	DestroyDuration time.Duration
	Amount          int
}

HealthCheckResult stores the duration that was needed to create and destroy the keys

type HealthChecker

type HealthChecker interface {
	PerformCheck(ctx context.Context, amount int) (*HealthCheckResult, error)
}

HealthChecker is the interface for performing an amount of checks and returning the result

type KMIPRepository

type KMIPRepository interface {
	Create(ctx context.Context) (string, error)
	Destroy(ctx context.Context, id string) error
}

KMIPRepository is the interface for the KMIP repository The implementation should be able to create and destroy keys

type MockHealthChecker

type MockHealthChecker struct {
	mock.Mock
}

MockHealthChecker is an autogenerated mock type for the HealthChecker type

func NewMockHealthChecker

func NewMockHealthChecker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHealthChecker

NewMockHealthChecker creates a new instance of MockHealthChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockHealthChecker) PerformCheck

func (_m *MockHealthChecker) PerformCheck(ctx context.Context, amount int) (*HealthCheckResult, error)

PerformCheck provides a mock function with given fields: ctx, amount

type MockKMIPRepository

type MockKMIPRepository struct {
	mock.Mock
}

MockKMIPRepository is an autogenerated mock type for the KMIPRepository type

func NewMockKMIPRepository

func NewMockKMIPRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockKMIPRepository

NewMockKMIPRepository creates a new instance of MockKMIPRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockKMIPRepository) Create

func (_m *MockKMIPRepository) Create(ctx context.Context) (string, error)

Create provides a mock function with given fields: ctx

func (*MockKMIPRepository) Destroy

func (_m *MockKMIPRepository) Destroy(ctx context.Context, id string) error

Destroy provides a mock function with given fields: ctx, id

Jump to

Keyboard shortcuts

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