response

package
v0.0.0-...-a203ad5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(c *gin.Context, status int, message string)

func SuccessResponse

func SuccessResponse(c *gin.Context, status int, payload interface{})

Types

type Error

type Error struct {
	ErrorCode string      `json:"errorCode"`
	Message   string      `json:"message"`
	Details   interface{} `json:"details"`
	RequestId string      `json:"request_id"`
	Timestamp time.Time   `json:"timestamp"`
}

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message" example:"Success"`
	Data    interface{} `json:"data" example:"JSON information" swaggerignore:"true"`
}

Response @Description response information.

Jump to

Keyboard shortcuts

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