Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("value was not found in repository")
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map is a in-memory keystore which implements the Repository interface which is used for testing
type Redis ¶
Redis is a key value store which satisfies the Repository interface
type Repository ¶
type Repository interface { Set(ctx context.Context, key string, value string) error Get(ctx context.Context, key string) (string, error) io.Closer }
Repository is a key value datastore where urls and there corresponding hashs are kept
func NewRedisRepo ¶
func NewRedisRepo(addr, pwd string, timeout time.Duration) (Repository, error)
NewRedisRepo will create a new Repository given the address, password of the redis instance
Click to show internal directories.
Click to hide internal directories.