api

package
v0.0.0-...-1f16b4e Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paging

func Paging(r *http.Request) (offset, limit int)

Paging 获取分页数据 limit: 默认20, offset:默认0

func ResError

func ResError(w http.ResponseWriter, errMsg string)

func ResSuccess

func ResSuccess(w http.ResponseWriter, data interface{}, pagingTotal ...int64)

Types

type AccountJwt

type AccountJwt struct {
	Id int64
}

type Headers

type Headers struct {
	// jwt token解析出的数据
	Account AccountJwt
}

type Response

type Response struct {
	Code   int         `json:"code"`
	Msg    string      `json:"msg"`
	Result interface{} `json:"result"`
	Total  int64       `json:"totalCount"` //分页时的总数
}

Jump to

Keyboard shortcuts

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