Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigureCustomRoutes ¶
type ConfigureCustomRoutes func(g *gin.RouterGroup, locale string, handlers Middlewares, getRelativePath func(key string) (string, bool, gin.HandlerFunc, bool))
ConfigureCustomRoutes : function to configure the custom routes of the web server.
type ConfigureDefaultRoutes ¶
type ConfigureDefaultRoutes func(routes *DefaultRoutes)
ConfigureDefaultRoutes : function to configure the default routes of the web server.
type DefaultRoutes ¶
type DefaultRoutes struct { Robots struct { Enabled bool Paths struct { Get PathProperties } } }
DefaultRoutes : definition of the built-in routes.
type Middlewares ¶
type Middlewares struct {
MustBeAuthenticated func(bool) gin.HandlerFunc
}
Middlewares : collection of the built-in handlers.
type PathProperties ¶
PathProperties : properties of a route.
type Router ¶
type Router struct { DefaultRoutes DefaultRoutes Handlers Middlewares // contains filtered or unexported fields }
Router : properties to define routes and their rights.
func NewRouter ¶
func NewRouter(e *gin.Engine, locales []string, defaultLocale, cookieName, JWTSecret string) *Router
NewRouter : returns a new Router struct.
func (*Router) LoadCustomRoutes ¶
func (r *Router) LoadCustomRoutes(configureRoutes ConfigureCustomRoutes)
LoadCustomRoutes : load the custom routes.
func (*Router) LoadDefaultRoutes ¶
func (r *Router) LoadDefaultRoutes()
LoadDefaultRoutes : load the default routes.
Click to show internal directories.
Click to hide internal directories.