responses

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(ctx *gin.Context, msg M, args ...interface{})

BadRequest have 3 args (message,data,extra)

func Conflict added in v0.6.0

func Conflict(ctx *gin.Context, msg M, args ...interface{})

Conflict have 3 args (message,data,extra)

func Created

func Created(ctx *gin.Context, msg M, args ...interface{})

Created have 3 args (message,data,extra)

func Forbidden

func Forbidden(ctx *gin.Context, msg M, args ...interface{})

Forbidden have 3 args (message,data,extra)

func Gone

func Gone(ctx *gin.Context, msg M, args ...interface{})

Gone have 3 args (message,data,extra)

func MethodNotAllowed added in v0.5.2

func MethodNotAllowed(ctx *gin.Context, msg M, args ...interface{})

MethodNotAllowed have 3 args (message,data,extra)

func NoContent added in v0.6.0

func NoContent(ctx *gin.Context, msg M, args ...interface{})

NoContent have 3 args (message,data,extra)

func NotAcceptable

func NotAcceptable(ctx *gin.Context, msg M, args ...interface{})

NotAcceptable have 3 args (message,data,extra)

func NotFound

func NotFound(ctx *gin.Context, msg M, args ...interface{})

NotFound have 3 args (message,data,extra)

func NotFoundOrBadRequestGorm

func NotFoundOrBadRequestGorm(err error, ctx *gin.Context, msg M, args ...interface{})

func NotFoundOrBadRequestMongo

func NotFoundOrBadRequestMongo(err error, ctx *gin.Context, msg M, args ...interface{})

func Ok

func Ok(ctx *gin.Context, msg M, args ...interface{})

Ok have 3 args (message,data,extra)

func PaymentRequired added in v0.6.0

func PaymentRequired(ctx *gin.Context, msg M, args ...interface{})

PaymentRequired have 3 args (message,data,extra)

func ProxyAuthRequired added in v0.6.0

func ProxyAuthRequired(ctx *gin.Context, msg M, args ...interface{})

ProxyAuthRequired have 3 args (message,data,extra)

func RequestTimeOut added in v0.6.0

func RequestTimeOut(ctx *gin.Context, msg M, args ...interface{})

RequestTimeOut have 3 args (message,data,extra)

func ToManyRequests added in v0.6.0

func ToManyRequests(ctx *gin.Context, msg M, args ...interface{})

ToManyRequests have 3 args (message,data,extra)

func Unauthorized

func Unauthorized(ctx *gin.Context, msg M, args ...interface{})

Unauthorized have 3 args (message,data,extra)

Types

type Data added in v0.4.5

type Data struct {
	Result     interface{} `json:"result"`
	Pagination interface{} `json:"pagination"`
}

type M added in v0.5.0

type M struct {
	//C for code
	C string `json:"c"`
	//M for message
	M string `json:"m"`
}

M for message

type Response added in v0.4.5

type Response struct {
	Code    string      `json:"code,omitempty"`
	Data    interface{} `json:"data,omitempty"`
	Extra   interface{} `json:"extra,omitempty"`
	IsError bool        `json:"is_error"`
	Message string      `json:"message"`
	Status  int         `json:"status"`
}

Jump to

Keyboard shortcuts

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