Help us shape the future of Go! Take the 2026 Go Developer Survey

response

package
v1.3.209 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ResponseBody = "response_body"

Variables

This section is empty.

Functions

func ErrorResponseFields

func ErrorResponseFields(c *gin.Context, fieldsError errors.FieldErrors, data interface{})

func ErrorResponseGlobal

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

func NotFoundResponse

func NotFoundResponse(c *gin.Context)

func SuccessResponse

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

Types

type Error

type Error struct {
	GlobalError string            `json:"GlobalError,omitempty"`
	FieldsError map[string]string `json:"FieldsError,omitempty"`
	Result      *interface{}      `json:"Result,omitempty"`
}

Jump to

Keyboard shortcuts

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