Versions in this module Expand all Collapse all v1 v1.1.0 Feb 16, 2021 Changes in this version + var ErrEmptyAddress = errors.New("address is empty") + var ErrEmptyPassword = errors.New("password is empty") + var ErrEmptySession = errors.New("session is empty") + var ErrEmptySessionEmail = errors.New("session email required but was empty") + var ErrEmptySessionID = errors.New("session id required but was empty") + var ErrInvalidTTL = errors.New("ttl should not be zero") + var ErrSessionNotFound = errors.New("session not found") + var HealthyMessage = "elasticache is OK" + type Config struct + Addr string + Database int + Password string + TLS *tls.Config + TTL time.Duration + type ElasticacheClient struct + func New(c Config) (*ElasticacheClient, error) + func (c *ElasticacheClient) Checker(ctx context.Context, state *health.CheckState) error + func (c *ElasticacheClient) DeleteAll() error + func (c *ElasticacheClient) Expire(key string, expiration time.Duration) error + func (c *ElasticacheClient) GetByEmail(email string) (*session.Session, error) + func (c *ElasticacheClient) GetByID(id string) (*session.Session, error) + func (c *ElasticacheClient) Ping() error + func (c *ElasticacheClient) SetSession(s *session.Session) error + type RedisClienter interface + Expire func(key string, expiration time.Duration) *redis.BoolCmd + FlushAll func() *redis.StatusCmd + Get func(key string) *redis.StringCmd + Ping func() *redis.StatusCmd + Set func(key string, value interface{}, expiration time.Duration) *redis.StatusCmd + type RedisClienterMock struct + ExpireFunc func(key string, expiration time.Duration) *redis.BoolCmd + FlushAllFunc func() *redis.StatusCmd + GetFunc func(key string) *redis.StringCmd + PingFunc func() *redis.StatusCmd + SetFunc func(key string, value interface{}, expiration time.Duration) *redis.StatusCmd + func (mock *RedisClienterMock) Expire(key string, expiration time.Duration) *redis.BoolCmd + func (mock *RedisClienterMock) ExpireCalls() []struct{ ... } + func (mock *RedisClienterMock) FlushAll() *redis.StatusCmd + func (mock *RedisClienterMock) FlushAllCalls() []struct{} + func (mock *RedisClienterMock) Get(key string) *redis.StringCmd + func (mock *RedisClienterMock) GetCalls() []struct{ ... } + func (mock *RedisClienterMock) Ping() *redis.StatusCmd + func (mock *RedisClienterMock) PingCalls() []struct{} + func (mock *RedisClienterMock) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd + func (mock *RedisClienterMock) SetCalls() []struct{ ... } + type SessionCache interface + DeleteAll func() error + GetByEmail func(email string) (*session.Session, error) + GetByID func(ID string) (*session.Session, error) + SetSession func(s *session.Session) error v0 v0.2.0 Jul 17, 2020 Changes in this version + type Cache struct + func NewCache(interval time.Duration, ttl time.Duration) *Cache + func (c *Cache) DeleteAll() error + func (c *Cache) GetByID(ID string) (*session.Session, error) + func (c *Cache) Set(s *session.Session) error