repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(key string, value interface{}) (err error)
	Get(key string) (value string, err error)
	Delete(key string) (err error)
	DeleteAll() (err error)
	Shutdown() (err error)
}

type DataBase

type DataBase interface {
	Shutdown(ctx context.Context, logger logging.Logger)
}

type MockCache

type MockCache struct {
	mock.Mock
}

MockCache is an autogenerated mock type for the Cache type

func NewMockCache

func NewMockCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCache

NewMockCache creates a new instance of MockCache. 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 (*MockCache) Delete

func (_m *MockCache) Delete(key string) error

Delete provides a mock function with given fields: key

func (*MockCache) DeleteAll

func (_m *MockCache) DeleteAll() error

DeleteAll provides a mock function with given fields:

func (*MockCache) EXPECT

func (_m *MockCache) EXPECT() *MockCache_Expecter

func (*MockCache) Get

func (_m *MockCache) Get(key string) (string, error)

Get provides a mock function with given fields: key

func (*MockCache) Set

func (_m *MockCache) Set(key string, value interface{}) error

Set provides a mock function with given fields: key, value

func (*MockCache) Shutdown

func (_m *MockCache) Shutdown() error

Shutdown provides a mock function with given fields:

type MockCache_DeleteAll_Call

type MockCache_DeleteAll_Call struct {
	*mock.Call
}

MockCache_DeleteAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAll'

func (*MockCache_DeleteAll_Call) Return

func (*MockCache_DeleteAll_Call) Run

func (*MockCache_DeleteAll_Call) RunAndReturn

func (_c *MockCache_DeleteAll_Call) RunAndReturn(run func() error) *MockCache_DeleteAll_Call

type MockCache_Delete_Call

type MockCache_Delete_Call struct {
	*mock.Call
}

MockCache_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockCache_Delete_Call) Return

func (*MockCache_Delete_Call) Run

func (_c *MockCache_Delete_Call) Run(run func(key string)) *MockCache_Delete_Call

func (*MockCache_Delete_Call) RunAndReturn

func (_c *MockCache_Delete_Call) RunAndReturn(run func(string) error) *MockCache_Delete_Call

type MockCache_Expecter

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

func (*MockCache_Expecter) Delete

func (_e *MockCache_Expecter) Delete(key interface{}) *MockCache_Delete_Call

Delete is a helper method to define mock.On call

  • key string

func (*MockCache_Expecter) DeleteAll

DeleteAll is a helper method to define mock.On call

func (*MockCache_Expecter) Get

func (_e *MockCache_Expecter) Get(key interface{}) *MockCache_Get_Call

Get is a helper method to define mock.On call

  • key string

func (*MockCache_Expecter) Set

func (_e *MockCache_Expecter) Set(key interface{}, value interface{}) *MockCache_Set_Call

Set is a helper method to define mock.On call

  • key string
  • value interface{}

func (*MockCache_Expecter) Shutdown

Shutdown is a helper method to define mock.On call

type MockCache_Get_Call

type MockCache_Get_Call struct {
	*mock.Call
}

MockCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockCache_Get_Call) Return

func (_c *MockCache_Get_Call) Return(value string, err error) *MockCache_Get_Call

func (*MockCache_Get_Call) Run

func (_c *MockCache_Get_Call) Run(run func(key string)) *MockCache_Get_Call

func (*MockCache_Get_Call) RunAndReturn

func (_c *MockCache_Get_Call) RunAndReturn(run func(string) (string, error)) *MockCache_Get_Call

type MockCache_Set_Call

type MockCache_Set_Call struct {
	*mock.Call
}

MockCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'

func (*MockCache_Set_Call) Return

func (_c *MockCache_Set_Call) Return(err error) *MockCache_Set_Call

func (*MockCache_Set_Call) Run

func (_c *MockCache_Set_Call) Run(run func(key string, value interface{})) *MockCache_Set_Call

func (*MockCache_Set_Call) RunAndReturn

func (_c *MockCache_Set_Call) RunAndReturn(run func(string, interface{}) error) *MockCache_Set_Call

type MockCache_Shutdown_Call

type MockCache_Shutdown_Call struct {
	*mock.Call
}

MockCache_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'

func (*MockCache_Shutdown_Call) Return

func (*MockCache_Shutdown_Call) Run

func (_c *MockCache_Shutdown_Call) Run(run func()) *MockCache_Shutdown_Call

func (*MockCache_Shutdown_Call) RunAndReturn

func (_c *MockCache_Shutdown_Call) RunAndReturn(run func() error) *MockCache_Shutdown_Call

type MockDataBase

type MockDataBase struct {
	mock.Mock
}

MockDataBase is an autogenerated mock type for the DataBase type

func NewMockDataBase

func NewMockDataBase(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDataBase

NewMockDataBase creates a new instance of MockDataBase. 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 (*MockDataBase) EXPECT

func (_m *MockDataBase) EXPECT() *MockDataBase_Expecter

func (*MockDataBase) Shutdown

func (_m *MockDataBase) Shutdown(ctx context.Context, logger logging.Logger)

Shutdown provides a mock function with given fields: ctx, logger

type MockDataBase_Expecter

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

func (*MockDataBase_Expecter) Shutdown

func (_e *MockDataBase_Expecter) Shutdown(ctx interface{}, logger interface{}) *MockDataBase_Shutdown_Call

Shutdown is a helper method to define mock.On call

  • ctx context.Context
  • logger logging.Logger

type MockDataBase_Shutdown_Call

type MockDataBase_Shutdown_Call struct {
	*mock.Call
}

MockDataBase_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'

func (*MockDataBase_Shutdown_Call) Return

func (*MockDataBase_Shutdown_Call) Run

func (*MockDataBase_Shutdown_Call) RunAndReturn

type MockStatus

type MockStatus struct {
	mock.Mock
}

MockStatus is an autogenerated mock type for the Status type

func NewMockStatus

func NewMockStatus(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStatus

NewMockStatus creates a new instance of MockStatus. 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 (*MockStatus) EXPECT

func (_m *MockStatus) EXPECT() *MockStatus_Expecter

func (*MockStatus) GetStatus

func (_m *MockStatus) GetStatus() (bool, error)

GetStatus provides a mock function with given fields:

type MockStatus_Expecter

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

func (*MockStatus_Expecter) GetStatus

GetStatus is a helper method to define mock.On call

type MockStatus_GetStatus_Call

type MockStatus_GetStatus_Call struct {
	*mock.Call
}

MockStatus_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'

func (*MockStatus_GetStatus_Call) Return

func (*MockStatus_GetStatus_Call) Run

func (*MockStatus_GetStatus_Call) RunAndReturn

func (_c *MockStatus_GetStatus_Call) RunAndReturn(run func() (bool, error)) *MockStatus_GetStatus_Call

type MockWarning

type MockWarning struct {
	mock.Mock
}

MockWarning is an autogenerated mock type for the Warning type

func NewMockWarning

func NewMockWarning(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWarning

NewMockWarning creates a new instance of MockWarning. 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 (*MockWarning) Create

func (_m *MockWarning) Create(in *warning.WarningCreate) (string, error)

Create provides a mock function with given fields: in

func (*MockWarning) EXPECT

func (_m *MockWarning) EXPECT() *MockWarning_Expecter

func (*MockWarning) GetOne

func (_m *MockWarning) GetOne(out *warning.WarningCreate) error

GetOne provides a mock function with given fields: out

type MockWarning_Create_Call

type MockWarning_Create_Call struct {
	*mock.Call
}

MockWarning_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*MockWarning_Create_Call) Return

func (*MockWarning_Create_Call) Run

func (*MockWarning_Create_Call) RunAndReturn

type MockWarning_Expecter

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

func (*MockWarning_Expecter) Create

func (_e *MockWarning_Expecter) Create(in interface{}) *MockWarning_Create_Call

Create is a helper method to define mock.On call

  • in *warning.WarningCreate

func (*MockWarning_Expecter) GetOne

func (_e *MockWarning_Expecter) GetOne(out interface{}) *MockWarning_GetOne_Call

GetOne is a helper method to define mock.On call

  • out *warning.WarningCreate

type MockWarning_GetOne_Call

type MockWarning_GetOne_Call struct {
	*mock.Call
}

MockWarning_GetOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOne'

func (*MockWarning_GetOne_Call) Return

func (*MockWarning_GetOne_Call) Run

func (*MockWarning_GetOne_Call) RunAndReturn

type Repository

type Repository struct {
	DataBase DataBase

	Cache
	Status
	Warning
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(ctx context.Context, logger logging.Logger, cfg *config.Config, database DataBase, cache Cache) *Repository

func (*Repository) Stop

func (r *Repository) Stop()

type Status

type Status interface {
	GetStatus() (status bool, err error)
}

type Warning

type Warning interface {
	Create(in *warning.WarningCreate) (id string, err error)
	GetOne(out *warning.WarningCreate) (err error)
}

Directories

Path Synopsis
cache

Jump to

Keyboard shortcuts

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