Documentation
¶
Index ¶
- func NewPathMatcher(original string, regex *regexp.Regexp, paramName []string) pathMatcher
- type APIRoute
- type APIRouter
- func (a *APIRouter) AddRoute(path string, handler interface{}, methods ...string) types.IAPIRoute
- func (a *APIRouter) AddWebsocketRoute(path string, handler interface{}, origin func(r *http.Request) bool, ...) types.IAPIRoute
- func (a *APIRouter) DELETE(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) GET(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) OPTIONS(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) PATCH(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) POST(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) PUT(path string, handler interface{}) types.IAPIRoute
- func (a *APIRouter) Prefix(prefix string)
- func (a *APIRouter) Secure(authorization bool)
- func (a *APIRouter) Version(version string)
- func (a *APIRouter) WEBSOCKET(path string, handler interface{}, origin func(r *http.Request) bool) types.IAPIRoute
- func (a *APIRouter) Wrap(middlewares ...types.Middleware)
- type Application
- func (s *Application) AddMiddleware(middleware types.Middleware)
- func (s *Application) AddRouter(rtrg func(types.IAPIRouter))
- func (s *Application) Build(port int) types.IApplication
- func (s *Application) CSRF() types.ICSRFBuilder
- func (s *Application) Cors() types.ICORSBuilder
- func (s *Application) Di() types.IContainerBuilder
- func (s *Application) GetLogger() *zap.Logger
- func (s *Application) HTTPSRedirect() types.IHTTPSRedirectBuilder
- func (s *Application) Include() types.IIncludeBuilder
- func (s *Application) JWTBearer() types.IJWTBuilder
- func (s *Application) Mux() http.Handler
- func (s *Application) RateLimiter() types.IRateLimiterBuilder
- func (s *Application) Sanitization() types.ISanitizationBuilder
- func (s *Application) SetJwtConfig(jwtConfig types.IJWTConfig)
- type Mux
- func (m *Mux) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (m *Mux) SetDig(dig types.IDigContainer)
- func (m *Mux) SetGlobalMiddlewares(middlewares []types.Middleware)
- func (m *Mux) SetJwtConfig(jwtConfig types.IJWTConfig)
- func (m *Mux) SetLogger(Logger *zap.Logger)
- func (m *Mux) SetRouters(routers []*APIRouter)
- func (m *Mux) SetStaticFile(static map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIRoute ¶
type APIRoute struct {
// contains filtered or unexported fields
}
func (*APIRoute) Wrap ¶
func (a *APIRoute) Wrap(middlewares ...types.Middleware)
type APIRouter ¶
type APIRouter struct {
// contains filtered or unexported fields
}
func (*APIRouter) AddWebsocketRoute ¶
func (*APIRouter) Wrap ¶
func (a *APIRouter) Wrap(middlewares ...types.Middleware)
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication() *Application
func (*Application) AddMiddleware ¶
func (s *Application) AddMiddleware(middleware types.Middleware)
func (*Application) AddRouter ¶
func (s *Application) AddRouter(rtrg func(types.IAPIRouter))
func (*Application) Build ¶
func (s *Application) Build(port int) types.IApplication
func (*Application) CSRF ¶
func (s *Application) CSRF() types.ICSRFBuilder
func (*Application) Cors ¶
func (s *Application) Cors() types.ICORSBuilder
func (*Application) Di ¶
func (s *Application) Di() types.IContainerBuilder
func (*Application) GetLogger ¶
func (s *Application) GetLogger() *zap.Logger
func (*Application) HTTPSRedirect ¶
func (s *Application) HTTPSRedirect() types.IHTTPSRedirectBuilder
func (*Application) Include ¶
func (s *Application) Include() types.IIncludeBuilder
func (*Application) JWTBearer ¶
func (s *Application) JWTBearer() types.IJWTBuilder
func (*Application) Mux ¶
func (s *Application) Mux() http.Handler
func (*Application) RateLimiter ¶
func (s *Application) RateLimiter() types.IRateLimiterBuilder
func (*Application) Sanitization ¶
func (s *Application) Sanitization() types.ISanitizationBuilder
func (*Application) SetJwtConfig ¶
func (s *Application) SetJwtConfig(jwtConfig types.IJWTConfig)
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) SetDig ¶
func (m *Mux) SetDig(dig types.IDigContainer)
func (*Mux) SetGlobalMiddlewares ¶
func (m *Mux) SetGlobalMiddlewares(middlewares []types.Middleware)
func (*Mux) SetJwtConfig ¶
func (m *Mux) SetJwtConfig(jwtConfig types.IJWTConfig)
func (*Mux) SetRouters ¶
func (*Mux) SetStaticFile ¶
Click to show internal directories.
Click to hide internal directories.