xxgf

package
v0.2.47 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

@author fenglei

Index

Constants

View Source
const (
	ERROR   = "error"
	SUCCESS = "success"
)

Variables

This section is empty.

Functions

func ApiWrite

func ApiWrite(r *ghttp.Request, content ...interface{})

func ApiWriteJson

func ApiWriteJson(r *ghttp.Request, content interface{})

func FailWithData

func FailWithData(r *ghttp.Request, msg string)

FailWithData 错误

func FailWithDataInfoLog added in v0.1.36

func FailWithDataInfoLog(r *ghttp.Request, msg string)

FailWithDataInfoLog 错误不记录日志

func OkWithData

func OkWithData(r *ghttp.Request, content interface{})

func OkWithDataPage added in v0.1.44

func OkWithDataPage(r *ghttp.Request, content interface{}, total int64)

func RunWindowsServer

func RunWindowsServer(s *ghttp.Server, shutdownHook func()) error

Types

type Response

type Response struct {
	Code   string      `json:"code"`
	Result interface{} `json:"result"`
	Msg    interface{} `json:"message"`
}

type ResponsePage

type ResponsePage struct {
	Code   string      `json:"code"`
	Result interface{} `json:"result"`
	Total  int64       `json:"total"`
	Msg    interface{} `json:"message"`
}

Jump to

Keyboard shortcuts

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