Documentation ¶
Index ¶
- Constants
- func AuthForbidden(c *ginsdk.Context, err error)
- func AuthRequire(c *ginsdk.Context, err error)
- func DefaultGinInit() *ginsdk.Engine
- func DefaultGinWithTrustedPlatform(trustedPlatform string) *ginsdk.Engine
- func DefaultGinWithTrustyProxy(trustyProxy []string) *ginsdk.Engine
- func GinAccessLog(log liblog.FuncLog) ginsdk.HandlerFunc
- func GinAddGlobalMiddleware(eng *ginsdk.Engine, middleware ...ginsdk.HandlerFunc) *ginsdk.Engine
- func GinEngine(trustedPlatform string, trustyProxy ...string) (*ginsdk.Engine, error)
- func GinErrorLog(log liblog.FuncLog) ginsdk.HandlerFunc
- func GinLatencyContext(c *ginsdk.Context)
- func GinRequestContext(c *ginsdk.Context)
- func Handler(routerList RouterList) http.Handler
- func RoutersHandler(engine *ginsdk.Engine)
- func RoutersRegister(method string, relativePath string, router ...ginsdk.HandlerFunc)
- func RoutersRegisterInGroup(group, method string, relativePath string, router ...ginsdk.HandlerFunc)
- func SetGinHandler(fct func(c *ginsdk.Context)) ginsdk.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 ErrorConfigValidator ErrorHeaderAuth ErrorHeaderAuthMissing ErrorHeaderAuthEmpty ErrorHeaderAuthRequire ErrorHeaderAuthForbidden )
View Source
const ( EmptyHandlerGroup = "<nil>" GinContextStartUnixNanoTime = "gin-ctx-start-unix-nano-time" GinContextRequestPath = "gin-ctx-request-path" GinContextRequestUser = "gin-ctx-request-user" )
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) ginsdk.HandlerFunc
func GinAddGlobalMiddleware ¶ added in v1.9.8
func GinErrorLog ¶ added in v1.9.8
func GinErrorLog(log liblog.FuncLog) ginsdk.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 ...ginsdk.HandlerFunc)
func RoutersRegisterInGroup ¶
func RoutersRegisterInGroup(group, method string, relativePath string, router ...ginsdk.HandlerFunc)
func SetGinHandler ¶
func SetGinHandler(fct func(c *ginsdk.Context)) ginsdk.HandlerFunc
SetGinHandler func that return given func as ginTonic HandlerFunc interface type.
Types ¶
type Authorization ¶
type Authorization interface { Handler(c *ginsdk.Context) Register(router ...ginsdk.HandlerFunc) ginsdk.HandlerFunc Append(router ...ginsdk.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 ...ginsdk.HandlerFunc) []ginsdk.HandlerFunc Handler(c *ginsdk.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
func (HeadersConfig) Validate ¶ added in v1.10.0
func (h HeadersConfig) Validate() liberr.Error
type RegisterRouter ¶
type RegisterRouter func(method string, relativePath string, router ...ginsdk.HandlerFunc)
type RegisterRouterInGroup ¶
type RegisterRouterInGroup func(group, method string, relativePath string, router ...ginsdk.HandlerFunc)
type RouterList ¶
type RouterList interface { Register(method string, relativePath string, router ...ginsdk.HandlerFunc) RegisterInGroup(group, method string, relativePath string, router ...ginsdk.HandlerFunc) Handler(engine *ginsdk.Engine) Engine() *ginsdk.Engine }
func NewRouterList ¶
func NewRouterList(initGin func() *ginsdk.Engine) RouterList
Click to show internal directories.
Click to hide internal directories.