Documentation ¶
Index ¶
- func Connect(redisAddr, redisPassword string, ...) (db.RedisClient, error)
- type RedisClients
- func (c *RedisClients) AddEmailData(ctx context.Context, data interface{}) (key string, err error)
- func (c *RedisClients) CheckTokens(ctx context.Context, userId int) (accessToken, refreshToken string, err error)
- func (c *RedisClients) CreateTokens(ctx context.Context, userId int) (accessToken, refreshToken string, err error)
- func (c *RedisClients) DeleteAccessTokensData(ctx context.Context, userId int) (err error)
- func (c *RedisClients) DeleteEmailData(ctx context.Context, key string) (err error)
- func (c *RedisClients) DeleteRefreshTokensData(ctx context.Context, userId int) (err error)
- func (c *RedisClients) GetEmailData(ctx context.Context, key string) (val string, err error)
- func (c *RedisClients) GetUserData(ctx context.Context, key string) (userParam models.Users, err error)
- func (c *RedisClients) VerifyRefreshToken(ctx context.Context, tokenString string) int
- func (c *RedisClients) VerifyToken(ctx context.Context, tokenString string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RedisClients ¶
type RedisClients struct { EmailClient *redis.Client AccessTokenClient *redis.Client RefreshTokenClient *redis.Client }
func (*RedisClients) AddEmailData ¶
func (c *RedisClients) AddEmailData(ctx context.Context, data interface{}) (key string, err error)
func (*RedisClients) CheckTokens ¶
func (*RedisClients) CreateTokens ¶
func (*RedisClients) DeleteAccessTokensData ¶
func (c *RedisClients) DeleteAccessTokensData(ctx context.Context, userId int) (err error)
func (*RedisClients) DeleteEmailData ¶
func (c *RedisClients) DeleteEmailData(ctx context.Context, key string) (err error)
func (*RedisClients) DeleteRefreshTokensData ¶
func (c *RedisClients) DeleteRefreshTokensData(ctx context.Context, userId int) (err error)
func (*RedisClients) GetEmailData ¶
func (*RedisClients) GetUserData ¶
func (*RedisClients) VerifyRefreshToken ¶
func (c *RedisClients) VerifyRefreshToken(ctx context.Context, tokenString string) int
func (*RedisClients) VerifyToken ¶
func (c *RedisClients) VerifyToken(ctx context.Context, tokenString string) int
Click to show internal directories.
Click to hide internal directories.