Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository interface {
Set(key string, value interface{}, exp time.Duration) error
SAdd(key string, value ...interface{}) error
HSet(key, field, value string) (bool, error)
Get(key string) (string, error)
GetHSet(key, field string) (string, error)
GetSAdd(key string) ([]string, error)
Delete(key string) error
}
Repository represent the repositories
func NewRedisRepository ¶
func NewRedisRepository(Client redis.Cmdable) Repository
NewRedisRepository will create an object that represent the Repository interface
type Service ¶
type Service interface {
Set(key string, value interface{}, exp time.Duration) (int, error)
SAdd(key string, value ...interface{}) (int, error)
HSet(key, field, value string) (bool, int, error)
Get(key string) (string, int, error)
GetSAdd(key string) ([]string, int, error)
GetHSet(key, field string) (string, int, error)
Delete(key string) (int, error)
}
Service represent the services
func NewService ¶
func NewService(log *logrus.Entry, r Repository) Service
NewService will create an object that represent the Service interface
Click to show internal directories.
Click to hide internal directories.