storage

package
v0.0.0-...-3b4d91b Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Get(id string) (string, error)
	Ping() (string, error)
	Set(key string, value interface{}, lifetime time.Duration) error
}

type HandlerMock

type HandlerMock struct {
	mock.Mock
}

func (*HandlerMock) Get

func (m *HandlerMock) Get(id string) (string, error)

func (*HandlerMock) Ping

func (m *HandlerMock) Ping() (string, error)

func (*HandlerMock) Set

func (m *HandlerMock) Set(key string, value interface{}, lifetime time.Duration) error

type Redis

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

func NewRedis

func NewRedis(client *redis.Client) *Redis

func (*Redis) Get

func (r *Redis) Get(id string) (string, error)

func (*Redis) Ping

func (r *Redis) Ping() (string, error)

func (*Redis) Set

func (r *Redis) Set(key string, value interface{}, lifetime time.Duration) error

Jump to

Keyboard shortcuts

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