Documentation
¶
Index ¶
- Variables
- type MemoryStore
- func (s *MemoryStore) Create(ctx context.Context, session *Session) error
- func (s *MemoryStore) Delete(ctx context.Context, hash string) error
- func (s *MemoryStore) DeleteExpired(ctx context.Context, now time.Time, limit int) (int64, error)
- func (s *MemoryStore) ExtendActive(ctx context.Context, hash string, now, expiresAt time.Time) (bool, error)
- func (s *MemoryStore) GetActive(ctx context.Context, hash string, now time.Time) (*Session, error)
- type Session
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSession = errors.New("invalid admin session")
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) Create ¶
func (s *MemoryStore) Create(ctx context.Context, session *Session) error
func (*MemoryStore) DeleteExpired ¶
func (*MemoryStore) ExtendActive ¶
type Session ¶
type Store ¶
type Store interface {
Create(context.Context, *Session) error
GetActive(context.Context, string, time.Time) (*Session, error)
ExtendActive(context.Context, string, time.Time, time.Time) (bool, error)
Delete(context.Context, string) error
DeleteExpired(context.Context, time.Time, int) (int64, error)
}
Click to show internal directories.
Click to hide internal directories.