response

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseJSON

func ResponseJSON(c *gin.Context, code Code, data interface{}, err *ResponseError)

Types

type Code added in v1.0.23

type Code int

type ResponseError added in v1.0.23

type ResponseError struct {
	// contains filtered or unexported fields
}

func WrapToast added in v1.0.23

func WrapToast(err error, toast string) *ResponseError

WrapToast return a new ResponseError

func WrapToastf added in v1.0.23

func WrapToastf(err error, toast string, args ...interface{}) *ResponseError

WrapToastf return a new format ResponseError

func (*ResponseError) Cause added in v1.0.23

func (r *ResponseError) Cause() error

Cause

func (*ResponseError) Error added in v1.0.23

func (r *ResponseError) Error() string

Error

func (*ResponseError) SetError added in v1.0.23

func (r *ResponseError) SetError(err error)

SetError

func (*ResponseError) SetToast added in v1.0.23

func (r *ResponseError) SetToast(toast string)

SetToast

func (*ResponseError) Toast added in v1.0.23

func (r *ResponseError) Toast() string

Toast

func (*ResponseError) Unwrap added in v1.0.23

func (r *ResponseError) Unwrap() error

Unwrap

Jump to

Keyboard shortcuts

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