users

package
v0.0.0-...-8ae5609 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserCache

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

func New

func New(client *redis.Client, ttl time.Duration) *UserCache

func (*UserCache) DeleteByID

func (c *UserCache) DeleteByID(ctx context.Context, id int) error

func (*UserCache) GetAll

func (c *UserCache) GetAll(ctx context.Context) ([]*domain.User, error)

func (*UserCache) GetByID

func (c *UserCache) GetByID(ctx context.Context, id int) (*domain.User, error)

func (*UserCache) Set

func (c *UserCache) Set(ctx context.Context, user *domain.User) error

func (*UserCache) SetAll

func (c *UserCache) SetAll(ctx context.Context, users []*domain.User) error

func (*UserCache) UpdateByID

func (c *UserCache) UpdateByID(ctx context.Context, update *domain.UserUpdate, id int) error

Jump to

Keyboard shortcuts

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