dto

package
v0.0.0-...-aec1c34 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicQueryParam

type BasicQueryParam struct {
	Paginator struct {
		Page     int
		PageSize int
	}
	Filter struct {
		OrederBy []string
	}
}

BasicQueryParam should be used to param basic pagination and orderby queryparams

func NewBasicQueryParam

func NewBasicQueryParam() *BasicQueryParam

type CreateOrderRequest

type CreateOrderRequest struct {
	PID uuid.UUID `json:"product_id"`
	Qty int       `json:"qty"`
}

type CreateOrderResponse

type CreateOrderResponse struct {
	OID uuid.UUID `json:"order_id,omitempty"`
	Err error     `json:"error,omitempty"`
}

func (CreateOrderResponse) Failed

func (resp CreateOrderResponse) Failed() error

type CustomClaim

type CustomClaim struct {
	*stdjwt.StandardClaims
	AccntID uint   `json:"accnt_id"`
	Email   string `json:"email"`
	Role    string `json:"role"`
}

CustomClaim defines the claim to be used in JWT

type GetOrderResponse

type GetOrderResponse struct {
	OID      string `json:"order_id"`
	Status   string `json:"status"`
	Qty      int    `json:"qty"`
	ProdName string `json:"product_name"`
}

type ListOrderResponse

type ListOrderResponse struct {
	Orders []GetOrderResponse `json:"orders,omitempty"`
	Err    error              `json:"error,omitempty"`
}

func (ListOrderResponse) Failed

func (resp ListOrderResponse) Failed() error

Jump to

Keyboard shortcuts

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