Documentation ¶
Index ¶
- func SetCustomMetricLabel(c *gin.Context, value string)
- type APIConfig
- type AccessLogConfig
- type AdminConfig
- type Config
- type Server
- func (srv *Server) GetAPIEngine() *gin.Engine
- func (srv *Server) GetAPIRouteGroup() *gin.RouterGroup
- func (srv *Server) GetAdminEngine() *gin.Engine
- func (srv *Server) GetAdminRouteGroup() *gin.RouterGroup
- func (srv *Server) Run() error
- func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (srv *Server) Shutdown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCustomMetricLabel ¶
SetCustomMetricLabel was used to set the custom metric key in the gin context
Types ¶
type AccessLogConfig ¶
type AdminConfig ¶
type Config ¶
type Config struct { API *APIConfig `mapstructure:"api"` Admin *AdminConfig `mapstructure:"admin"` AccessLog AccessLogConfig `mapstructure:"access_log"` GracefulShutdownTimeout time.Duration `mapstructure:"graceful_shutdown_timeout"` }
func DefaultConfig ¶
func DefaultConfig() *Config
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetAPIEngine ¶
func (*Server) GetAPIRouteGroup ¶
func (srv *Server) GetAPIRouteGroup() *gin.RouterGroup
GetAPIRouteGroup return api's gin engine that user can add api handlers
func (*Server) GetAdminEngine ¶
func (*Server) GetAdminRouteGroup ¶
func (srv *Server) GetAdminRouteGroup() *gin.RouterGroup
GetAdminRouteGroup return admin's gin engine that user can add admin handlers
Click to show internal directories.
Click to hide internal directories.