Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Clear(rw http.ResponseWriter, req *http.Request) error
- func (m *Manager) Load(req *http.Request) (*sessions.SessionState, error)
- func (m *Manager) Save(rw http.ResponseWriter, req *http.Request, s *sessions.SessionState) error
- func (m *Manager) VerifyConnection(ctx context.Context) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager wraps a Store and handles the implementation details of the sessions.SessionStore with its use of session tickets
func NewManager ¶
NewManager creates a Manager that can wrap a Store and manage the sessions.SessionStore implementation details
func (*Manager) Clear ¶
Clear clears any saved session information for a given ticket cookie. Then it clears all session data for that ticket in the Store.
func (*Manager) Load ¶
Load reads sessions.SessionState information from a session store. It will use the session ticket from the http.Request's cookie.
func (*Manager) Save ¶
func (m *Manager) Save(rw http.ResponseWriter, req *http.Request, s *sessions.SessionState) error
Save saves a session in a persistent Store. Save will generate (or reuse an existing) ticket which manages unique per session encryption & retrieval from the persistent data store.
type Store ¶
type Store interface { Save(context.Context, string, []byte, time.Duration) error Load(context.Context, string) ([]byte, error) Clear(context.Context, string) error Lock(key string) sessions.Lock VerifyConnection(context.Context) error }
Store is used for persistent session stores (IE not Cookie) Implementing this interface allows it to easily use the persistence.Manager for session ticket + encryption details.