response

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

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

func InternalServerError

func InternalServerError(message string, err error) Response

func NotFound

func NotFound(message string) Response

func Send

func Send(code int, message string, data interface{}) Response

func Success

func Success(message string, data interface{}) Response

Success 发送成功响应

func UnAuthenticated

func UnAuthenticated(message string) Response

UnAuthenticated Authentication Failure

func ValidationError

func ValidationError(message string, err error) Response

Jump to

Keyboard shortcuts

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