order

package
v0.0.0-...-e1e387d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const AuthCTXKey contextKey = "auth_token"
View Source
const OrderCTXKey contextKey = "cart_item_payload"

Variables

This section is empty.

Functions

func ErrUnauthorized

func ErrUnauthorized(w http.ResponseWriter, err error)

ErrUnauthorized is a helper for consistent unauthorized responses

Types

type OrderApp

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

func NewOrderApp

func NewOrderApp(s *service.OrderService, c *config.OrderConfig, log *zerolog.Logger) *OrderApp

func (*OrderApp) Start

func (a *OrderApp) Start(ctx context.Context) error

type OrderHandler

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

func NewOrderHandler

func NewOrderHandler(s *service.OrderService, l *zerolog.Logger) *OrderHandler

func (*OrderHandler) CreateOrder

func (h *OrderHandler) CreateOrder(w http.ResponseWriter, r *http.Request)

func (*OrderHandler) GetOrder

func (h *OrderHandler) GetOrder(w http.ResponseWriter, r *http.Request)

func (*OrderHandler) GetOrders

func (h *OrderHandler) GetOrders(w http.ResponseWriter, r *http.Request)

func (*OrderHandler) MiddlewareAuth

func (h *OrderHandler) MiddlewareAuth(next http.Handler) http.Handler

func (*OrderHandler) MiddlewareValidateOrderItems

func (h *OrderHandler) MiddlewareValidateOrderItems(next http.Handler) http.Handler

func (*OrderHandler) UpdateOrderStatus

func (h *OrderHandler) UpdateOrderStatus(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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