api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(c *gin.Context)

HealthCheck will return OK if the service is healthy.

func RouteNotFound

func RouteNotFound(c *gin.Context)

RouteNotFound 未找到相关路由

func SendResponse

func SendResponse(c *gin.Context, err error, data interface{})

SendResponse 返回json

Types

type Response

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

Response api的返回结构体

Jump to

Keyboard shortcuts

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