Documentation ¶
Index ¶
- Variables
- func Any(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func DELETE(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func GET(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func HEAD(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func OPTIONS(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func PATCH(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func POST(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func PUT(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func Run() error
- func ServeHTTP(w http.ResponseWriter, req *http.Request)
- func Use(middleware ...gin.HandlerFunc) gin.IRoutes
- type Config
- type Context
- type GinServer
- func (server *GinServer) Any(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) DELETE(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) GET(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) HEAD(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) Name() string
- func (server *GinServer) OPTIONS(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) PATCH(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) POST(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) PUT(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (server *GinServer) RoutesInfo() gin.RoutesInfo
- func (server *GinServer) Run() error
- func (server *GinServer) Serve(ctx context.Context) error
- func (server *GinServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (server *GinServer) Shutdown(ctx context.Context) error
- func (server *GinServer) Use(middleware ...gin.HandlerFunc) gin.IRoutes
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Default = StdConfig("default").Build()
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Mode string `config:"mode" desc:"Gin mode: debug,release,test. default is release"` Addr string `config:"addr" desc:"server listen addr, format is ip:port"` BasicAuth map[string]string `config:"basicAuth" desc:"basicAuth. key is username, value is password"` ReadTimeout time.Duration `config:"readTimeout"` WriteTimeout time.Duration `config:"writeTimeout"` IdleTimeout time.Duration `config:"idleTimeout"` // contains filtered or unexported fields }
func DefaultConfig ¶
type GinServer ¶
type GinServer struct {
// contains filtered or unexported fields
}
func (*GinServer) RoutesInfo ¶
func (server *GinServer) RoutesInfo() gin.RoutesInfo
Directories ¶
Path | Synopsis |
---|---|
mid
|
|
ginlog
Package ginlog is gin server logger middleware.
|
Package ginlog is gin server logger middleware. |
ginsession
Package ginsession is gin server session middleware.
|
Package ginsession is gin server session middleware. |
Click to show internal directories.
Click to hide internal directories.