Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePost ¶
type CreatePost struct { Title string `json:"title" validate:"required,min=8" example:"sample title"` Description string `json:"description" validate:"required,min=30" example:"sample description for creating a new post with swagger"` }
func (*CreatePost) Validate ¶
func (cp *CreatePost) Validate() *common.ValidationError
type UserLogin ¶
type UserLogin struct { Email string `json:"email" validate:"required,email" example:"test654@test.com"` Password string `json:"password" validate:"required" example:"P@ssWord123"` }
func (*UserLogin) Validate ¶
func (t *UserLogin) Validate() *common.ValidationError
type UserRegister ¶
type UserRegister struct { Name string `json:"name" validate:"required,min=3,ascii" example:"artm2000"` Email string `json:"email" validate:"required,email" example:"test654@test.com"` Password string `json:"password,omitempty" validate:"required,password" example:"P@ssWord123"` }
func (*UserRegister) Validate ¶
func (t *UserRegister) Validate() *common.ValidationError
Click to show internal directories.
Click to hide internal directories.