# README
ginx
# Functions
DefaultServerOptions create a default options.
NewApiHandler create a new gin.HandlerFunc.
NewBucket create a new bucket.
NewHandler create a new gin.HandlerFunc, with no request, it's often been used to wrap a middleware.
NewPage 创建一个Page对象.
No description provided by the author
NewPageHandler 创建一个页面处理方法 t - template of current page r - request f - handler func ms - middleware list, allow empty.
NewPageWithData 创建一个Page对象,并初始化数据.
NewRequest create a new request by the given request.
NewServer create a http server.
NewView create a new view.
No description provided by the author
RequestParams get current request content 此方法用于在日志记录时获取请求内容.
UseApiMiddleware register global api middlewares.
UseApiResponser register a customized responser.
UseLogger register a global logger.
UsePageMiddleware register global page middlewares.
Wait 信号监听,当监听到退出信号时,执行资源释放函数,并退出程序 f 程序退出前的资源释放方法.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
define gin run mode constant.
define gin run mode constant.
define gin run mode constant.
# Structs
Bucket a bucket is a group of apis, like *gin.RouterGroup.
DefaultApiResponser a default responser implements responser interface.
HTTPServer define a simple http server.
Page 定义一个页面数据.
PageError 定义一个页面错误, 用于保存错误以及堆栈信息.
ServerOptions http server run options.
No description provided by the author
# Interfaces
ApiError the error should return an extra code that indicate which kind of error it is.
ApiResponser a responser was used to show request result to client.
Handler a group of apis, support auto register routes to gin.RouterGroup.
Request a request from remote client.
Response any response send to client.
ValidatableRequest a request should be validated by call it's Validate function manually.
# Type aliases
ApiHandlerFunc the logic to handle the api request.
ApiMiddleware add middleware support to each single handler.
HandlerFunc the logic to handle the api request.
PageHandlerFunc the logic to handle the page request.
PageInitFunc 定义一个页面初始化方法,返回map[string]interface{},返回的数据将放到页面的会话数据(Page.Session)中.
PageMiddleware add middleware support to each single handler.
ServerHookFunc http server init & stop hooks.
ViewOption option for view.