request

package
v0.0.0-...-cfa269c Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_PAGE     = 1
	DEFAULT_PER_PAGE = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseQuery

type BaseQuery struct {
	Page    int    `query:"page"`
	Limit   int    `query:"limit"`
	Keyword string `query:"keyword"`
	Sort    string `query:"sort"`
}

func NewBaseQuery

func NewBaseQuery(r *http.Request) BaseQuery

type Login

type Login struct {
	Email    string            `json:"email" validate:"required,email"`
	Password string            `json:"password" validate:"required"`
	Role     constant.UserRole `json:"-"`
}

type Register

type Register struct {
	Name        string            `json:"name" validate:"required"`
	Email       string            `json:"email" validate:"required,email"`
	PhoneNumber string            `json:"phone_number" validate:"required"`
	Password    string            `json:"password" validate:"required"`
	Role        constant.UserRole `json:"-"`
}

Jump to

Keyboard shortcuts

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