Documentation ¶
Index ¶
- type RedisMock
- func (mmDel *RedisMock) Del(ctx context.Context, keys ...string) (ip1 *redis.IntCmd)
- func (mmDel *RedisMock) DelAfterCounter() uint64
- func (mmDel *RedisMock) DelBeforeCounter() uint64
- func (mmGet *RedisMock) Get(ctx context.Context, key string) (sp1 *redis.StringCmd)
- func (mmGet *RedisMock) GetAfterCounter() uint64
- func (mmGet *RedisMock) GetBeforeCounter() uint64
- func (mmIncr *RedisMock) Incr(ctx context.Context, key string) (ip1 *redis.IntCmd)
- func (mmIncr *RedisMock) IncrAfterCounter() uint64
- func (mmIncr *RedisMock) IncrBeforeCounter() uint64
- func (m *RedisMock) MinimockDelDone() bool
- func (m *RedisMock) MinimockDelInspect()
- func (m *RedisMock) MinimockFinish()
- func (m *RedisMock) MinimockGetDone() bool
- func (m *RedisMock) MinimockGetInspect()
- func (m *RedisMock) MinimockIncrDone() bool
- func (m *RedisMock) MinimockIncrInspect()
- func (m *RedisMock) MinimockSetDone() bool
- func (m *RedisMock) MinimockSetInspect()
- func (m *RedisMock) MinimockWait(timeout mm_time.Duration)
- func (mmSet *RedisMock) Set(ctx context.Context, key string, value interface{}) (sp1 *redis.StatusCmd)
- func (mmSet *RedisMock) SetAfterCounter() uint64
- func (mmSet *RedisMock) SetBeforeCounter() uint64
- type RedisMockDelExpectation
- type RedisMockDelParams
- type RedisMockDelResults
- type RedisMockGetExpectation
- type RedisMockGetParams
- type RedisMockGetResults
- type RedisMockIncrExpectation
- type RedisMockIncrParams
- type RedisMockIncrResults
- type RedisMockSetExpectation
- type RedisMockSetParams
- type RedisMockSetResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisMock ¶
type RedisMock struct { DelMock mRedisMockDel GetMock mRedisMockGet IncrMock mRedisMockIncr SetMock mRedisMockSet // contains filtered or unexported fields }
RedisMock implements IRedis
func NewRedisMock ¶
func NewRedisMock(t minimock.Tester) *RedisMock
NewRedisMock returns a mock for IRedis
func (*RedisMock) DelAfterCounter ¶
DelAfterCounter returns a count of finished RedisMock.Del invocations
func (*RedisMock) DelBeforeCounter ¶
DelBeforeCounter returns a count of RedisMock.Del invocations
func (*RedisMock) GetAfterCounter ¶
GetAfterCounter returns a count of finished RedisMock.Get invocations
func (*RedisMock) GetBeforeCounter ¶
GetBeforeCounter returns a count of RedisMock.Get invocations
func (*RedisMock) IncrAfterCounter ¶
IncrAfterCounter returns a count of finished RedisMock.Incr invocations
func (*RedisMock) IncrBeforeCounter ¶
IncrBeforeCounter returns a count of RedisMock.Incr invocations
func (*RedisMock) MinimockDelDone ¶
MinimockDelDone returns true if the count of the Del invocations corresponds the number of defined expectations
func (*RedisMock) MinimockDelInspect ¶
func (m *RedisMock) MinimockDelInspect()
MinimockDelInspect logs each unmet expectation
func (*RedisMock) MinimockFinish ¶
func (m *RedisMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*RedisMock) MinimockGetDone ¶
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*RedisMock) MinimockGetInspect ¶
func (m *RedisMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*RedisMock) MinimockIncrDone ¶
MinimockIncrDone returns true if the count of the Incr invocations corresponds the number of defined expectations
func (*RedisMock) MinimockIncrInspect ¶
func (m *RedisMock) MinimockIncrInspect()
MinimockIncrInspect logs each unmet expectation
func (*RedisMock) MinimockSetDone ¶
MinimockSetDone returns true if the count of the Set invocations corresponds the number of defined expectations
func (*RedisMock) MinimockSetInspect ¶
func (m *RedisMock) MinimockSetInspect()
MinimockSetInspect logs each unmet expectation
func (*RedisMock) MinimockWait ¶
MinimockWait waits for all mocked methods to be called the expected number of times
func (*RedisMock) Set ¶
func (mmSet *RedisMock) Set(ctx context.Context, key string, value interface{}) (sp1 *redis.StatusCmd)
Set implements IRedis
func (*RedisMock) SetAfterCounter ¶
SetAfterCounter returns a count of finished RedisMock.Set invocations
func (*RedisMock) SetBeforeCounter ¶
SetBeforeCounter returns a count of RedisMock.Set invocations
type RedisMockDelExpectation ¶
type RedisMockDelExpectation struct { Counter uint64 // contains filtered or unexported fields }
RedisMockDelExpectation specifies expectation struct of the IRedis.Del
func (*RedisMockDelExpectation) Then ¶
func (e *RedisMockDelExpectation) Then(ip1 *redis.IntCmd) *RedisMock
Then sets up IRedis.Del return parameters for the expectation previously defined by the When method
type RedisMockDelParams ¶
type RedisMockDelParams struct {
// contains filtered or unexported fields
}
RedisMockDelParams contains parameters of the IRedis.Del
type RedisMockDelResults ¶
type RedisMockDelResults struct {
// contains filtered or unexported fields
}
RedisMockDelResults contains results of the IRedis.Del
type RedisMockGetExpectation ¶
type RedisMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
RedisMockGetExpectation specifies expectation struct of the IRedis.Get
func (*RedisMockGetExpectation) Then ¶
func (e *RedisMockGetExpectation) Then(sp1 *redis.StringCmd) *RedisMock
Then sets up IRedis.Get return parameters for the expectation previously defined by the When method
type RedisMockGetParams ¶
type RedisMockGetParams struct {
// contains filtered or unexported fields
}
RedisMockGetParams contains parameters of the IRedis.Get
type RedisMockGetResults ¶
type RedisMockGetResults struct {
// contains filtered or unexported fields
}
RedisMockGetResults contains results of the IRedis.Get
type RedisMockIncrExpectation ¶
type RedisMockIncrExpectation struct { Counter uint64 // contains filtered or unexported fields }
RedisMockIncrExpectation specifies expectation struct of the IRedis.Incr
func (*RedisMockIncrExpectation) Then ¶
func (e *RedisMockIncrExpectation) Then(ip1 *redis.IntCmd) *RedisMock
Then sets up IRedis.Incr return parameters for the expectation previously defined by the When method
type RedisMockIncrParams ¶
type RedisMockIncrParams struct {
// contains filtered or unexported fields
}
RedisMockIncrParams contains parameters of the IRedis.Incr
type RedisMockIncrResults ¶
type RedisMockIncrResults struct {
// contains filtered or unexported fields
}
RedisMockIncrResults contains results of the IRedis.Incr
type RedisMockSetExpectation ¶
type RedisMockSetExpectation struct { Counter uint64 // contains filtered or unexported fields }
RedisMockSetExpectation specifies expectation struct of the IRedis.Set
func (*RedisMockSetExpectation) Then ¶
func (e *RedisMockSetExpectation) Then(sp1 *redis.StatusCmd) *RedisMock
Then sets up IRedis.Set return parameters for the expectation previously defined by the When method
type RedisMockSetParams ¶
type RedisMockSetParams struct {
// contains filtered or unexported fields
}
RedisMockSetParams contains parameters of the IRedis.Set
type RedisMockSetResults ¶
type RedisMockSetResults struct {
// contains filtered or unexported fields
}
RedisMockSetResults contains results of the IRedis.Set