inmemory

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. 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 (*Manager) Connect

func (_m *Manager) Connect(ctx context.Context) error

Connect provides a mock function with given fields: ctx

func (*Manager) Del

func (_m *Manager) Del(ctx context.Context, keys ...string) error

Del provides a mock function with given fields: ctx, keys

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) Get

func (_m *Manager) Get(ctx context.Context, key string, bindTo interface{}) error

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

func (*Manager) GetString

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

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

func (*Manager) HDel

func (_m *Manager) HDel(ctx context.Context, key string, fields ...string) error

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

func (*Manager) HGet

func (_m *Manager) HGet(ctx context.Context, key string, field string, bindTo interface{}) error

HGet provides a mock function with given fields: ctx, key, field, bindTo

func (*Manager) HGetAll

func (_m *Manager) HGetAll(ctx context.Context, key string, bindTo interface{}) error

HGetAll provides a mock function with given fields: ctx, key, bindTo

func (*Manager) HMGet

func (_m *Manager) HMGet(ctx context.Context, key string, field string, bindTo interface{}) error

HMGet provides a mock function with given fields: ctx, key, field, bindTo

func (*Manager) HMSet

func (_m *Manager) HMSet(ctx context.Context, key string, values ...interface{}) error

HMSet provides a mock function with given fields: ctx, key, values

func (*Manager) HSet

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

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

func (*Manager) HSetWhenNotExist

func (_m *Manager) HSetWhenNotExist(ctx context.Context, key string, field string, value interface{}) error

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

func (*Manager) MustConnect

func (_m *Manager) MustConnect(ctx context.Context) inmemory.Manager

MustConnect provides a mock function with given fields: ctx

func (*Manager) Ping

func (_m *Manager) Ping() error

Ping provides a mock function with given fields:

func (*Manager) Set

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

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

func (*Manager) SetString

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

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

func (*Manager) SetWhenNotExist

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

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

func (*Manager) SetWithExpire

func (_m *Manager) SetWithExpire(ctx context.Context, key string, value interface{}, expire time.Duration) error

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

func (*Manager) SetWithExpireWhenNotExist

func (_m *Manager) SetWithExpireWhenNotExist(ctx context.Context, key string, value interface{}, expire time.Duration) error

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

type Manager_Connect_Call

type Manager_Connect_Call struct {
	*mock.Call
}

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

func (*Manager_Connect_Call) Return

func (*Manager_Connect_Call) Run

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

func (*Manager_Connect_Call) RunAndReturn

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

type Manager_Del_Call

type Manager_Del_Call struct {
	*mock.Call
}

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

func (*Manager_Del_Call) Return

func (_c *Manager_Del_Call) Return(_a0 error) *Manager_Del_Call

func (*Manager_Del_Call) Run

func (_c *Manager_Del_Call) Run(run func(ctx context.Context, keys ...string)) *Manager_Del_Call

func (*Manager_Del_Call) RunAndReturn

func (_c *Manager_Del_Call) RunAndReturn(run func(context.Context, ...string) error) *Manager_Del_Call

type Manager_Expecter

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

func (*Manager_Expecter) Connect

func (_e *Manager_Expecter) Connect(ctx interface{}) *Manager_Connect_Call

Connect is a helper method to define mock.On call

  • ctx context.Context

func (*Manager_Expecter) Del

func (_e *Manager_Expecter) Del(ctx interface{}, keys ...interface{}) *Manager_Del_Call

Del is a helper method to define mock.On call

  • ctx context.Context
  • keys ...string

func (*Manager_Expecter) Get

func (_e *Manager_Expecter) Get(ctx interface{}, key interface{}, bindTo interface{}) *Manager_Get_Call

Get is a helper method to define mock.On call

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

func (*Manager_Expecter) GetString

func (_e *Manager_Expecter) GetString(ctx interface{}, key interface{}) *Manager_GetString_Call

GetString is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*Manager_Expecter) HDel

func (_e *Manager_Expecter) HDel(ctx interface{}, key interface{}, fields ...interface{}) *Manager_HDel_Call

HDel is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • fields ...string

func (*Manager_Expecter) HGet

func (_e *Manager_Expecter) HGet(ctx interface{}, key interface{}, field interface{}, bindTo interface{}) *Manager_HGet_Call

HGet is a helper method to define mock.On call

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

func (*Manager_Expecter) HGetAll

func (_e *Manager_Expecter) HGetAll(ctx interface{}, key interface{}, bindTo interface{}) *Manager_HGetAll_Call

HGetAll is a helper method to define mock.On call

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

func (*Manager_Expecter) HMGet

func (_e *Manager_Expecter) HMGet(ctx interface{}, key interface{}, field interface{}, bindTo interface{}) *Manager_HMGet_Call

HMGet is a helper method to define mock.On call

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

func (*Manager_Expecter) HMSet

func (_e *Manager_Expecter) HMSet(ctx interface{}, key interface{}, values ...interface{}) *Manager_HMSet_Call

HMSet is a helper method to define mock.On call

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

func (*Manager_Expecter) HSet

func (_e *Manager_Expecter) HSet(ctx interface{}, key interface{}, value ...interface{}) *Manager_HSet_Call

HSet is a helper method to define mock.On call

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

func (*Manager_Expecter) HSetWhenNotExist

func (_e *Manager_Expecter) HSetWhenNotExist(ctx interface{}, key interface{}, field interface{}, value interface{}) *Manager_HSetWhenNotExist_Call

HSetWhenNotExist is a helper method to define mock.On call

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

func (*Manager_Expecter) MustConnect

func (_e *Manager_Expecter) MustConnect(ctx interface{}) *Manager_MustConnect_Call

MustConnect is a helper method to define mock.On call

  • ctx context.Context

func (*Manager_Expecter) Ping

func (_e *Manager_Expecter) Ping() *Manager_Ping_Call

Ping is a helper method to define mock.On call

func (*Manager_Expecter) Set

func (_e *Manager_Expecter) Set(ctx interface{}, key interface{}, value interface{}) *Manager_Set_Call

Set is a helper method to define mock.On call

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

func (*Manager_Expecter) SetString

func (_e *Manager_Expecter) SetString(ctx interface{}, key interface{}, value interface{}, expire interface{}) *Manager_SetString_Call

SetString is a helper method to define mock.On call

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

func (*Manager_Expecter) SetWhenNotExist

func (_e *Manager_Expecter) SetWhenNotExist(ctx interface{}, key interface{}, value interface{}) *Manager_SetWhenNotExist_Call

SetWhenNotExist is a helper method to define mock.On call

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

func (*Manager_Expecter) SetWithExpire

func (_e *Manager_Expecter) SetWithExpire(ctx interface{}, key interface{}, value interface{}, expire interface{}) *Manager_SetWithExpire_Call

SetWithExpire is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value interface{}
  • expire time.Duration

func (*Manager_Expecter) SetWithExpireWhenNotExist

func (_e *Manager_Expecter) SetWithExpireWhenNotExist(ctx interface{}, key interface{}, value interface{}, expire interface{}) *Manager_SetWithExpireWhenNotExist_Call

SetWithExpireWhenNotExist is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value interface{}
  • expire time.Duration

type Manager_GetString_Call

type Manager_GetString_Call struct {
	*mock.Call
}

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

func (*Manager_GetString_Call) Return

func (*Manager_GetString_Call) Run

func (*Manager_GetString_Call) RunAndReturn

type Manager_Get_Call

type Manager_Get_Call struct {
	*mock.Call
}

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

func (*Manager_Get_Call) Return

func (_c *Manager_Get_Call) Return(_a0 error) *Manager_Get_Call

func (*Manager_Get_Call) Run

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

func (*Manager_Get_Call) RunAndReturn

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

type Manager_HDel_Call

type Manager_HDel_Call struct {
	*mock.Call
}

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

func (*Manager_HDel_Call) Return

func (_c *Manager_HDel_Call) Return(_a0 error) *Manager_HDel_Call

func (*Manager_HDel_Call) Run

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

func (*Manager_HDel_Call) RunAndReturn

func (_c *Manager_HDel_Call) RunAndReturn(run func(context.Context, string, ...string) error) *Manager_HDel_Call

type Manager_HGetAll_Call

type Manager_HGetAll_Call struct {
	*mock.Call
}

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

func (*Manager_HGetAll_Call) Return

func (*Manager_HGetAll_Call) Run

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

func (*Manager_HGetAll_Call) RunAndReturn

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

type Manager_HGet_Call

type Manager_HGet_Call struct {
	*mock.Call
}

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

func (*Manager_HGet_Call) Return

func (_c *Manager_HGet_Call) Return(_a0 error) *Manager_HGet_Call

func (*Manager_HGet_Call) Run

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

func (*Manager_HGet_Call) RunAndReturn

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

type Manager_HMGet_Call

type Manager_HMGet_Call struct {
	*mock.Call
}

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

func (*Manager_HMGet_Call) Return

func (_c *Manager_HMGet_Call) Return(_a0 error) *Manager_HMGet_Call

func (*Manager_HMGet_Call) Run

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

func (*Manager_HMGet_Call) RunAndReturn

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

type Manager_HMSet_Call

type Manager_HMSet_Call struct {
	*mock.Call
}

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

func (*Manager_HMSet_Call) Return

func (_c *Manager_HMSet_Call) Return(_a0 error) *Manager_HMSet_Call

func (*Manager_HMSet_Call) Run

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

func (*Manager_HMSet_Call) RunAndReturn

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

type Manager_HSetWhenNotExist_Call

type Manager_HSetWhenNotExist_Call struct {
	*mock.Call
}

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

func (*Manager_HSetWhenNotExist_Call) Return

func (*Manager_HSetWhenNotExist_Call) Run

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

func (*Manager_HSetWhenNotExist_Call) RunAndReturn

type Manager_HSet_Call

type Manager_HSet_Call struct {
	*mock.Call
}

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

func (*Manager_HSet_Call) Return

func (_c *Manager_HSet_Call) Return(_a0 error) *Manager_HSet_Call

func (*Manager_HSet_Call) Run

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

func (*Manager_HSet_Call) RunAndReturn

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

type Manager_MustConnect_Call

type Manager_MustConnect_Call struct {
	*mock.Call
}

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

func (*Manager_MustConnect_Call) Return

func (*Manager_MustConnect_Call) Run

func (*Manager_MustConnect_Call) RunAndReturn

type Manager_Ping_Call

type Manager_Ping_Call struct {
	*mock.Call
}

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

func (*Manager_Ping_Call) Return

func (_c *Manager_Ping_Call) Return(_a0 error) *Manager_Ping_Call

func (*Manager_Ping_Call) Run

func (_c *Manager_Ping_Call) Run(run func()) *Manager_Ping_Call

func (*Manager_Ping_Call) RunAndReturn

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

type Manager_SetString_Call

type Manager_SetString_Call struct {
	*mock.Call
}

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

func (*Manager_SetString_Call) Return

func (*Manager_SetString_Call) Run

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

func (*Manager_SetString_Call) RunAndReturn

type Manager_SetWhenNotExist_Call

type Manager_SetWhenNotExist_Call struct {
	*mock.Call
}

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

func (*Manager_SetWhenNotExist_Call) Return

func (*Manager_SetWhenNotExist_Call) Run

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

func (*Manager_SetWhenNotExist_Call) RunAndReturn

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

type Manager_SetWithExpireWhenNotExist_Call

type Manager_SetWithExpireWhenNotExist_Call struct {
	*mock.Call
}

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

func (*Manager_SetWithExpireWhenNotExist_Call) Return

func (*Manager_SetWithExpireWhenNotExist_Call) Run

func (*Manager_SetWithExpireWhenNotExist_Call) RunAndReturn

type Manager_SetWithExpire_Call

type Manager_SetWithExpire_Call struct {
	*mock.Call
}

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

func (*Manager_SetWithExpire_Call) Return

func (*Manager_SetWithExpire_Call) Run

func (_c *Manager_SetWithExpire_Call) Run(run func(ctx context.Context, key string, value interface{}, expire time.Duration)) *Manager_SetWithExpire_Call

func (*Manager_SetWithExpire_Call) RunAndReturn

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

type Manager_Set_Call

type Manager_Set_Call struct {
	*mock.Call
}

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

func (*Manager_Set_Call) Return

func (_c *Manager_Set_Call) Return(_a0 error) *Manager_Set_Call

func (*Manager_Set_Call) Run

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

func (*Manager_Set_Call) RunAndReturn

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

Jump to

Keyboard shortcuts

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