app

package
v0.0.0-...-bb7101a Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RELOGIN = 1
	ERROR   = 7
	SUCCESS = 0
)

Variables

This section is empty.

Functions

func Fail

func Fail(c context.Context,
	ctx *app.RequestContext)

func FailWithMessage

func FailWithMessage(c context.Context,
	ctx *app.RequestContext, message string)

func Ok

func Ok(c context.Context,
	ctx *app.RequestContext)

func OkWithBody

func OkWithBody(data []byte, ctx *app.RequestContext, bodyLength int)

func OkWithData

func OkWithData(c context.Context,
	ctx *app.RequestContext, data interface{})

func OkWithDetailed

func OkWithDetailed(c context.Context,
	ctx *app.RequestContext, data interface{}, message string)

func OkWithMessage

func OkWithMessage(c context.Context,
	ctx *app.RequestContext, msg string)

func ReLoginWithMessage

func ReLoginWithMessage(c context.Context,
	ctx *app.RequestContext, message string)

func Result

func Result(c context.Context,
	ctx *app.RequestContext,
	code int,
	data interface{}, msg string)

Types

type Response

type Response struct {
	Code    int         `json:"code"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
	TraceID string      `json:"trace_id"`
}

Jump to

Keyboard shortcuts

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