rediscache

package
v0.0.0-...-cb1006b Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.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 Store

type Store struct {
	Host string
	Port string
	Pool *redis.Pool
}

Store represents a rediscache storage location

func NewStore

func NewStore(host, port string) *Store

NewStore represents a new instance of a rediscache storage location

func (*Store) Close

func (s *Store) Close() error

func (*Store) Delete

func (s *Store) Delete(shortCode string) error

func (*Store) GetShortCode

func (s *Store) GetShortCode(destination string) (string, error)

func (*Store) GetURL

func (s *Store) GetURL(shortCode string) (models.URL, error)

func (*Store) Health

func (s *Store) Health() bool

func (*Store) Open

func (s *Store) Open() error

Open populates the pool field of the store if it has not already been set up

func (*Store) SetURL

func (s *Store) SetURL(shortCode, url string) error

Jump to

Keyboard shortcuts

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