response

package
v0.0.5-timer Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromHTTPResponse

func FromHTTPResponse[T any](response *HTTPResponse) *T

func GinError

func GinError(c *gin.Context, err error)

func GinParamError

func GinParamError(c *gin.Context, err error)

func GinSuccess

func GinSuccess(c *gin.Context, data any)

Types

type HTTPResponse

type HTTPResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data"`
}

func NewHTTPResponse

func NewHTTPResponse(bs []byte) *HTTPResponse

Jump to

Keyboard shortcuts

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