Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Validate = validator.New(validator.WithRequiredStructEnabled())
Functions ¶
This section is empty.
Types ¶
type ProductCReq ¶
type ProductCReq struct { Name string `json:"name" validate:"required"` Price int64 `json:"price" validate:"gt=0"` }
func (ProductCReq) ToRepo ¶
func (p ProductCReq) ToRepo() repo.CreateProductParams
type ProductUReq ¶
type ProductUReq struct { Name string `json:"name" validate:"required"` Price int64 `json:"price" validate:"gt=0"` ID int32 `json:"-"` }
func (ProductUReq) SetID ¶
func (p ProductUReq) SetID(id int32) any
func (ProductUReq) ToRepo ¶
func (p ProductUReq) ToRepo() repo.UpdateProductParams
type UserCReq ¶
type UserCReq struct { Name string `json:"name" validate:"required"` Email string `json:"email" validate:"required,email"` }
func (UserCReq) ToRepo ¶
func (p UserCReq) ToRepo() repo.CreateUserParams
Click to show internal directories.
Click to hide internal directories.