dto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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