redis

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KeepTTL = redis.KeepTTL // Used to retain the existing TTL (time to live) of a key when modifying its value in Redis

)

Variables

View Source
var (
	ErrFailToSetValue = newError("fail to set value")

	ErrUnsupportedInputType = newError("unsupported input type")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Ping(ctx context.Context) error

	Do(ctx context.Context, cmd string, args ...interface{}) (interface{}, error)

	DoInBatch(ctx context.Context, fn func(cmder Commander) error) error

	Close() error

	Delete(ctx context.Context, key string) (int64, error)

	Expire(ctx context.Context, key string, expiration time.Duration) (bool, error)

	SetString(ctx context.Context, key string, value string, expiration time.Duration) error

	SetStringIfNotExist(ctx context.Context, key string, value string, expiration time.Duration) error

	SetStringIfExist(ctx context.Context, key string, value string, expiration time.Duration) error

	SetInt(ctx context.Context, key string, value int64, expiration time.Duration) error

	SetIntIfNotExist(ctx context.Context, key string, value int64, expiration time.Duration) error

	SetIntIfExist(ctx context.Context, key string, value int64, expiration time.Duration) error

	IncrementBy(ctx context.Context, key string, value int64) (int64, error)

	DecrementBy(ctx context.Context, key string, value int64) (int64, error)

	SetFloat(ctx context.Context, key string, value float64, expiration time.Duration) error

	SetFloatIfNotExist(ctx context.Context, key string, value float64, expiration time.Duration) error

	SetFloatIfExist(ctx context.Context, key string, value float64, expiration time.Duration) error

	IncrementFloatBy(ctx context.Context, key string, value float64) (float64, error)

	GetString(ctx context.Context, key string) (string, error)

	GetInt(ctx context.Context, key string) (int64, error)

	GetFloat(ctx context.Context, key string) (float64, error)

	HashSet(ctx context.Context, key string, value interface{}) error

	HashGetAll(ctx context.Context, key string, out interface{}) error

	HashGetField(ctx context.Context, key string, field string, out interface{}) error
}

Client represents redis client interface

func NewClient

func NewClient(url string) (Client, error)

NewClient creates new redis client

Examples:

client, err := NewClient("redis://user:password@localhost:6379/0?protocol=3")

func NewClientWithTLS

func NewClientWithTLS(url string, tlsConfig *tls.Config) (Client, error)

NewClientWithTLS creates new redis client with TLS configuration

type Commander

type Commander interface {
	Discard()

	Execute(ctx context.Context) error

	Delete(ctx context.Context, key string) (int64, error)

	Expire(ctx context.Context, key string, expiration time.Duration) (bool, error)

	SetString(ctx context.Context, key string, value string, expiration time.Duration) error

	SetStringIfNotExist(ctx context.Context, key string, value string, expiration time.Duration) error

	SetStringIfExist(ctx context.Context, key string, value string, expiration time.Duration) error

	GetString(ctx context.Context, key string) (string, error)

	SetInt(ctx context.Context, key string, value int64, expiration time.Duration) error

	SetIntIfNotExist(ctx context.Context, key string, value int64, expiration time.Duration) error

	SetIntIfExist(ctx context.Context, key string, value int64, expiration time.Duration) error

	IncrementBy(ctx context.Context, key string, value int64) (int64, error)

	DecrementBy(ctx context.Context, key string, value int64) (int64, error)

	GetInt(ctx context.Context, key string) (int64, error)

	SetFloat(ctx context.Context, key string, value float64, expiration time.Duration) error

	SetFloatIfNotExist(ctx context.Context, key string, value float64, expiration time.Duration) error

	SetFloatIfExist(ctx context.Context, key string, value float64, expiration time.Duration) error

	IncrementFloatBy(ctx context.Context, key string, value float64) (float64, error)

	GetFloat(ctx context.Context, key string) (float64, error)

	HashSet(ctx context.Context, key string, value interface{}) error

	HashGetAll(ctx context.Context, key string, out interface{}) error

	HashGetField(ctx context.Context, key string, field string, out interface{}) error
}

Commander represents redis pipeline supported commands

type Error

type Error string

Error represents an error in redis package suppose to determine expected or unexpected error in another service

func (Error) Error

func (e Error) Error() string

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. 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 (*MockClient) Close

func (_m *MockClient) Close() error

Close provides a mock function with no fields

func (*MockClient) DecrementBy

func (_m *MockClient) DecrementBy(ctx context.Context, key string, value int64) (int64, error)

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

func (*MockClient) Delete

func (_m *MockClient) Delete(ctx context.Context, key string) (int64, error)

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

func (*MockClient) Do

func (_m *MockClient) Do(ctx context.Context, cmd string, args ...interface{}) (interface{}, error)

Do provides a mock function with given fields: ctx, cmd, args

func (*MockClient) DoInBatch

func (_m *MockClient) DoInBatch(ctx context.Context, fn func(Commander) error) error

DoInBatch provides a mock function with given fields: ctx, fn

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Expire

func (_m *MockClient) Expire(ctx context.Context, key string, expiration time.Duration) (bool, error)

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

func (*MockClient) GetFloat

func (_m *MockClient) GetFloat(ctx context.Context, key string) (float64, error)

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

func (*MockClient) GetInt

func (_m *MockClient) GetInt(ctx context.Context, key string) (int64, error)

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

func (*MockClient) GetString

func (_m *MockClient) GetString(ctx context.Context, key string) (string, error)

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

func (*MockClient) HashGetAll

func (_m *MockClient) HashGetAll(ctx context.Context, key string, out interface{}) error

HashGetAll provides a mock function with given fields: ctx, key, out

func (*MockClient) HashGetField

func (_m *MockClient) HashGetField(ctx context.Context, key string, field string, out interface{}) error

HashGetField provides a mock function with given fields: ctx, key, field, out

func (*MockClient) HashSet

func (_m *MockClient) HashSet(ctx context.Context, key string, value interface{}) error

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

func (*MockClient) IncrementBy

func (_m *MockClient) IncrementBy(ctx context.Context, key string, value int64) (int64, error)

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

func (*MockClient) IncrementFloatBy

func (_m *MockClient) IncrementFloatBy(ctx context.Context, key string, value float64) (float64, error)

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

func (*MockClient) Ping

func (_m *MockClient) Ping(ctx context.Context) error

Ping provides a mock function with given fields: ctx

func (*MockClient) SetFloat

func (_m *MockClient) SetFloat(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockClient) SetFloatIfExist

func (_m *MockClient) SetFloatIfExist(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockClient) SetFloatIfNotExist

func (_m *MockClient) SetFloatIfNotExist(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockClient) SetInt

func (_m *MockClient) SetInt(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockClient) SetIntIfExist

func (_m *MockClient) SetIntIfExist(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockClient) SetIntIfNotExist

func (_m *MockClient) SetIntIfNotExist(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockClient) SetString

func (_m *MockClient) SetString(ctx context.Context, key string, value string, expiration time.Duration) error

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

func (*MockClient) SetStringIfExist

func (_m *MockClient) SetStringIfExist(ctx context.Context, key string, value string, expiration time.Duration) error

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

func (*MockClient) SetStringIfNotExist

func (_m *MockClient) SetStringIfNotExist(ctx context.Context, key string, value string, expiration time.Duration) error

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

type MockClient_Close_Call

type MockClient_Close_Call struct {
	*mock.Call
}

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

func (*MockClient_Close_Call) Return

func (*MockClient_Close_Call) Run

func (_c *MockClient_Close_Call) Run(run func()) *MockClient_Close_Call

func (*MockClient_Close_Call) RunAndReturn

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

type MockClient_DecrementBy_Call

type MockClient_DecrementBy_Call struct {
	*mock.Call
}

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

func (*MockClient_DecrementBy_Call) Return

func (*MockClient_DecrementBy_Call) Run

func (*MockClient_DecrementBy_Call) RunAndReturn

type MockClient_Delete_Call

type MockClient_Delete_Call struct {
	*mock.Call
}

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

func (*MockClient_Delete_Call) Return

func (*MockClient_Delete_Call) Run

func (*MockClient_Delete_Call) RunAndReturn

type MockClient_DoInBatch_Call

type MockClient_DoInBatch_Call struct {
	*mock.Call
}

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

func (*MockClient_DoInBatch_Call) Return

func (*MockClient_DoInBatch_Call) Run

func (*MockClient_DoInBatch_Call) RunAndReturn

type MockClient_Do_Call

type MockClient_Do_Call struct {
	*mock.Call
}

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

func (*MockClient_Do_Call) Return

func (_c *MockClient_Do_Call) Return(_a0 interface{}, _a1 error) *MockClient_Do_Call

func (*MockClient_Do_Call) Run

func (_c *MockClient_Do_Call) Run(run func(ctx context.Context, cmd string, args ...interface{})) *MockClient_Do_Call

func (*MockClient_Do_Call) RunAndReturn

func (_c *MockClient_Do_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (interface{}, error)) *MockClient_Do_Call

type MockClient_Expecter

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

func (*MockClient_Expecter) Close

Close is a helper method to define mock.On call

func (*MockClient_Expecter) DecrementBy

func (_e *MockClient_Expecter) DecrementBy(ctx interface{}, key interface{}, value interface{}) *MockClient_DecrementBy_Call

DecrementBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value int64

func (*MockClient_Expecter) Delete

func (_e *MockClient_Expecter) Delete(ctx interface{}, key interface{}) *MockClient_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockClient_Expecter) Do

func (_e *MockClient_Expecter) Do(ctx interface{}, cmd interface{}, args ...interface{}) *MockClient_Do_Call

Do is a helper method to define mock.On call

  • ctx context.Context
  • cmd string
  • args ...interface{}

func (*MockClient_Expecter) DoInBatch

func (_e *MockClient_Expecter) DoInBatch(ctx interface{}, fn interface{}) *MockClient_DoInBatch_Call

DoInBatch is a helper method to define mock.On call

  • ctx context.Context
  • fn func(Commander) error

func (*MockClient_Expecter) Expire

func (_e *MockClient_Expecter) Expire(ctx interface{}, key interface{}, expiration interface{}) *MockClient_Expire_Call

Expire is a helper method to define mock.On call

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

func (*MockClient_Expecter) GetFloat

func (_e *MockClient_Expecter) GetFloat(ctx interface{}, key interface{}) *MockClient_GetFloat_Call

GetFloat is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockClient_Expecter) GetInt

func (_e *MockClient_Expecter) GetInt(ctx interface{}, key interface{}) *MockClient_GetInt_Call

GetInt is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockClient_Expecter) GetString

func (_e *MockClient_Expecter) GetString(ctx interface{}, key interface{}) *MockClient_GetString_Call

GetString is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockClient_Expecter) HashGetAll

func (_e *MockClient_Expecter) HashGetAll(ctx interface{}, key interface{}, out interface{}) *MockClient_HashGetAll_Call

HashGetAll is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • out interface{}

func (*MockClient_Expecter) HashGetField

func (_e *MockClient_Expecter) HashGetField(ctx interface{}, key interface{}, field interface{}, out interface{}) *MockClient_HashGetField_Call

HashGetField is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • field string
  • out interface{}

func (*MockClient_Expecter) HashSet

func (_e *MockClient_Expecter) HashSet(ctx interface{}, key interface{}, value interface{}) *MockClient_HashSet_Call

HashSet is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value interface{}

func (*MockClient_Expecter) IncrementBy

func (_e *MockClient_Expecter) IncrementBy(ctx interface{}, key interface{}, value interface{}) *MockClient_IncrementBy_Call

IncrementBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value int64

func (*MockClient_Expecter) IncrementFloatBy

func (_e *MockClient_Expecter) IncrementFloatBy(ctx interface{}, key interface{}, value interface{}) *MockClient_IncrementFloatBy_Call

IncrementFloatBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value float64

func (*MockClient_Expecter) Ping

func (_e *MockClient_Expecter) Ping(ctx interface{}) *MockClient_Ping_Call

Ping is a helper method to define mock.On call

  • ctx context.Context

func (*MockClient_Expecter) SetFloat

func (_e *MockClient_Expecter) SetFloat(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetFloat_Call

SetFloat is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetFloatIfExist

func (_e *MockClient_Expecter) SetFloatIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetFloatIfExist_Call

SetFloatIfExist is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetFloatIfNotExist

func (_e *MockClient_Expecter) SetFloatIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetFloatIfNotExist_Call

SetFloatIfNotExist is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetInt

func (_e *MockClient_Expecter) SetInt(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetInt_Call

SetInt is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetIntIfExist

func (_e *MockClient_Expecter) SetIntIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetIntIfExist_Call

SetIntIfExist is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetIntIfNotExist

func (_e *MockClient_Expecter) SetIntIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetIntIfNotExist_Call

SetIntIfNotExist is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetString

func (_e *MockClient_Expecter) SetString(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetString_Call

SetString is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetStringIfExist

func (_e *MockClient_Expecter) SetStringIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetStringIfExist_Call

SetStringIfExist is a helper method to define mock.On call

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

func (*MockClient_Expecter) SetStringIfNotExist

func (_e *MockClient_Expecter) SetStringIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockClient_SetStringIfNotExist_Call

SetStringIfNotExist is a helper method to define mock.On call

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

type MockClient_Expire_Call

type MockClient_Expire_Call struct {
	*mock.Call
}

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

func (*MockClient_Expire_Call) Return

func (*MockClient_Expire_Call) Run

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

func (*MockClient_Expire_Call) RunAndReturn

type MockClient_GetFloat_Call

type MockClient_GetFloat_Call struct {
	*mock.Call
}

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

func (*MockClient_GetFloat_Call) Return

func (*MockClient_GetFloat_Call) Run

func (*MockClient_GetFloat_Call) RunAndReturn

type MockClient_GetInt_Call

type MockClient_GetInt_Call struct {
	*mock.Call
}

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

func (*MockClient_GetInt_Call) Return

func (*MockClient_GetInt_Call) Run

func (*MockClient_GetInt_Call) RunAndReturn

type MockClient_GetString_Call

type MockClient_GetString_Call struct {
	*mock.Call
}

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

func (*MockClient_GetString_Call) Return

func (*MockClient_GetString_Call) Run

func (*MockClient_GetString_Call) RunAndReturn

type MockClient_HashGetAll_Call

type MockClient_HashGetAll_Call struct {
	*mock.Call
}

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

func (*MockClient_HashGetAll_Call) Return

func (*MockClient_HashGetAll_Call) Run

func (_c *MockClient_HashGetAll_Call) Run(run func(ctx context.Context, key string, out interface{})) *MockClient_HashGetAll_Call

func (*MockClient_HashGetAll_Call) RunAndReturn

func (_c *MockClient_HashGetAll_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *MockClient_HashGetAll_Call

type MockClient_HashGetField_Call

type MockClient_HashGetField_Call struct {
	*mock.Call
}

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

func (*MockClient_HashGetField_Call) Return

func (*MockClient_HashGetField_Call) Run

func (_c *MockClient_HashGetField_Call) Run(run func(ctx context.Context, key string, field string, out interface{})) *MockClient_HashGetField_Call

func (*MockClient_HashGetField_Call) RunAndReturn

func (_c *MockClient_HashGetField_Call) RunAndReturn(run func(context.Context, string, string, interface{}) error) *MockClient_HashGetField_Call

type MockClient_HashSet_Call

type MockClient_HashSet_Call struct {
	*mock.Call
}

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

func (*MockClient_HashSet_Call) Return

func (*MockClient_HashSet_Call) Run

func (_c *MockClient_HashSet_Call) Run(run func(ctx context.Context, key string, value interface{})) *MockClient_HashSet_Call

func (*MockClient_HashSet_Call) RunAndReturn

func (_c *MockClient_HashSet_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *MockClient_HashSet_Call

type MockClient_IncrementBy_Call

type MockClient_IncrementBy_Call struct {
	*mock.Call
}

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

func (*MockClient_IncrementBy_Call) Return

func (*MockClient_IncrementBy_Call) Run

func (*MockClient_IncrementBy_Call) RunAndReturn

type MockClient_IncrementFloatBy_Call

type MockClient_IncrementFloatBy_Call struct {
	*mock.Call
}

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

func (*MockClient_IncrementFloatBy_Call) Return

func (*MockClient_IncrementFloatBy_Call) Run

func (*MockClient_IncrementFloatBy_Call) RunAndReturn

type MockClient_Ping_Call

type MockClient_Ping_Call struct {
	*mock.Call
}

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

func (*MockClient_Ping_Call) Return

func (*MockClient_Ping_Call) Run

func (_c *MockClient_Ping_Call) Run(run func(ctx context.Context)) *MockClient_Ping_Call

func (*MockClient_Ping_Call) RunAndReturn

func (_c *MockClient_Ping_Call) RunAndReturn(run func(context.Context) error) *MockClient_Ping_Call

type MockClient_SetFloatIfExist_Call

type MockClient_SetFloatIfExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetFloatIfExist_Call) Return

func (*MockClient_SetFloatIfExist_Call) Run

func (*MockClient_SetFloatIfExist_Call) RunAndReturn

type MockClient_SetFloatIfNotExist_Call

type MockClient_SetFloatIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetFloatIfNotExist_Call) Return

func (*MockClient_SetFloatIfNotExist_Call) Run

func (*MockClient_SetFloatIfNotExist_Call) RunAndReturn

type MockClient_SetFloat_Call

type MockClient_SetFloat_Call struct {
	*mock.Call
}

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

func (*MockClient_SetFloat_Call) Return

func (*MockClient_SetFloat_Call) Run

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

func (*MockClient_SetFloat_Call) RunAndReturn

type MockClient_SetIntIfExist_Call

type MockClient_SetIntIfExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetIntIfExist_Call) Return

func (*MockClient_SetIntIfExist_Call) Run

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

func (*MockClient_SetIntIfExist_Call) RunAndReturn

type MockClient_SetIntIfNotExist_Call

type MockClient_SetIntIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetIntIfNotExist_Call) Return

func (*MockClient_SetIntIfNotExist_Call) Run

func (*MockClient_SetIntIfNotExist_Call) RunAndReturn

type MockClient_SetInt_Call

type MockClient_SetInt_Call struct {
	*mock.Call
}

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

func (*MockClient_SetInt_Call) Return

func (*MockClient_SetInt_Call) Run

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

func (*MockClient_SetInt_Call) RunAndReturn

type MockClient_SetStringIfExist_Call

type MockClient_SetStringIfExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetStringIfExist_Call) Return

func (*MockClient_SetStringIfExist_Call) Run

func (*MockClient_SetStringIfExist_Call) RunAndReturn

type MockClient_SetStringIfNotExist_Call

type MockClient_SetStringIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockClient_SetStringIfNotExist_Call) Return

func (*MockClient_SetStringIfNotExist_Call) Run

func (*MockClient_SetStringIfNotExist_Call) RunAndReturn

type MockClient_SetString_Call

type MockClient_SetString_Call struct {
	*mock.Call
}

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

func (*MockClient_SetString_Call) Return

func (*MockClient_SetString_Call) Run

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

func (*MockClient_SetString_Call) RunAndReturn

type MockCommander

type MockCommander struct {
	mock.Mock
}

MockCommander is an autogenerated mock type for the Commander type

func NewMockCommander

func NewMockCommander(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCommander

NewMockCommander creates a new instance of MockCommander. 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 (*MockCommander) DecrementBy

func (_m *MockCommander) DecrementBy(ctx context.Context, key string, value int64) (int64, error)

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

func (*MockCommander) Delete

func (_m *MockCommander) Delete(ctx context.Context, key string) (int64, error)

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

func (*MockCommander) Discard

func (_m *MockCommander) Discard()

Discard provides a mock function with no fields

func (*MockCommander) EXPECT

func (_m *MockCommander) EXPECT() *MockCommander_Expecter

func (*MockCommander) Execute

func (_m *MockCommander) Execute(ctx context.Context) error

Execute provides a mock function with given fields: ctx

func (*MockCommander) Expire

func (_m *MockCommander) Expire(ctx context.Context, key string, expiration time.Duration) (bool, error)

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

func (*MockCommander) GetFloat

func (_m *MockCommander) GetFloat(ctx context.Context, key string) (float64, error)

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

func (*MockCommander) GetInt

func (_m *MockCommander) GetInt(ctx context.Context, key string) (int64, error)

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

func (*MockCommander) GetString

func (_m *MockCommander) GetString(ctx context.Context, key string) (string, error)

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

func (*MockCommander) HashGetAll

func (_m *MockCommander) HashGetAll(ctx context.Context, key string, out interface{}) error

HashGetAll provides a mock function with given fields: ctx, key, out

func (*MockCommander) HashGetField

func (_m *MockCommander) HashGetField(ctx context.Context, key string, field string, out interface{}) error

HashGetField provides a mock function with given fields: ctx, key, field, out

func (*MockCommander) HashSet

func (_m *MockCommander) HashSet(ctx context.Context, key string, value interface{}) error

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

func (*MockCommander) IncrementBy

func (_m *MockCommander) IncrementBy(ctx context.Context, key string, value int64) (int64, error)

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

func (*MockCommander) IncrementFloatBy

func (_m *MockCommander) IncrementFloatBy(ctx context.Context, key string, value float64) (float64, error)

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

func (*MockCommander) SetFloat

func (_m *MockCommander) SetFloat(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockCommander) SetFloatIfExist

func (_m *MockCommander) SetFloatIfExist(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockCommander) SetFloatIfNotExist

func (_m *MockCommander) SetFloatIfNotExist(ctx context.Context, key string, value float64, expiration time.Duration) error

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

func (*MockCommander) SetInt

func (_m *MockCommander) SetInt(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockCommander) SetIntIfExist

func (_m *MockCommander) SetIntIfExist(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockCommander) SetIntIfNotExist

func (_m *MockCommander) SetIntIfNotExist(ctx context.Context, key string, value int64, expiration time.Duration) error

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

func (*MockCommander) SetString

func (_m *MockCommander) SetString(ctx context.Context, key string, value string, expiration time.Duration) error

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

func (*MockCommander) SetStringIfExist

func (_m *MockCommander) SetStringIfExist(ctx context.Context, key string, value string, expiration time.Duration) error

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

func (*MockCommander) SetStringIfNotExist

func (_m *MockCommander) SetStringIfNotExist(ctx context.Context, key string, value string, expiration time.Duration) error

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

type MockCommander_DecrementBy_Call

type MockCommander_DecrementBy_Call struct {
	*mock.Call
}

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

func (*MockCommander_DecrementBy_Call) Return

func (*MockCommander_DecrementBy_Call) Run

func (*MockCommander_DecrementBy_Call) RunAndReturn

type MockCommander_Delete_Call

type MockCommander_Delete_Call struct {
	*mock.Call
}

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

func (*MockCommander_Delete_Call) Return

func (*MockCommander_Delete_Call) Run

func (*MockCommander_Delete_Call) RunAndReturn

type MockCommander_Discard_Call

type MockCommander_Discard_Call struct {
	*mock.Call
}

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

func (*MockCommander_Discard_Call) Return

func (*MockCommander_Discard_Call) Run

func (*MockCommander_Discard_Call) RunAndReturn

func (_c *MockCommander_Discard_Call) RunAndReturn(run func()) *MockCommander_Discard_Call

type MockCommander_Execute_Call

type MockCommander_Execute_Call struct {
	*mock.Call
}

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

func (*MockCommander_Execute_Call) Return

func (*MockCommander_Execute_Call) Run

func (*MockCommander_Execute_Call) RunAndReturn

type MockCommander_Expecter

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

func (*MockCommander_Expecter) DecrementBy

func (_e *MockCommander_Expecter) DecrementBy(ctx interface{}, key interface{}, value interface{}) *MockCommander_DecrementBy_Call

DecrementBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value int64

func (*MockCommander_Expecter) Delete

func (_e *MockCommander_Expecter) Delete(ctx interface{}, key interface{}) *MockCommander_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCommander_Expecter) Discard

Discard is a helper method to define mock.On call

func (*MockCommander_Expecter) Execute

func (_e *MockCommander_Expecter) Execute(ctx interface{}) *MockCommander_Execute_Call

Execute is a helper method to define mock.On call

  • ctx context.Context

func (*MockCommander_Expecter) Expire

func (_e *MockCommander_Expecter) Expire(ctx interface{}, key interface{}, expiration interface{}) *MockCommander_Expire_Call

Expire is a helper method to define mock.On call

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

func (*MockCommander_Expecter) GetFloat

func (_e *MockCommander_Expecter) GetFloat(ctx interface{}, key interface{}) *MockCommander_GetFloat_Call

GetFloat is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCommander_Expecter) GetInt

func (_e *MockCommander_Expecter) GetInt(ctx interface{}, key interface{}) *MockCommander_GetInt_Call

GetInt is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCommander_Expecter) GetString

func (_e *MockCommander_Expecter) GetString(ctx interface{}, key interface{}) *MockCommander_GetString_Call

GetString is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCommander_Expecter) HashGetAll

func (_e *MockCommander_Expecter) HashGetAll(ctx interface{}, key interface{}, out interface{}) *MockCommander_HashGetAll_Call

HashGetAll is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • out interface{}

func (*MockCommander_Expecter) HashGetField

func (_e *MockCommander_Expecter) HashGetField(ctx interface{}, key interface{}, field interface{}, out interface{}) *MockCommander_HashGetField_Call

HashGetField is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • field string
  • out interface{}

func (*MockCommander_Expecter) HashSet

func (_e *MockCommander_Expecter) HashSet(ctx interface{}, key interface{}, value interface{}) *MockCommander_HashSet_Call

HashSet is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value interface{}

func (*MockCommander_Expecter) IncrementBy

func (_e *MockCommander_Expecter) IncrementBy(ctx interface{}, key interface{}, value interface{}) *MockCommander_IncrementBy_Call

IncrementBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value int64

func (*MockCommander_Expecter) IncrementFloatBy

func (_e *MockCommander_Expecter) IncrementFloatBy(ctx interface{}, key interface{}, value interface{}) *MockCommander_IncrementFloatBy_Call

IncrementFloatBy is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value float64

func (*MockCommander_Expecter) SetFloat

func (_e *MockCommander_Expecter) SetFloat(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetFloat_Call

SetFloat is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetFloatIfExist

func (_e *MockCommander_Expecter) SetFloatIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetFloatIfExist_Call

SetFloatIfExist is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetFloatIfNotExist

func (_e *MockCommander_Expecter) SetFloatIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetFloatIfNotExist_Call

SetFloatIfNotExist is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetInt

func (_e *MockCommander_Expecter) SetInt(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetInt_Call

SetInt is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetIntIfExist

func (_e *MockCommander_Expecter) SetIntIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetIntIfExist_Call

SetIntIfExist is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetIntIfNotExist

func (_e *MockCommander_Expecter) SetIntIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetIntIfNotExist_Call

SetIntIfNotExist is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetString

func (_e *MockCommander_Expecter) SetString(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetString_Call

SetString is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetStringIfExist

func (_e *MockCommander_Expecter) SetStringIfExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetStringIfExist_Call

SetStringIfExist is a helper method to define mock.On call

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

func (*MockCommander_Expecter) SetStringIfNotExist

func (_e *MockCommander_Expecter) SetStringIfNotExist(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *MockCommander_SetStringIfNotExist_Call

SetStringIfNotExist is a helper method to define mock.On call

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

type MockCommander_Expire_Call

type MockCommander_Expire_Call struct {
	*mock.Call
}

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

func (*MockCommander_Expire_Call) Return

func (*MockCommander_Expire_Call) Run

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

func (*MockCommander_Expire_Call) RunAndReturn

type MockCommander_GetFloat_Call

type MockCommander_GetFloat_Call struct {
	*mock.Call
}

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

func (*MockCommander_GetFloat_Call) Return

func (*MockCommander_GetFloat_Call) Run

func (*MockCommander_GetFloat_Call) RunAndReturn

type MockCommander_GetInt_Call

type MockCommander_GetInt_Call struct {
	*mock.Call
}

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

func (*MockCommander_GetInt_Call) Return

func (*MockCommander_GetInt_Call) Run

func (*MockCommander_GetInt_Call) RunAndReturn

type MockCommander_GetString_Call

type MockCommander_GetString_Call struct {
	*mock.Call
}

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

func (*MockCommander_GetString_Call) Return

func (*MockCommander_GetString_Call) Run

func (*MockCommander_GetString_Call) RunAndReturn

type MockCommander_HashGetAll_Call

type MockCommander_HashGetAll_Call struct {
	*mock.Call
}

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

func (*MockCommander_HashGetAll_Call) Return

func (*MockCommander_HashGetAll_Call) Run

func (_c *MockCommander_HashGetAll_Call) Run(run func(ctx context.Context, key string, out interface{})) *MockCommander_HashGetAll_Call

func (*MockCommander_HashGetAll_Call) RunAndReturn

func (_c *MockCommander_HashGetAll_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *MockCommander_HashGetAll_Call

type MockCommander_HashGetField_Call

type MockCommander_HashGetField_Call struct {
	*mock.Call
}

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

func (*MockCommander_HashGetField_Call) Return

func (*MockCommander_HashGetField_Call) Run

func (_c *MockCommander_HashGetField_Call) Run(run func(ctx context.Context, key string, field string, out interface{})) *MockCommander_HashGetField_Call

func (*MockCommander_HashGetField_Call) RunAndReturn

type MockCommander_HashSet_Call

type MockCommander_HashSet_Call struct {
	*mock.Call
}

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

func (*MockCommander_HashSet_Call) Return

func (*MockCommander_HashSet_Call) Run

func (_c *MockCommander_HashSet_Call) Run(run func(ctx context.Context, key string, value interface{})) *MockCommander_HashSet_Call

func (*MockCommander_HashSet_Call) RunAndReturn

func (_c *MockCommander_HashSet_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *MockCommander_HashSet_Call

type MockCommander_IncrementBy_Call

type MockCommander_IncrementBy_Call struct {
	*mock.Call
}

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

func (*MockCommander_IncrementBy_Call) Return

func (*MockCommander_IncrementBy_Call) Run

func (*MockCommander_IncrementBy_Call) RunAndReturn

type MockCommander_IncrementFloatBy_Call

type MockCommander_IncrementFloatBy_Call struct {
	*mock.Call
}

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

func (*MockCommander_IncrementFloatBy_Call) Return

func (*MockCommander_IncrementFloatBy_Call) Run

func (*MockCommander_IncrementFloatBy_Call) RunAndReturn

type MockCommander_SetFloatIfExist_Call

type MockCommander_SetFloatIfExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetFloatIfExist_Call) Return

func (*MockCommander_SetFloatIfExist_Call) Run

func (*MockCommander_SetFloatIfExist_Call) RunAndReturn

type MockCommander_SetFloatIfNotExist_Call

type MockCommander_SetFloatIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetFloatIfNotExist_Call) Return

func (*MockCommander_SetFloatIfNotExist_Call) Run

func (*MockCommander_SetFloatIfNotExist_Call) RunAndReturn

type MockCommander_SetFloat_Call

type MockCommander_SetFloat_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetFloat_Call) Return

func (*MockCommander_SetFloat_Call) Run

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

func (*MockCommander_SetFloat_Call) RunAndReturn

type MockCommander_SetIntIfExist_Call

type MockCommander_SetIntIfExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetIntIfExist_Call) Return

func (*MockCommander_SetIntIfExist_Call) Run

func (*MockCommander_SetIntIfExist_Call) RunAndReturn

type MockCommander_SetIntIfNotExist_Call

type MockCommander_SetIntIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetIntIfNotExist_Call) Return

func (*MockCommander_SetIntIfNotExist_Call) Run

func (*MockCommander_SetIntIfNotExist_Call) RunAndReturn

type MockCommander_SetInt_Call

type MockCommander_SetInt_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetInt_Call) Return

func (*MockCommander_SetInt_Call) Run

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

func (*MockCommander_SetInt_Call) RunAndReturn

type MockCommander_SetStringIfExist_Call

type MockCommander_SetStringIfExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetStringIfExist_Call) Return

func (*MockCommander_SetStringIfExist_Call) Run

func (*MockCommander_SetStringIfExist_Call) RunAndReturn

type MockCommander_SetStringIfNotExist_Call

type MockCommander_SetStringIfNotExist_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetStringIfNotExist_Call) Return

func (*MockCommander_SetStringIfNotExist_Call) Run

func (*MockCommander_SetStringIfNotExist_Call) RunAndReturn

type MockCommander_SetString_Call

type MockCommander_SetString_Call struct {
	*mock.Call
}

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

func (*MockCommander_SetString_Call) Return

func (*MockCommander_SetString_Call) Run

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

func (*MockCommander_SetString_Call) RunAndReturn

type MockType

type MockType struct {
	mock.Mock
}

MockType is an autogenerated mock type for the Type type

func NewMockType

func NewMockType(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockType

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

func (_m *MockType) EXPECT() *MockType_Expecter

type MockType_Expecter

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

type Type

type Type interface {
	string | int64 | uint64 | float64
}

Jump to

Keyboard shortcuts

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