redisstore

package
v0.0.0-...-69db04a Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options = redis.Options

Options is a alias type for https://godoc.org/github.com/go-redis/redis#Options

type RedisStore

type RedisStore struct {
	storage.Storage
	// contains filtered or unexported fields
}

RedisStore is a simple redis storage implementing the Storage interface.

func NewRedisStore

func NewRedisStore(cfg *Options) (*RedisStore, error)

NewRedisStore create a new redis store

func (*RedisStore) DelPolicy

func (s *RedisStore) DelPolicy(id string) error

DelPolicy delete the policy with the given identifier.

func (*RedisStore) GetPolicy

func (s *RedisStore) GetPolicy(id string) (*policy.Policy, error)

GetPolicy returns the policy with the given identifier.

func (*RedisStore) PutPolicy

func (s *RedisStore) PutPolicy(pol *policy.Policy) (*policy.Policy, error)

PutPolicy upsert the policy with the given identifier.

func (*RedisStore) ScrollPolicy

func (s *RedisStore) ScrollPolicy(opts *storage.ScrollOptions) ([]*policy.Policy, string, error)

Jump to

Keyboard shortcuts

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