mocks

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	mock.Mock
}

Connector is an autogenerated mock type for the Connector type

func NewConnector

func NewConnector(t interface {
	mock.TestingT
	Cleanup(func())
}) *Connector

NewConnector creates a new instance of Connector. 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 (*Connector) As

func (_m *Connector) As(i interface{}) bool

As provides a mock function with given fields: i

func (*Connector) Disconnect

func (_m *Connector) Disconnect(_a0 context.Context) error

Disconnect provides a mock function with given fields: _a0

func (*Connector) Ping

func (_m *Connector) Ping(_a0 context.Context) error

Ping provides a mock function with given fields: _a0

func (*Connector) Type

func (_m *Connector) Type() string

Type provides a mock function with given fields:

type Flusher

type Flusher struct {
	mock.Mock
}

Flusher is an autogenerated mock type for the Flusher type

func NewFlusher

func NewFlusher(t interface {
	mock.TestingT
	Cleanup(func())
}) *Flusher

NewFlusher creates a new instance of Flusher. 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 (*Flusher) FlushAll

func (_m *Flusher) FlushAll(ctx context.Context) error

FlushAll provides a mock function with given fields: ctx

type KeyValue

type KeyValue struct {
	mock.Mock
}

KeyValue is an autogenerated mock type for the KeyValue type

func NewKeyValue

func NewKeyValue(t interface {
	mock.TestingT
	Cleanup(func())
}) *KeyValue

NewKeyValue creates a new instance of KeyValue. 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 (*KeyValue) Decrement

func (_m *KeyValue) Decrement(ctx context.Context, key string) (int64, error)

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

func (*KeyValue) Delete

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

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

func (*KeyValue) DeleteKeys

func (_m *KeyValue) DeleteKeys(ctx context.Context, keys []string) (int64, error)

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

func (*KeyValue) DeleteScanMatch

func (_m *KeyValue) DeleteScanMatch(ctx context.Context, pattern string) (int64, error)

DeleteScanMatch provides a mock function with given fields: ctx, pattern

func (*KeyValue) Exists

func (_m *KeyValue) Exists(ctx context.Context, key string) (bool, error)

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

func (*KeyValue) Expire

func (_m *KeyValue) Expire(ctx context.Context, key string, ttl time.Duration) error

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

func (*KeyValue) Get

func (_m *KeyValue) Get(ctx context.Context, key string) (string, error)

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

func (*KeyValue) GetKeysAndValuesWithFilter

func (_m *KeyValue) GetKeysAndValuesWithFilter(ctx context.Context, pattern string) (map[string]interface{}, error)

GetKeysAndValuesWithFilter provides a mock function with given fields: ctx, pattern

func (*KeyValue) GetKeysWithOpts

func (_m *KeyValue) GetKeysWithOpts(ctx context.Context, searchStr string, cursors map[string]uint64, count int64) ([]string, map[string]uint64, bool, error)

GetKeysWithOpts provides a mock function with given fields: ctx, searchStr, cursors, count

func (*KeyValue) GetMulti

func (_m *KeyValue) GetMulti(ctx context.Context, keys []string) ([]interface{}, error)

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

func (*KeyValue) Increment

func (_m *KeyValue) Increment(ctx context.Context, key string) (int64, error)

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

func (*KeyValue) Keys

func (_m *KeyValue) Keys(ctx context.Context, pattern string) ([]string, error)

Keys provides a mock function with given fields: ctx, pattern

func (*KeyValue) Set

func (_m *KeyValue) Set(ctx context.Context, key string, value string, ttl time.Duration) error

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

func (*KeyValue) SetIfNotExist added in v1.2.1

func (_m *KeyValue) SetIfNotExist(ctx context.Context, key string, value string, expiration time.Duration) (bool, error)

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

func (*KeyValue) TTL

func (_m *KeyValue) TTL(ctx context.Context, key string) (int64, error)

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

type List

type List struct {
	mock.Mock
}

List is an autogenerated mock type for the List type

func NewList

func NewList(t interface {
	mock.TestingT
	Cleanup(func())
}) *List

NewList creates a new instance of List. 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 (*List) Append

func (_m *List) Append(ctx context.Context, pipelined bool, key string, values ...[]byte) error

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

func (*List) Length

func (_m *List) Length(ctx context.Context, key string) (int64, error)

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

func (*List) Pop

func (_m *List) Pop(ctx context.Context, key string, stop int64) ([]string, error)

Pop provides a mock function with given fields: ctx, key, stop

func (*List) Prepend

func (_m *List) Prepend(ctx context.Context, pipelined bool, key string, values ...[]byte) error

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

func (*List) Range

func (_m *List) Range(ctx context.Context, key string, start int64, stop int64) ([]string, error)

Range provides a mock function with given fields: ctx, key, start, stop

func (*List) Remove

func (_m *List) Remove(ctx context.Context, key string, count int64, element interface{}) (int64, error)

Remove provides a mock function with given fields: ctx, key, count, element

type Message

type Message struct {
	mock.Mock
}

Message is an autogenerated mock type for the Message type

func NewMessage

func NewMessage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Message

NewMessage creates a new instance of Message. 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 (*Message) Channel

func (_m *Message) Channel() (string, error)

Channel provides a mock function with given fields:

func (*Message) Payload

func (_m *Message) Payload() (string, error)

Payload provides a mock function with given fields:

func (*Message) Type

func (_m *Message) Type() string

Type provides a mock function with given fields:

type Option

type Option struct {
	mock.Mock
}

Option is an autogenerated mock type for the Option type

func NewOption

func NewOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *Option

NewOption creates a new instance of Option. 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 (*Option) Apply

func (_m *Option) Apply(_a0 *model.BaseConfig)

Apply provides a mock function with given fields: _a0

type Queue

type Queue struct {
	mock.Mock
}

Queue is an autogenerated mock type for the Queue type

func NewQueue

func NewQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *Queue

NewQueue creates a new instance of Queue. 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 (*Queue) Publish

func (_m *Queue) Publish(ctx context.Context, channel string, message string) (int64, error)

Publish provides a mock function with given fields: ctx, channel, message

func (*Queue) Subscribe

func (_m *Queue) Subscribe(ctx context.Context, channels ...string) model.Subscription

Subscribe provides a mock function with given fields: ctx, channels

type Set

type Set struct {
	mock.Mock
}

Set is an autogenerated mock type for the Set type

func NewSet

func NewSet(t interface {
	mock.TestingT
	Cleanup(func())
}) *Set

NewSet creates a new instance of Set. 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 (*Set) AddMember

func (_m *Set) AddMember(ctx context.Context, key string, member string) error

AddMember provides a mock function with given fields: ctx, key, member

func (*Set) IsMember

func (_m *Set) IsMember(ctx context.Context, key string, member string) (bool, error)

IsMember provides a mock function with given fields: ctx, key, member

func (*Set) Members

func (_m *Set) Members(ctx context.Context, key string) ([]string, error)

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

func (*Set) RemoveMember

func (_m *Set) RemoveMember(ctx context.Context, key string, member string) error

RemoveMember provides a mock function with given fields: ctx, key, member

type SortedSet

type SortedSet struct {
	mock.Mock
}

SortedSet is an autogenerated mock type for the SortedSet type

func NewSortedSet

func NewSortedSet(t interface {
	mock.TestingT
	Cleanup(func())
}) *SortedSet

NewSortedSet creates a new instance of SortedSet. 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 (*SortedSet) AddScoredMember

func (_m *SortedSet) AddScoredMember(ctx context.Context, key string, member string, score float64) (int64, error)

AddScoredMember provides a mock function with given fields: ctx, key, member, score

func (*SortedSet) GetMembersByScoreRange

func (_m *SortedSet) GetMembersByScoreRange(ctx context.Context, key string, minScore string, maxScore string) ([]interface{}, []float64, error)

GetMembersByScoreRange provides a mock function with given fields: ctx, key, minScore, maxScore

func (*SortedSet) RemoveMembersByScoreRange

func (_m *SortedSet) RemoveMembersByScoreRange(ctx context.Context, key string, minScore string, maxScore string) (int64, error)

RemoveMembersByScoreRange provides a mock function with given fields: ctx, key, minScore, maxScore

type Subscription

type Subscription struct {
	mock.Mock
}

Subscription is an autogenerated mock type for the Subscription type

func NewSubscription

func NewSubscription(t interface {
	mock.TestingT
	Cleanup(func())
}) *Subscription

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

func (_m *Subscription) Close() error

Close provides a mock function with given fields:

func (*Subscription) Receive

func (_m *Subscription) Receive(ctx context.Context) (model.Message, error)

Receive provides a mock function with given fields: ctx

Jump to

Keyboard shortcuts

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