Versions in this module Expand all Collapse all v2 v2.9.3 Sep 18, 2024 Changes in this version + var ErrTokenInvalidFromDate = fmt.Errorf("token is invalid starting from a certain date") + var ErrTokenNotProvided = fmt.Errorf("token not provided") + var ErrTokenUserNotFound = fmt.Errorf("user not found") + func AdminGuard(app *core.App, handler fiber.Handler) fiber.Handler + func CheckIsAdminReq(app *core.App, c *fiber.Ctx) bool + func CheckSiteExist(app *core.App, c *fiber.Ctx, siteName string) (entity.CookedSite, bool, error) + func ErrorHandler(ctx *fiber.Ctx, err error) error + func GetJwtDataByReq(app *core.App, c *fiber.Ctx) (jwtCustomClaims, error) + func GetLimiter(c *fiber.Ctx) (lmt *limiter.Limiter, err error) + func GetTokenByReq(c *fiber.Ctx) string + func GetUserByReq(app *core.App, c *fiber.Ctx) (entity.User, error) + func LimiterGuard(app *core.App, handler fiber.Handler) fiber.Handler + func LogWithHttpInfo(c *fiber.Ctx, logFn func(l *zap.SugaredLogger)) + func LoginGetUserToken(user entity.User, key string, ttl int) (string, error) + func LoginGuard(app *core.App, handler func(*fiber.Ctx, entity.User) error) fiber.Handler + func NewCaptchaChecker(app *core.App, c *fiber.Ctx) captcha.Checker + func ParamsDecode(c *fiber.Ctx, destParams interface{}) (isContinue bool, resp error) + func RespData(c *fiber.Ctx, data interface{}) error + func RespError(c *fiber.Ctx, code int, msg string, data ...Map) error + func RespSuccess(c *fiber.Ctx, msg ...string) error + func ValidateRequired(c *fiber.Ctx, destParams interface{}) (isContinue bool, resp error) + type ApiVersionData struct + App string + CommitHash string + Version string + func GetApiVersionDataMap() ApiVersionData + type ConfData struct + FrontendConf Map + Version ApiVersionData + func GetApiPublicConfDataMap(app *core.App, c *fiber.Ctx) ConfData + type JSONResult struct + Data interface{} + Msg string + type Map = map[string]interface