response

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 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