Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FetchLimiter = middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(rate.Limit(5000))) PostLimiter = middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(rate.Limit(500))) )
Functions ¶
func NewValidator ¶
func ValidateReactionType ¶
func ValidateReactionType(fe validator.FieldLevel) bool
Types ¶
type JwtHandler ¶
type JwtHandler struct {
ATSecretKey string
RTSecretKey string
ATExpiredTime time.Duration
RTExpiredTime time.Duration
}
func NewJwtHandler ¶
func NewJwtHandler(env *env.Env) *JwtHandler
func (*JwtHandler) GenerateToken ¶
func (j *JwtHandler) GenerateToken(id string, tokenType TokenType) (string, error)
func (*JwtHandler) ValidateToken ¶
func (j *JwtHandler) ValidateToken(reqToken string, tokenType TokenType) (string, error)
Click to show internal directories.
Click to hide internal directories.