Documentation
¶
Overview ¶
Package handler comes from admin/admin.go of trpc-go you can add this handler to your http(s) server
Index ¶
Constants ¶
View Source
const PattenLoglevel = "/cmds/loglevel"
PattenLoglevel View/Set the log level of the framework
Variables ¶
View Source
var ( ReturnErrCodeParam = "errorcode" ReturnMessageParam = "message" ErrCodeServer = 1 )
return param.
Functions ¶
func ErrorOutput ¶
func ErrorOutput(w http.ResponseWriter, error string, code int)
ErrorOutput Unified error output.
func GinLogger ¶
func GinLogger() gin.HandlerFunc
GinLogger forked from github.com/toorop/gin-logrus
func RegisterHandler ¶
func RegisterHandlerWithPath ¶
Types ¶
type LevelHandler ¶
type LevelHandler struct{}
func (LevelHandler) ServeHTTP ¶
func (h LevelHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.