response

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

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

func Error

func Error(c *gin.Context, code int, message string)

func InternalError

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

func NotFound

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

func Success

func Success(c *gin.Context, data interface{})

func SuccessWithMessage

func SuccessWithMessage(c *gin.Context, message string, data interface{})

Types

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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