order

package
v0.0.0-...-a3d45a5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExist = errors.New("order does not exist")

Functions

This section is empty.

Types

type FindAllPage

type FindAllPage struct {
	Size   uint
	Offset uint
}

type FindResul

type FindResul struct {
	Orders []model.Order
	Cursor uint64
}

type RedisRepo

type RedisRepo struct {
	Client *redis.Client
}

func (*RedisRepo) DeleteByID

func (r *RedisRepo) DeleteByID(ctx context.Context, id uint64) error

func (*RedisRepo) FindAll

func (r *RedisRepo) FindAll(ctx context.Context, page FindAllPage) (FindResul, error)

func (*RedisRepo) FindByID

func (r *RedisRepo) FindByID(ctx context.Context, id uint64) (model.Order, error)

func (*RedisRepo) Insert

func (r *RedisRepo) Insert(ctx context.Context, order model.Order) error

func (*RedisRepo) UpdateByID

func (r *RedisRepo) UpdateByID(ctx context.Context, order model.Order) error

Jump to

Keyboard shortcuts

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