order

package
v0.0.0-...-fbb38fb Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type GetAllPage

type GetAllPage struct {
	Size   uint64
	Cursor uint64
}

type GetResult

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

type RedisRepo

type RedisRepo struct {
	Client *redis.Client
}

func (*RedisRepo) Create

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

func (*RedisRepo) DeleteById

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

func (*RedisRepo) GetAll

func (r *RedisRepo) GetAll(ctx context.Context, page GetAllPage) (GetResult, error)

func (*RedisRepo) GetById

func (r *RedisRepo) GetById(ctx context.Context, id uint64) (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