Documentation
¶
Index ¶
- Variables
- type Handler
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteByID(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetByID(w http.ResponseWriter, r *http.Request)
- func (h *Handler) List(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateByID(w http.ResponseWriter, r *http.Request)
- type LineItem
- type Order
- type PaginationOptions
- type RedisRepo
- func (r *RedisRepo) DeleteByID(ctx context.Context, id uint64) error
- func (r *RedisRepo) FindAll(ctx context.Context, page PaginationOptions) (Results, error)
- func (r *RedisRepo) FindByID(ctx context.Context, id uint64) (Order, error)
- func (r *RedisRepo) Insert(ctx context.Context, order Order) error
- func (r *RedisRepo) Update(ctx context.Context, order Order) error
- type Repo
- type Results
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotExist = errors.New("order does not exist")
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Repo Repo
}
func (*Handler) DeleteByID ¶
func (h *Handler) DeleteByID(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateByID ¶
func (h *Handler) UpdateByID(w http.ResponseWriter, r *http.Request)
type PaginationOptions ¶
type RedisRepo ¶
type RedisRepo struct {
Client *redis.Client
}
Click to show internal directories.
Click to hide internal directories.