mocks

package
v4.2.1-0...-85e7c47 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	DelCall       func(keys ...string) redis.Result
	GetCall       func(key string) redis.Result
	SetCall       func(key string, value interface{}, expiration time.Duration) redis.Result
	PingCall      func() redis.Result
	ExistsCall    func(keys ...string) redis.Result
	KeysCall      func(pattern string) redis.Result
	SMembersCall  func(key string) redis.Result
	SIsMemberCall func(key string, member interface{}) redis.Result
	SAddCall      func(key string, members ...interface{}) redis.Result
	SRemCall      func(key string, members ...interface{}) redis.Result
	IncrCall      func(key string) redis.Result
	DecrCall      func(key string) redis.Result
	RPushCall     func(key string, values ...interface{}) redis.Result
	LRangeCall    func(key string, start, stop int64) redis.Result
	LTrimCall     func(key string, start, stop int64) redis.Result
	LLenCall      func(key string) redis.Result
	ExpireCall    func(key string, value time.Duration) redis.Result
	TTLCall       func(key string) redis.Result
	MGetCall      func(keys []string) redis.Result
	SCardCall     func(key string) redis.Result
	EvalCall      func(script string, keys []string, args ...interface{}) redis.Result
	HIncrByCall   func(key string, field string, value int64) redis.Result
	HGetAllCall   func(key string) redis.Result
}

MockClient mocks for testing purposes

func (*MockClient) Decr

func (m *MockClient) Decr(key string) redis.Result

Decr mocks Decr

func (*MockClient) Del

func (m *MockClient) Del(keys ...string) redis.Result

Del mocks get

func (*MockClient) Eval

func (m *MockClient) Eval(script string, keys []string, args ...interface{}) redis.Result

Eval mocks Eval

func (*MockClient) Exists

func (m *MockClient) Exists(keys ...string) redis.Result

Exists mocks set

func (*MockClient) Expire

func (m *MockClient) Expire(key string, value time.Duration) redis.Result

Expire mocks Expire

func (*MockClient) Get

func (m *MockClient) Get(key string) redis.Result

Get mocks get

func (*MockClient) HGetAll

func (m *MockClient) HGetAll(key string) redis.Result

HGetAll mocks HGetAll

func (*MockClient) HIncrBy

func (m *MockClient) HIncrBy(key string, field string, value int64) redis.Result

HIncrByCall mocks HIncrByCall

func (*MockClient) Incr

func (m *MockClient) Incr(key string) redis.Result

Incr mocks Incr

func (*MockClient) Keys

func (m *MockClient) Keys(pattern string) redis.Result

Keys mocks keys

func (*MockClient) LLen

func (m *MockClient) LLen(key string) redis.Result

LLen mocks LLen

func (*MockClient) LRange

func (m *MockClient) LRange(key string, start, stop int64) redis.Result

LRange mocks LRange

func (*MockClient) LTrim

func (m *MockClient) LTrim(key string, start, stop int64) redis.Result

LTrim mocks LTrim

func (*MockClient) MGet

func (m *MockClient) MGet(keys []string) redis.Result

MGet mocks MGet

func (*MockClient) Ping

func (m *MockClient) Ping() redis.Result

Ping mocks ping

func (*MockClient) RPush

func (m *MockClient) RPush(key string, values ...interface{}) redis.Result

RPush mocks RPush

func (*MockClient) SAdd

func (m *MockClient) SAdd(key string, members ...interface{}) redis.Result

SAdd mocks SAdd

func (*MockClient) SCard

func (m *MockClient) SCard(key string) redis.Result

SCard mocks SCard

func (*MockClient) SIsMember

func (m *MockClient) SIsMember(key string, member interface{}) redis.Result

SIsMember mocks SIsMember

func (*MockClient) SMembers

func (m *MockClient) SMembers(key string) redis.Result

SMembers mocks SMembers

func (*MockClient) SRem

func (m *MockClient) SRem(key string, members ...interface{}) redis.Result

SRem mocks SRem

func (*MockClient) Set

func (m *MockClient) Set(key string, value interface{}, expiration time.Duration) redis.Result

Set mocks set

func (*MockClient) TTL

func (m *MockClient) TTL(key string) redis.Result

TTL mocks TTL

type MockResultOutput

type MockResultOutput struct {
	ErrCall             func() error
	IntCall             func() int64
	StringCall          func() string
	BoolCall            func() bool
	DurationCall        func() time.Duration
	ResultCall          func() (int64, error)
	ResultStringCall    func() (string, error)
	MultiCall           func() ([]string, error)
	MultiInterfaceCall  func() ([]interface{}, error)
	MapStringStringCall func() (map[string]string, error)
}

MockResultOutput mocks struct

func (*MockResultOutput) Bool

func (m *MockResultOutput) Bool() bool

Bool mocks Bool

func (*MockResultOutput) Duration

func (m *MockResultOutput) Duration() time.Duration

Duration mocks Duration

func (*MockResultOutput) Err

func (m *MockResultOutput) Err() error

Err mocks Err

func (*MockResultOutput) Int

func (m *MockResultOutput) Int() int64

Int mocks Int

func (*MockResultOutput) MapStringString

func (m *MockResultOutput) MapStringString() (map[string]string, error)

MapStringString mocks MapStringString

func (*MockResultOutput) Multi

func (m *MockResultOutput) Multi() ([]string, error)

Multi mocks Multi

func (*MockResultOutput) MultiInterface

func (m *MockResultOutput) MultiInterface() ([]interface{}, error)

MultiInterface mocks MultiInterface

func (*MockResultOutput) Result

func (m *MockResultOutput) Result() (int64, error)

Result mocks Result

func (*MockResultOutput) ResultString

func (m *MockResultOutput) ResultString() (string, error)

ResultString mocks ResultString

func (*MockResultOutput) String

func (m *MockResultOutput) String() string

String mocks String

Jump to

Keyboard shortcuts

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