reply

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func Fail(c *gin.Context)

func FailWithDetailed

func FailWithDetailed(payload interface{}, message string, c *gin.Context)

func FailWithMessage

func FailWithMessage(message string, c *gin.Context)

func NewReply

func NewReply(code int, payload interface{}, message string, c *gin.Context)

func Ok

func Ok(c *gin.Context)

func OkWithDetailed

func OkWithDetailed(payload interface{}, message string, c *gin.Context)

func OkWithMessage

func OkWithMessage(message string, c *gin.Context)

func OkWithPayload

func OkWithPayload(payload interface{}, c *gin.Context)

Types

type Reply

type Reply struct {
	Code    int         `json:"code"`
	Payload interface{} `json:"payload,omitempty"`
	Message string      `json:"message"`
}

Jump to

Keyboard shortcuts

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