redisrepo

package
v0.0.0-...-7026ca7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	User
}

func New

func New(rdb *redis.Client) *Repository

type User

type User interface {
	Create(ctx context.Context, key string, value []byte, expiry time.Duration) error
	Find(ctx context.Context, key string) (*model.User, error)
}

type UserRepo

type UserRepo struct {
	// contains filtered or unexported fields
}

func NewUserRepo

func NewUserRepo(rdb *redis.Client) *UserRepo

func (*UserRepo) Create

func (r *UserRepo) Create(ctx context.Context, key string, value []byte, expiry time.Duration) error

func (*UserRepo) Find

func (r *UserRepo) Find(ctx context.Context, key string) (*model.User, error)

Jump to

Keyboard shortcuts

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