Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseRoutesMiddleWares ¶
func UseRoutesMiddleWares(m ...gin.HandlerFunc) func(f *featuredRoutes)
Types ¶
type ConsulConf ¶
type Middlerware ¶
type Middlerware gin.HandlerFunc
type RestConf ¶
type RestConf struct { Host string `json:"host,default=0.0.0.0"` Port int `json:"port"` MaxConns int `json:"maxConns,default=10000"` MaxBytes int64 `json:",default=1048576,range=[0:33554432]"` Timeout int64 `json:"timeout,default=3000"` CpuThreshold int64 `json:"cpuThreshold,default=900, range=[0,1000]"` CertFile string `json:",optional"` KeyFile string `json:",optional"` Verbose bool `json:",optional"` Mode string `json:"mode,optional"` Consul ConsulConf `json:"consul` }
type RouteOption ¶
type RouteOption func(r *featuredRoutes)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func MustNewServer ¶
func (*Server) AddRoutes ¶
func (s *Server) AddRoutes(UrlPrefix string, rs []Route, opts ...RouteOption)
func (*Server) Use ¶
func (s *Server) Use(m ...gin.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.