redis

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package redis implements a hugot Store that is backed by a redis database using gopkg.in/redis.v5

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a redis implemented storage.Storer

func New

func New(opts *redis.Options) *Store

New creates a new store with the provided gopkg.in/redis.v5 options.

func (*Store) Get

func (s *Store) Get(key []string) (string, bool, error)

Get retries a key from the store

func (*Store) List

func (s *Store) List(path []string) ([][]string, error)

List all items under the provided prefix

func (*Store) Set

func (s *Store) Set(path []string, value string) error

Set a key in the store

func (*Store) Unset

func (s *Store) Unset(path []string) error

Unset a key in the store

Jump to

Keyboard shortcuts

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