Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Route ¶ added in v0.5.0
type Route struct {
Method string
Path string
Handler gin.HandlerFunc
Action string
}
Route represents an application route
type Router ¶
type Router struct {
*gin.Engine
Logger *cm_logger.Logger
Authorizer *cm_auth.Authorizer
Routes []*Route
TlsCert string
TlsKey string
ContextPath string
Depth int
}
Router handles all incoming HTTP requests
func NewRouter ¶
func NewRouter(options RouterOptions) *Router
NewRouter creates a new Router instance
type RouterOptions ¶ added in v0.5.0
type RouterOptions struct {
Logger *cm_logger.Logger
Username string
Password string
ContextPath string
TlsCert string
TlsKey string
PathPrefix string
LogHealth bool
EnableMetrics bool
AnonymousGet bool
Depth int
MaxUploadSize int
BearerAuth bool
AuthRealm string
AuthService string
AuthCertPath string
}
RouterOptions are options for constructing a Router
Click to show internal directories.
Click to hide internal directories.