Documentation
¶
Index ¶
- func NewInMemoryAdapter() auth.SessionAdapter
- type InMemoryAdapter
- func (a *InMemoryAdapter) DeleteSession(ctx context.Context, sessionID string) error
- func (a *InMemoryAdapter) DeleteSessionsByUserID(ctx context.Context, userID string) error
- func (a *InMemoryAdapter) GetSession(ctx context.Context, sessionID string) (auth.Session, error)
- func (a *InMemoryAdapter) InsertSession(ctx context.Context, newSession auth.Session) error
- func (a *InMemoryAdapter) UpdateSession(ctx context.Context, newSession auth.Session) error
- type Session
- func (s *Session) Copy() auth.Session
- func (s *Session) GetExpiresAt() time.Time
- func (s *Session) GetRefreshUntil() time.Time
- func (s *Session) GetSessionID() string
- func (s *Session) GetUserID() string
- func (s *Session) SetExpiresAt(expiresAt time.Time)
- func (s *Session) SetSessionID(sessionID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryAdapter ¶
func NewInMemoryAdapter() auth.SessionAdapter
Types ¶
type InMemoryAdapter ¶
type InMemoryAdapter struct {
// contains filtered or unexported fields
}
func (*InMemoryAdapter) DeleteSession ¶
func (a *InMemoryAdapter) DeleteSession(ctx context.Context, sessionID string) error
func (*InMemoryAdapter) DeleteSessionsByUserID ¶
func (a *InMemoryAdapter) DeleteSessionsByUserID(ctx context.Context, userID string) error
func (*InMemoryAdapter) GetSession ¶
func (*InMemoryAdapter) InsertSession ¶
func (*InMemoryAdapter) UpdateSession ¶
type Session ¶
type Session struct {
SessionID string `json:"-" xml:"-" yaml:"-"`
UserID string `json:"-" xml:"-" yaml:"-"`
ExpiresAt time.Time `json:"-" xml:"-" yaml:"-"`
RefreshUntil time.Time `json:"-" xml:"-" yaml:"-"`
}
func (*Session) GetExpiresAt ¶
func (*Session) GetRefreshUntil ¶
func (*Session) GetSessionID ¶
func (*Session) SetExpiresAt ¶
func (*Session) SetSessionID ¶
Click to show internal directories.
Click to hide internal directories.