cache

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 4 Imported by: 0

README

cache

mock

mockgen -source=cacher.go -destination=cacher_mock.go --package=cache --build_flags=--mod=mod

Documentation

Overview

Package cache is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cacher

type Cacher interface {
	MSet(ctx context.Context, ttl *time.Duration, kvs ...*KV) error
	MGet(ctx context.Context, keys ...string) (map[string][]byte, error)
	MDel(ctx context.Context, keys ...string) error
}

Cacher string

type HCacher

type HCacher interface {
	HMSet(ctx context.Context, key string, ttl *time.Duration, kvs ...*KV) error
	HMGet(ctx context.Context, key string, fields ...string) (map[string][]byte, error)
	HDel(ctx context.Context, key string) error
	HMDel(ctx context.Context, key string, fields ...string) error
}

HCacher hash

type KV

type KV struct {
	Key  string
	Val  interface{}
	Data []byte
}

type MockCacher

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

MockCacher is a mock of Cacher interface.

func NewMockCacher

func NewMockCacher(ctrl *gomock.Controller) *MockCacher

NewMockCacher creates a new mock instance.

func (*MockCacher) EXPECT

func (m *MockCacher) EXPECT() *MockCacherMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacher) MDel

func (m *MockCacher) MDel(ctx context.Context, keys ...string) error

MDel mocks base method.

func (*MockCacher) MGet

func (m *MockCacher) MGet(ctx context.Context, keys ...string) (map[string][]byte, error)

MGet mocks base method.

func (*MockCacher) MSet

func (m *MockCacher) MSet(ctx context.Context, ttl *time.Duration, kvs ...*KV) error

MSet mocks base method.

type MockCacherMockRecorder

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

MockCacherMockRecorder is the mock recorder for MockCacher.

func (*MockCacherMockRecorder) MDel

func (mr *MockCacherMockRecorder) MDel(ctx interface{}, keys ...interface{}) *gomock.Call

MDel indicates an expected call of MDel.

func (*MockCacherMockRecorder) MGet

func (mr *MockCacherMockRecorder) MGet(ctx interface{}, keys ...interface{}) *gomock.Call

MGet indicates an expected call of MGet.

func (*MockCacherMockRecorder) MSet

func (mr *MockCacherMockRecorder) MSet(ctx, ttl interface{}, kvs ...interface{}) *gomock.Call

MSet indicates an expected call of MSet.

type MockHCacher

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

MockHCacher is a mock of HCacher interface.

func NewMockHCacher

func NewMockHCacher(ctrl *gomock.Controller) *MockHCacher

NewMockHCacher creates a new mock instance.

func (*MockHCacher) EXPECT

func (m *MockHCacher) EXPECT() *MockHCacherMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHCacher) HDel

func (m *MockHCacher) HDel(ctx context.Context, key string) error

HDel mocks base method.

func (*MockHCacher) HMDel

func (m *MockHCacher) HMDel(ctx context.Context, key string, fields ...string) error

HMDel mocks base method.

func (*MockHCacher) HMGet

func (m *MockHCacher) HMGet(ctx context.Context, key string, fields ...string) (map[string][]byte, error)

HMGet mocks base method.

func (*MockHCacher) HMSet

func (m *MockHCacher) HMSet(ctx context.Context, key string, ttl *time.Duration, kvs ...*KV) error

HMSet mocks base method.

type MockHCacherMockRecorder

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

MockHCacherMockRecorder is the mock recorder for MockHCacher.

func (*MockHCacherMockRecorder) HDel

func (mr *MockHCacherMockRecorder) HDel(ctx, key interface{}) *gomock.Call

HDel indicates an expected call of HDel.

func (*MockHCacherMockRecorder) HMDel

func (mr *MockHCacherMockRecorder) HMDel(ctx, key interface{}, fields ...interface{}) *gomock.Call

HMDel indicates an expected call of HMDel.

func (*MockHCacherMockRecorder) HMGet

func (mr *MockHCacherMockRecorder) HMGet(ctx, key interface{}, fields ...interface{}) *gomock.Call

HMGet indicates an expected call of HMGet.

func (*MockHCacherMockRecorder) HMSet

func (mr *MockHCacherMockRecorder) HMSet(ctx, key, ttl interface{}, kvs ...interface{}) *gomock.Call

HMSet indicates an expected call of HMSet.

Jump to

Keyboard shortcuts

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