Documentation ¶
Index ¶
- Constants
- func AuthForbidden(c *gin.Context, err error)
- func AuthRequire(c *gin.Context, err error)
- func Handler(routerList RouterList) http.Handler
- func IsCodeError() bool
- func RoutersHandler(engine *gin.Engine)
- func RoutersRegister(method string, relativePath string, router ...gin.HandlerFunc)
- func RoutersRegisterInGroup(group, method string, relativePath string, router ...gin.HandlerFunc)
- func SetGinHandler(fct func(c *gin.Context)) gin.HandlerFunc
- type AuthCode
- type Authorization
- type Headers
- type HeadersConfig
- type RegisterRouter
- type RegisterRouterInGroup
- type RouterList
Constants ¶
View Source
const ( AUTH_CODE_SUCCESS = iota AUTH_CODE_REQUIRE AUTH_CODE_FORBIDDEN )
View Source
const ( HEAD_AUTH_REQR = "WWW-Authenticate" HEAD_AUTH_SEND = "Authorization" HEAD_AUTH_REAL = "Basic realm=LDAP Authorization Required" )
View Source
const ( EMPTY_PARAMS errors.CodeError = iota + errors.MIN_PKG_Router HEADER_AUTH_MISSING HEADER_AUTH_EMPTY HEADER_AUTH_REQUIRE HEADER_AUTH_FORBIDDEN HEADER_AUTH_ERROR )
View Source
const EMPTY_GROUP = "<nil>"
Variables ¶
This section is empty.
Functions ¶
func AuthForbidden ¶
func AuthRequire ¶
func Handler ¶
func Handler(routerList RouterList) http.Handler
func IsCodeError ¶
func IsCodeError() bool
func RoutersHandler ¶
func RoutersRegister ¶
func RoutersRegister(method string, relativePath string, router ...gin.HandlerFunc)
func RoutersRegisterInGroup ¶
func RoutersRegisterInGroup(group, method string, relativePath string, router ...gin.HandlerFunc)
func SetGinHandler ¶
func SetGinHandler(fct func(c *gin.Context)) gin.HandlerFunc
SetGinHandler func that return given func as ginTonic HandlerFunc interface type.
Types ¶
type Authorization ¶
type Authorization interface { Handler(c *gin.Context) Register(router ...gin.HandlerFunc) gin.HandlerFunc Append(router ...gin.HandlerFunc) }
func NewAuthorization ¶
type Headers ¶
type Headers interface { Add(key, value string) Set(key, value string) Get(key string) string Del(key string) Header() map[string]string Register(router ...gin.HandlerFunc) []gin.HandlerFunc Handler(c *gin.Context) Clone() Headers }
func NewHeaders ¶
func NewHeaders() Headers
type HeadersConfig ¶ added in v1.5.0
func (HeadersConfig) New ¶ added in v1.5.0
func (h HeadersConfig) New() Headers
type RegisterRouter ¶
type RegisterRouter func(method string, relativePath string, router ...gin.HandlerFunc)
type RegisterRouterInGroup ¶
type RegisterRouterInGroup func(group, method string, relativePath string, router ...gin.HandlerFunc)
type RouterList ¶
type RouterList interface { Register(method string, relativePath string, router ...gin.HandlerFunc) RegisterInGroup(group, method string, relativePath string, router ...gin.HandlerFunc) Handler(engine *gin.Engine) }
func NewRouterList ¶
func NewRouterList() RouterList
Click to show internal directories.
Click to hide internal directories.