order

package
v0.0.0-...-c7843cb Latest Latest
Warning

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

Go to latest
Published: Jan 4, 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   uint64
	Offset uint64
}

type FindResult

type FindResult 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) (FindResult, error)

all orders with pagination

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) Update

func (r *RedisRepo) Update(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