basichandlers

package
v0.0.0-...-851e7b8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetPageNumber

func ResetPageNumber(pageNumber int) int

ResetPageNumber when page number is empty

func ResetRows

func ResetRows(rows int) int

ResetRows when page row is empty

Types

type Basic

type Basic struct {
}

Basic is defined for common api response output

func (*Basic) Response

func (b *Basic) Response(code int, h gin.H) (int, interface{})

Response with basic structor 构造响应 统一的响应数据结构构造

TODO:构造数据时该方法将取得请求的信息,并自动返回本地化的接口回执

type CaptchaRequest

type CaptchaRequest struct {
	// 验证码
	//
	// required: false
	// min: 1
	Captcha string `json:"captcha"`
	// 验证码ID
	//
	// required: false
	// min: 1
	CaptchaID string `json:"captchaID"`
}

CaptchaRequest model swagger:model CaptchaRequest

type PaginationRequest

type PaginationRequest struct {
	// 分页长度
	//
	// required: false
	// min: 1
	Rows int `json:"rows"`
	// 要请求的页面
	//
	// required: false
	// min: 1
	PageNumber int `json:"pageNumber"`
}

PaginationRequest model swagger:model PaginationRequest

Jump to

Keyboard shortcuts

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