Documentation ¶
Index ¶
- type CategoryEndpoints
- type CheckoutOrderRequest
- type CoreCategory
- type CreateOrderRequest
- type DelectProductResponse
- type DeleteCategoryRequest
- type DeleteCategoryResponse
- type DeleteOrderRequest
- type DeleteOrderResponse
- type DeleteProductRequest
- type GetCategoryRequest
- type GetCategoryResponse
- type GetOrderByPaymentIDRequest
- type GetOrderRequest
- type GetPaymentRequest
- type GetPaymentResponse
- type GetProductRequest
- type InsertCategoryRequest
- type InsertCategoryResponse
- type InsertProductRequest
- type ListCategoriesRequest
- type ListCategoriesResponse
- type ListOrderRequest
- type ListProductsByCategoryRequest
- type OrderList
- type OrderResponse
- type OrdersEndpoint
- type PaymentsEndpoints
- type ProductList
- type ProductResponse
- type ProductsEndpoints
- type UpdateOrderRequest
- type UpdateProductRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryEndpoints ¶
type CategoryEndpoints struct { GetCategoryEndpoint endpoint.Endpoint InsertCategoryEndpoint endpoint.Endpoint ListCategoriesEndpoint endpoint.Endpoint DeleteCategoryEndpoint endpoint.Endpoint }
func MakeCategoryEndpoints ¶
func MakeCategoryEndpoints(svc service.CategoriesService) CategoryEndpoints
type CheckoutOrderRequest ¶
type CheckoutOrderRequest struct {
ID string `json:"id"`
}
type CoreCategory ¶
type CoreCategory struct { ID string `json:"id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at,omitempty"` Name string `json:"name"` }
CATEGORIES
type CreateOrderRequest ¶
type DelectProductResponse ¶
type DelectProductResponse struct {
Deleted bool `json:"Deleted"`
}
type DeleteCategoryRequest ¶
type DeleteCategoryRequest struct {
ID string `json:"id"`
}
type DeleteCategoryResponse ¶
type DeleteCategoryResponse struct {
ID string `json:"id"`
}
type DeleteOrderRequest ¶
type DeleteOrderRequest struct {
ID string `json:"id"`
}
type DeleteOrderResponse ¶
type DeleteOrderResponse struct {
Deleted string `json:"deleted"`
}
type DeleteProductRequest ¶
type DeleteProductRequest struct {
ID string `json:"id"`
}
type GetCategoryRequest ¶
type GetCategoryRequest struct {
ID string `json:"id"`
}
type GetCategoryResponse ¶
type GetCategoryResponse struct {
CoreCategory
}
type GetOrderByPaymentIDRequest ¶
type GetOrderByPaymentIDRequest struct {
PaymentID string `json:"payment_id"`
}
type GetOrderRequest ¶
type GetOrderRequest struct {
ID string `json:"id"`
}
type GetPaymentRequest ¶
type GetPaymentRequest struct {
ID string `json:"id"`
}
type GetPaymentResponse ¶
type GetProductRequest ¶
type GetProductRequest struct {
ID string `json:"id"`
}
type InsertCategoryRequest ¶
type InsertCategoryRequest struct {
Name string `json:"name" description:"Nome da categoria de produto"`
}
type InsertCategoryResponse ¶
type InsertCategoryResponse struct {
CoreCategory
}
type InsertProductRequest ¶
type ListCategoriesRequest ¶
type ListCategoriesResponse ¶
type ListCategoriesResponse struct { Categories []CoreCategory `json:"categories"` Limit int `json:"limit" default:"10"` Offset int `json:"offset"` Total int64 `json:"total"` }
type ListOrderRequest ¶
type OrderList ¶
type OrderList struct { Orders []OrderResponse `json:"orders"` Limit int `json:"limit" default:"10"` Offset int `json:"offset"` Total int `json:"total"` }
type OrderResponse ¶
type OrderResponse struct { ID string `json:"id" description:"ID do Pedido"` PaymentID string `json:"payment_id,omitempty" description:"ID do pagamento"` CreatedAt string `json:"created_at" description:"Data de criação"` UpdatedAt string `json:"updated_at,omitempty" description:"Data de atualização"` DeletedAt string `json:"deleted_at,omitempty" description:"Data de deleção"` Price string `json:"price" description:"Preço do pedido"` Status string `json:"status" description:"Status do pedido"` Products []ProductResponse `json:"products" description:"Lista de Pedidos"` }
ORDERS
func OrderResponseFromModel ¶
func OrderResponseFromModel(in *models.Order) OrderResponse
type OrdersEndpoint ¶
type OrdersEndpoint struct { GetOrderEndpoint endpoint.Endpoint CreateOrderEndpoint endpoint.Endpoint UpdateOrderItemsEndpoint endpoint.Endpoint ListOrdersEndpoint endpoint.Endpoint DeleteOrderEndpoint endpoint.Endpoint OrderCheckoutEndpoint endpoint.Endpoint GetOrderByPaymentID endpoint.Endpoint }
func MakeOrdersEndpoint ¶
func MakeOrdersEndpoint(svc service.OrdersService) OrdersEndpoint
type PaymentsEndpoints ¶
func MakePaymentsEndpoint ¶
func MakePaymentsEndpoint(svc service.PaymentsService) PaymentsEndpoints
type ProductList ¶
type ProductList struct { Products []ProductResponse `json:"products"` Limit int `json:"limit" default:"10"` Offset int `json:"offset"` Total int `json:"total"` }
type ProductResponse ¶
type ProductResponse struct { ID string `json:"id,omitempty"` Name string `json:"name"` Description string `json:"description"` CategoryID string `json:"category_id"` Price string `json:"price"` CreatedAt string `json:"created_at,omitempty" readOnly:"true"` UpdatedAt string `json:"updated_at,omitempty" readOnly:"true"` DeletedAt string `json:"deleted_at,omitempty" readOnly:"true"` }
func ProductResponseFromModel ¶
func ProductResponseFromModel(in *models.Product) ProductResponse
type ProductsEndpoints ¶
type ProductsEndpoints struct { GetProductEndpoint endpoint.Endpoint InsertProductEndpoint endpoint.Endpoint UpdateProductEndpoint endpoint.Endpoint DeleteProductEndpoint endpoint.Endpoint ListProductsByCategory endpoint.Endpoint }
func MakeProductsEndpoint ¶
func MakeProductsEndpoint(svc service.ProductsService) ProductsEndpoints
type UpdateOrderRequest ¶
Click to show internal directories.
Click to hide internal directories.