Documentation ¶
Index ¶
- Constants
- type Context
- func (c *Context) BindValue(i interface{}, validate bool) error
- func (c *Context) ErrorBadRequest(message string) *fiber.Error
- func (c *Context) ErrorForbidden(message string) *fiber.Error
- func (c *Context) ErrorNotFound(message string) *fiber.Error
- func (c *Context) ErrorTooManyRequests(message string) *fiber.Error
- func (c *Context) ErrorUnauthorized(message string) *fiber.Error
- func (c *Context) GetClaims() (*models.TokenClaims, error)
- func (c *Context) GetClientIP() string
- func (c *Context) GetClientUserAgent() string
- func (c *Context) GetLanguage() config.Language
- func (c *Context) GetRelayDatabase() *gorm.DB
- func (c *Context) GetUserID() string
- func (c *Context) GetUserLevel() string
- func (c *Context) Localization(i interface{}, depth int)
- func (c *Context) NewError(code int, message string) *fiber.Error
- func (c *Context) PathParser(i interface{}, depth int)
- func (c *Context) TrimSpace(i interface{}, depth int)
- func (c *Context) Validate(i interface{}) error
- type Localizer
Constants ¶
View Source
const ( LangKey = "lang" UserKey = "user" ParametersKey = "parameters" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
fiber.Ctx
}
Context context
func (*Context) ErrorBadRequest ¶
ErrorBadRequest error bad request `400`
func (*Context) ErrorForbidden ¶
ErrorForbidden error forbidden `403`
func (*Context) ErrorNotFound ¶
ErrorNotFound error not found `404`
func (*Context) ErrorTooManyRequests ¶
ErrorTooManyRequests error too many requests `429`
func (*Context) ErrorUnauthorized ¶
ErrorUnauthorized error unauthorized `401`
func (*Context) GetClaims ¶
func (c *Context) GetClaims() (*models.TokenClaims, error)
GetClaims get user claims
func (*Context) GetClientUserAgent ¶
GetClientUserAgent get client user agent
func (*Context) GetLanguage ¶
GetLanguage get language
func (*Context) GetRelayDatabase ¶
GetRelayDatabase get connection database `ralay`
func (*Context) GetUserLevel ¶
GetUserLevel get user level claims
func (*Context) Localization ¶
Localization localization
func (*Context) PathParser ¶
PathParser parse path param
Click to show internal directories.
Click to hide internal directories.