Documentation ¶
Index ¶
Constants ¶
View Source
const ( Username = "username" ExpiresAt = "expires_at" )
Variables ¶
View Source
var Config = &ConfigType{}
View Source
var Logger gutils.LoggerItf
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuth ¶
func NewAuth(plugins ...AuthPlugin) *Auth
type AuthPlugin ¶
type AuthPlugin interface {
// contains filtered or unexported methods
}
type AwsAuthPlugin ¶
type AwsAuthPlugin struct { }
func NewAwsAuthPlugin ¶
func NewAwsAuthPlugin() *AwsAuthPlugin
type Backend ¶
type Backend struct{}
func NewBackend ¶
func NewBackend() *Backend
func (*Backend) Entrypoint ¶
func (*Backend) RequestBackend ¶
func (b *Backend) RequestBackend(ctx *fasthttp.RequestCtx, url string) (err error)
RequestBackend request backend by internal http client
type BasicAuthPlugin ¶
type BasicAuthPlugin struct { }
func NewBasicAuthPlugin ¶
func NewBasicAuthPlugin() *BasicAuthPlugin
type ConfigType ¶
type ConfigType struct { Runtime runtimeConfig `mapstructure:"-"` Listen string `mapstructure:"listen"` Backend string `mapstructure:"backend"` JWTSecret string `mapstructure:"jwt_secret"` Users []configUser `mapstructure:"users"` UsersMap map[string]configUser `mapstructure:"-"` }
func (*ConfigType) Init ¶
func (c *ConfigType) Init() *ConfigType
type Controllor ¶
type Controllor struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(middlewares ...Middleware) *Controllor
func (*Controllor) MiddlewareChain ¶
func (c *Controllor) MiddlewareChain(chain *chaining.Chain) *chaining.Chain
type CtxMeta ¶
type CtxMeta struct { Ctx *fasthttp.RequestCtx Meta map[string]interface{} }
type JwtAuthPlugin ¶
type JwtAuthPlugin struct {
// contains filtered or unexported fields
}
func NewJwtAuthPlugin ¶
func NewJwtAuthPlugin(secret string) *JwtAuthPlugin
type Middleware ¶
type Middleware interface {
Entrypoint(c *chaining.Chain) (interface{}, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.