Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Destroy(ctx context.Context) error
- func (m *Manager) Get(ctx context.Context, key string) interface{}
- func (m *Manager) GetExpiry(ctx context.Context) time.Time
- func (m *Manager) LoadAndSave(next http.Handler) http.Handler
- func (m *Manager) LoadAndSaveGuest(next http.Handler) http.Handler
- func (m *Manager) LoadUser(next http.Handler) http.Handler
- func (m *Manager) Put(ctx context.Context, key string, value interface{})
- func (m *Manager) Remove(ctx context.Context, key string)
- func (m *Manager) SetAuthUser(ctx context.Context, u session.User) error
- type MessagePackCodec
- type Option
- type RedisStore
- func (s *RedisStore) All() (map[string][]byte, error)
- func (s *RedisStore) AllCtx(ctx context.Context) (map[string][]byte, error)
- func (s *RedisStore) Commit(token string, b []byte, expiry time.Time) error
- func (s *RedisStore) CommitCtx(ctx context.Context, token string, b []byte, expiry time.Time) error
- func (s *RedisStore) Delete(token string) (err error)
- func (s *RedisStore) DeleteCtx(ctx context.Context, token string) (err error)
- func (s *RedisStore) Find(token string) (b []byte, exists bool, err error)
- func (s *RedisStore) FindCtx(ctx context.Context, token string) (b []byte, exists bool, err error)
- func (s *RedisStore) WithPrefix(prefix string) *RedisStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) LoadAndSaveGuest ¶
type Option ¶
type Option func(*Manager)
func WithAuthLifetime ¶
func WithCookieName ¶
func WithGuestLifetime ¶
func WithGuestSkipPaths ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedisStore ¶
func NewRedisStore(client *redis.Client) *RedisStore
func (*RedisStore) Delete ¶
func (s *RedisStore) Delete(token string) (err error)
func (*RedisStore) DeleteCtx ¶
func (s *RedisStore) DeleteCtx(ctx context.Context, token string) (err error)
func (*RedisStore) Find ¶
func (s *RedisStore) Find(token string) (b []byte, exists bool, err error)
func (*RedisStore) WithPrefix ¶
func (s *RedisStore) WithPrefix(prefix string) *RedisStore
Click to show internal directories.
Click to hide internal directories.