response

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessCode             = "0000"
	MissParameterCode       = "1000"
	TypeErrorCode           = "1001"
	AuthExpireCode          = "1004"
	InternalServerErrorCode = "1005"
)
View Source
const (
	SuccessMsg             = "success"
	MissParameterMsg       = "missing parameter"
	TypeErrorMsg           = "type is error"
	InternalServerErrorMsg = "internal server error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Data any    `json:"data"`
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

func Get

func Get() (*Result, func())

func (*Result) EventMsg

func (t *Result) EventMsg(w http.ResponseWriter, eventName string) error

func (*Result) Json

func (t *Result) Json(w http.ResponseWriter, httpCode int) error

Jump to

Keyboard shortcuts

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