Documentation
¶
Index ¶
- type APICfg
- type AccessLogCfg
- type AdminCfg
- 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 ¶
This section is empty.
Types ¶
type AccessLogCfg ¶
type Config ¶
type Config struct { API *APICfg `mapstructure:"api"` Admin *AdminCfg `mapstructure:"admin"` OpenTelemetry *tracing.OTLConfig `mapstructure:"opentelemetry"` AccessLog AccessLogCfg `mapstructure:"access_log"` Shutdown time.Duration `mapstructure:"shutdown"` }
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.