response

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HttpStatusOk = 200
View Source
const HttpStatusServerErr = 500

Variables

This section is empty.

Functions

func ErrorJson

func ErrorJson(ctx iris.Context, e error)

func ErrorString

func ErrorString(ctx iris.Context, err error)

func SuccessJson

func SuccessJson(ctx iris.Context, data ...interface{})

func SuccessString

func SuccessString(ctx iris.Context, res string)

func Unauthorized

func Unauthorized(ctx iris.Context)

Types

type Exception

type Exception struct {
	Code    int
	Message string
	Reason  string
	// contains filtered or unexported fields
}

func ThrowErr

func ThrowErr(code int, msg ...string) *Exception

func (*Exception) Error

func (e *Exception) Error() string

Jump to

Keyboard shortcuts

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