feat: initial commit
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/FernandoVideira/LK_API_Temp/internal/store"
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
type Storage struct {
|
||||
Users interface {
|
||||
Get(context.Context, int64) (*store.User, error)
|
||||
Set(context.Context, *store.User) error
|
||||
Delete(context.Context, int64) error
|
||||
}
|
||||
}
|
||||
|
||||
func NewRedisStorage(rdb *redis.Client) Storage {
|
||||
return Storage{
|
||||
Users: &UserStore{rdb: rdb},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user