Documentation ¶
Index ¶
- Constants
- func GlFilter() gin.HandlerFunc
- func GroupFilter() gin.HandlerFunc
- func Logger() gin.HandlerFunc
- func ParseRet(c *gin.Context) (ret interface{}, origErr interface{})
- func Return(c *gin.Context, code int, message string, err error, result interface{})
- func Wrap(toWrap interface{}) (gin.HandlerFunc, error)
- type HttpClient
- func (c *HttpClient) Method(method string, path string, header map[string]string, params interface{}) (*http.Response, string, error)
- func (c *HttpClient) MethodTimeout(method string, path string, header map[string]string, params interface{}, ...) (*http.Response, string, error)
- func (c *HttpClient) Start() error
- type HttpServer
- type HttpServerIniter
Constants ¶
View Source
const ( REMOTE_IP = "remote_ip" RET = "ret" RET_RAW_STR = "ret_raw_str" CODE = "code" ERR = "err" SESSION_LOG_LEVEL = "session_log_level" DEBUG = "debug" DATA = "data" DATA_RAW = "data_raw" REDIRECT_URL = "redirect_url" TraceID = "trace_id" )
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(toWrap interface{}) (gin.HandlerFunc, error)
example: warp to gin.HandlerFunc -- func(*Context)
Types ¶
type HttpClient ¶
func (*HttpClient) MethodTimeout ¶
func (*HttpClient) Start ¶
func (c *HttpClient) Start() error
type HttpServer ¶
type HttpServer struct { NoGinLog bool UseHttps bool HttpsCertFilePath string HttpsKeyFilePath string HttpServerShutdownTimeout int64 HttpServerReadTimeout int64 HttpServerWriteTimeout int64 HttpServerRunHost string HttpServerIniter HttpServerIniter // default DefaultHandlerMap map[string]interface{} // contains filtered or unexported fields }
func (*HttpServer) DefaultAddHandler ¶
func (h *HttpServer) DefaultAddHandler(url string, handle interface{})
func (*HttpServer) DefaultRegister ¶
func (h *HttpServer) DefaultRegister()
func (*HttpServer) Run ¶
func (h *HttpServer) Run() error
func (*HttpServer) SetInit ¶
func (h *HttpServer) SetInit(i HttpServerIniter)
func (*HttpServer) Stop ¶
func (h *HttpServer) Stop()
type HttpServerIniter ¶
Click to show internal directories.
Click to hide internal directories.