redis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Unlicense Imports: 11 Imported by: 0

Documentation

Overview

Package redis is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHealthCheck

func NewHealthCheck(r Client) healthcheck.HealthCheck

Types

type Client

type Client interface {
	WithTimeout(timeout time.Duration) *redis.Client
	Ping(ctx context.Context) *redis.StatusCmd
	Get(ctx context.Context, key string) *redis.StringCmd
	SetArgs(ctx context.Context, key string, value interface{}, a redis.SetArgs) *redis.StatusCmd
	SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd
	Del(ctx context.Context, keys ...string) *redis.IntCmd
}

func NewClient

func NewClient(redisURL, caCert string) (Client, error)

type Error

type Error = redis.Error

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) Del

func (m *MockClient) Del(ctx context.Context, keys ...string) *redis.IntCmd

Del mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) Get

func (m *MockClient) Get(ctx context.Context, key string) *redis.StringCmd

Get mocks base method.

func (*MockClient) Ping

func (m *MockClient) Ping(ctx context.Context) *redis.StatusCmd

Ping mocks base method.

func (*MockClient) SetArgs

func (m *MockClient) SetArgs(ctx context.Context, key string, value interface{}, a redis.SetArgs) *redis.StatusCmd

SetArgs mocks base method.

func (*MockClient) SetNX

func (m *MockClient) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd

SetNX mocks base method.

func (*MockClient) WithTimeout

func (m *MockClient) WithTimeout(timeout time.Duration) *redis.Client

WithTimeout mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) Del

func (mr *MockClientMockRecorder) Del(ctx interface{}, keys ...interface{}) *gomock.Call

Del indicates an expected call of Del.

func (*MockClientMockRecorder) Get

func (mr *MockClientMockRecorder) Get(ctx, key interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockClientMockRecorder) Ping

func (mr *MockClientMockRecorder) Ping(ctx interface{}) *gomock.Call

Ping indicates an expected call of Ping.

func (*MockClientMockRecorder) SetArgs

func (mr *MockClientMockRecorder) SetArgs(ctx, key, value, a interface{}) *gomock.Call

SetArgs indicates an expected call of SetArgs.

func (*MockClientMockRecorder) SetNX

func (mr *MockClientMockRecorder) SetNX(ctx, key, value, expiration interface{}) *gomock.Call

SetNX indicates an expected call of SetNX.

func (*MockClientMockRecorder) WithTimeout

func (mr *MockClientMockRecorder) WithTimeout(timeout interface{}) *gomock.Call

WithTimeout indicates an expected call of WithTimeout.

type SetArgs

type SetArgs = redis.SetArgs

Jump to

Keyboard shortcuts

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