mocks

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	mock.Mock
}

RedisClient is an autogenerated mock type for the RedisClient type

func NewRedisClient

func NewRedisClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *RedisClient

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

func (_m *RedisClient) EXPECT() *RedisClient_Expecter

func (*RedisClient) Get

func (_m *RedisClient) Get(ctx context.Context, key string) *redis.StringCmd

Get provides a mock function with given fields: ctx, key

func (*RedisClient) Set

func (_m *RedisClient) Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd

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

type RedisClient_Expecter

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

func (*RedisClient_Expecter) Get

func (_e *RedisClient_Expecter) Get(ctx interface{}, key interface{}) *RedisClient_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*RedisClient_Expecter) Set

func (_e *RedisClient_Expecter) Set(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *RedisClient_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value any
  • expiration time.Duration

type RedisClient_Get_Call

type RedisClient_Get_Call struct {
	*mock.Call
}

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

func (*RedisClient_Get_Call) Return

func (*RedisClient_Get_Call) Run

func (_c *RedisClient_Get_Call) Run(run func(ctx context.Context, key string)) *RedisClient_Get_Call

func (*RedisClient_Get_Call) RunAndReturn

type RedisClient_Set_Call

type RedisClient_Set_Call struct {
	*mock.Call
}

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

func (*RedisClient_Set_Call) Return

func (*RedisClient_Set_Call) Run

func (_c *RedisClient_Set_Call) Run(run func(ctx context.Context, key string, value any, expiration time.Duration)) *RedisClient_Set_Call

func (*RedisClient_Set_Call) RunAndReturn

type Repository

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository

func NewRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *Repository

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

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) Get

func (_m *Repository) Get(from time.Time, to time.Time) (repository.Measurements, error)

Get provides a mock function with given fields: from, to

func (*Repository) GetDataRange

func (_m *Repository) GetDataRange() (time.Time, time.Time, error)

GetDataRange provides a mock function with no fields

type Repository_Expecter

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

func (*Repository_Expecter) Get

func (_e *Repository_Expecter) Get(from interface{}, to interface{}) *Repository_Get_Call

Get is a helper method to define mock.On call

  • from time.Time
  • to time.Time

func (*Repository_Expecter) GetDataRange

GetDataRange is a helper method to define mock.On call

type Repository_GetDataRange_Call

type Repository_GetDataRange_Call struct {
	*mock.Call
}

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

func (*Repository_GetDataRange_Call) Return

func (*Repository_GetDataRange_Call) Run

func (*Repository_GetDataRange_Call) RunAndReturn

type Repository_Get_Call

type Repository_Get_Call struct {
	*mock.Call
}

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

func (*Repository_Get_Call) Return

func (*Repository_Get_Call) Run

func (_c *Repository_Get_Call) Run(run func(from time.Time, to time.Time)) *Repository_Get_Call

func (*Repository_Get_Call) RunAndReturn

Jump to

Keyboard shortcuts

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