response

package
v1.3.172 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 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