dto

package
v0.0.0-...-9ad592c Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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 CaptchaVerify

type CaptchaVerify struct {
	ID   string `json:"id" binding:"required"`
	Code string `json:"code" binding:"required"`
}

type JwtClaims

type JwtClaims struct {
	ID       string
	Username string
	jwt.StandardClaims
}

type Login

type Login struct {
	Username    string `json:"username" validate:"required"`
	Password    string `json:"password" validate:"required"`
	CaptchaID   string `json:"captcha_id" validate:"required"`
	CaptchaCode string `json:"captcha_code" validate:"required"`
}

type OrderDirection

type OrderDirection string
const (
	OrderByASC      OrderDirection = "ASC"
	OrderByDESC     OrderDirection = "DESC"
	OrderDefaultKey                = "record_id"
)

type OrderParam

type OrderParam struct {
	Key       string         `query:"order_key"`
	Direction OrderDirection `query:"order_direction"`
}

func (OrderParam) ParseOrder

func (a OrderParam) ParseOrder() string

type Pagination

type Pagination struct {
	Total    int64 `json:"total"`
	Current  int   `json:"current"`
	PageSize int   `json:"page_size"`
}

type PaginationParam

type PaginationParam struct {
	Current  int `query:"current"`
	PageSize int `query:"page_size" validate:"max=128"`
}

func (*PaginationParam) GetCurrent

func (a *PaginationParam) GetCurrent() int

func (*PaginationParam) GetPageSize

func (a *PaginationParam) GetPageSize() int

Jump to

Keyboard shortcuts

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