httpserver

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP_OK int = 200
View Source
const SUCCESS string = "Success"

Variables

This section is empty.

Functions

func Cros

func Cros() gin.HandlerFunc

Types

type EmptyObj

type EmptyObj struct {
}

空响应

type R

type R struct {
	Code int         `json:"code" binding:"required"`
	Msg  string      `json:"msg" binding:"required"`
	Data interface{} `json:"data"`
}

Http Return

func Error

func Error(s string) R

func Error400

func Error400(e error) R

func Error400EmptyObj

func Error400EmptyObj(e error) R

func Error500

func Error500(e error) R

func Error500EmptyObj

func Error500EmptyObj(e error) R

func Ok

func Ok() R

func OkWithData

func OkWithData(data interface{}) R

func OkWithEmpty

func OkWithEmpty() R

func OkWithMsg

func OkWithMsg(msg string) R

func ReturnEmptyObj

func ReturnEmptyObj() R

func ReturnEmptyObjs

func ReturnEmptyObjs() R

Jump to

Keyboard shortcuts

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