Versions in this module Expand all Collapse all v0 v0.4.5 Jul 1, 2024 v0.4.4 Jun 26, 2024 Changes in this version + const AcceptLanguageHeaderName + const ClientTimezoneOffsetHeaderName + type ApiHandlerFunc func(*Context) (any, *errs.Error) + type Context struct + func WrapContext(ginCtx *gin.Context) *Context + func (c *Context) GetClientLocale() string + func (c *Context) GetClientTimezoneOffset() (int16, error) + func (c *Context) GetCurrentUid() int64 + func (c *Context) GetRequestId() string + func (c *Context) GetResponseError() *errs.Error + func (c *Context) GetTextualToken() string + func (c *Context) GetTokenClaims() *UserTokenClaims + func (c *Context) SetRequestId(requestId string) + func (c *Context) SetResponseError(error *errs.Error) + func (c *Context) SetTextualToken(token string) + func (c *Context) SetTokenClaims(claims *UserTokenClaims) + type DataHandlerFunc func(*Context) ([]byte, string, *errs.Error) + type MiddlewareHandlerFunc func(*Context) + type ProxyHandlerFunc func(*Context) (*httputil.ReverseProxy, *errs.Error) + type TokenType byte + const USER_TOKEN_TYPE_EMAIL_VERIFY + const USER_TOKEN_TYPE_NORMAL + const USER_TOKEN_TYPE_PASSWORD_RESET + const USER_TOKEN_TYPE_REQUIRE_2FA + type UserTokenClaims struct + ExpiresAt int64 + IssuedAt int64 + Type TokenType + Uid int64 + UserTokenId string + Username string + func (c *UserTokenClaims) GetAudience() (jwt.ClaimStrings, error) + func (c *UserTokenClaims) GetExpirationTime() (*jwt.NumericDate, error) + func (c *UserTokenClaims) GetIssuedAt() (*jwt.NumericDate, error) + func (c *UserTokenClaims) GetIssuer() (string, error) + func (c *UserTokenClaims) GetNotBefore() (*jwt.NumericDate, error) + func (c *UserTokenClaims) GetSubject() (string, error)