controller

package
v0.0.0-...-2cd7638 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgOK = "ok"
)

Variables

View Source
var (
	OK = ResponseEntity{
		Code: http.StatusOK,
		Msg:  MsgOK,
	}
)

Functions

func Authorization

func Authorization(c *gin.Context)

func CancelRedisSubscribe

func CancelRedisSubscribe(c *gin.Context)

CancelRedisSubscribe 取消指定通道的redis订阅

func InitRouter

func InitRouter() *gin.Engine

InitRouter 加载路由

func LocalCacheStats

func LocalCacheStats(c *gin.Context)

LocalCacheStats cache统计数据

func Ping

func Ping(c *gin.Context)

Ping 健康监测接口

func PprofCmdline

func PprofCmdline(c *gin.Context)

func PprofHandler

func PprofHandler(c *gin.Context)

func PprofIndex

func PprofIndex(c *gin.Context)

func PprofProfile

func PprofProfile(c *gin.Context)

func PprofSymbol

func PprofSymbol(c *gin.Context)

func PprofTrace

func PprofTrace(c *gin.Context)

func Recovery

func Recovery(c *gin.Context, recovered interface{})

Recovery 统一处理接口调用过程中的panic,避免影响web服务

func RedisPoolStats

func RedisPoolStats(c *gin.Context)

RedisPoolStats redis连接池统计数据

func RedisSubscribes

func RedisSubscribes(c *gin.Context)

RedisSubscribes redis订阅列表

Types

type ResponseEntity

type ResponseEntity struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

func ResponseError

func ResponseError(errMsg string) *ResponseEntity

func ResponseOK

func ResponseOK(data interface{}) *ResponseEntity

Jump to

Keyboard shortcuts

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