Documentation ¶
Index ¶
- type SessionClient
- func (sc SessionClient) CreateLoginSession(ctx context.Context, userId string) (string, error)
- func (sc SessionClient) CreateOTPSession(ctx context.Context, userId string) (string, error)
- func (sc SessionClient) Del(ctx context.Context, key string) error
- func (sc SessionClient) Expire(ctx context.Context, key string, ttl time.Duration) error
- func (sc SessionClient) Get(ctx context.Context, key string) (string, error)
- func (sc SessionClient) GetLoginSession(ctx context.Context, sessionId string) (userId string, err error)
- func (sc SessionClient) GetOTPSession(ctx context.Context, sessionId string) (userId string, err error)
- func (sc SessionClient) GetUsedOTPs(ctx context.Context, userId string) []string
- func (sc SessionClient) LPop(ctx context.Context, key string, values ...interface{}) (string, error)
- func (sc SessionClient) LPush(ctx context.Context, key string, values ...interface{}) error
- func (sc SessionClient) LTrim(ctx context.Context, key string, start int64, stop int64) error
- func (sc SessionClient) NewSessionId() string
- func (sc SessionClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
- func (sc SessionClient) SetUsedOTP(ctx context.Context, userId string, otp string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient() *SessionClient
func (SessionClient) CreateLoginSession ¶
func (SessionClient) CreateOTPSession ¶
func (SessionClient) GetLoginSession ¶
func (SessionClient) GetOTPSession ¶
func (SessionClient) GetUsedOTPs ¶
func (sc SessionClient) GetUsedOTPs(ctx context.Context, userId string) []string
func (SessionClient) LPush ¶
func (sc SessionClient) LPush(ctx context.Context, key string, values ...interface{}) error
func (SessionClient) NewSessionId ¶
func (sc SessionClient) NewSessionId() string
func (SessionClient) SetUsedOTP ¶
Click to show internal directories.
Click to hide internal directories.