Documentation ¶
Index ¶
- Constants
- func AuthForbidden(c *gin.Context, err error)
- func AuthRequire(c *gin.Context, err error)
- func DefaultGinInit() *gin.Engine
- func DefaultGinWithTrustedPlatform(trustedPlatform string) *gin.Engine
- func DefaultGinWithTrustyProxy(trustyProxy []string) *gin.Engine
- func GinAccessLog(log liblog.FuncLog) gin.HandlerFunc
- func GinAddGlobalMiddleware(eng *gin.Engine, middleware ...gin.HandlerFunc) *gin.Engine
- func GinEngine(trustedPlatform string, trustyProxy ...string) (*gin.Engine, error)
- func GinErrorLog(log liblog.FuncLog) gin.HandlerFunc
- func GinLatencyContext(c *gin.Context)
- func GinRequestContext(c *gin.Context)
- func Handler(routerList RouterList) http.Handler
- 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 ( ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgRouter ErrorHeaderAuth ErrorHeaderAuthMissing ErrorHeaderAuthEmpty ErrorHeaderAuthRequire ErrorHeaderAuthForbidden )
View Source
const ( EmptyHandlerGroup = "<nil>" GinContextStartUnixNanoTime = "gin-ctx-start-unix-nano-time" GinContextRequestPath = "gin-ctx-request-path" )
Variables ¶
This section is empty.
Functions ¶
func AuthForbidden ¶
func AuthRequire ¶
func DefaultGinInit ¶ added in v1.6.0
func DefaultGinWithTrustedPlatform ¶ added in v1.7.4
func DefaultGinWithTrustyProxy ¶ added in v1.6.0
func GinAccessLog ¶ added in v1.9.8
func GinAccessLog(log liblog.FuncLog) gin.HandlerFunc
func GinAddGlobalMiddleware ¶ added in v1.9.8
func GinErrorLog ¶ added in v1.9.8
func GinErrorLog(log liblog.FuncLog) gin.HandlerFunc
func GinLatencyContext ¶ added in v1.9.8
func GinRequestContext ¶ added in v1.9.8
func Handler ¶
func Handler(routerList RouterList) http.Handler
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) Engine() *gin.Engine }
func NewRouterList ¶
func NewRouterList(initGin func() *gin.Engine) RouterList
Click to show internal directories.
Click to hide internal directories.