session

package
v0.0.0-...-f6e517b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleanup

type Cleanup struct {
	// contains filtered or unexported fields
}

func (*Cleanup) Stop

func (c *Cleanup) Stop()

type Store

type Store struct {
	Options *sessions.Options
	// contains filtered or unexported fields
}

func NewStore

func NewStore(queries *db.Queries, key []byte, options *sessions.Options) *Store

func (*Store) Cleanup

func (s *Store) Cleanup(interval time.Duration) *Cleanup

func (*Store) Delete

func (s *Store) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error

Delete should delete session from the underlying store implementation.

func (*Store) Get

func (s *Store) Get(r *http.Request, name string) (*sessions.Session, error)

Get should return a cached session.

func (*Store) New

func (s *Store) New(r *http.Request, name string) (*sessions.Session, error)

New should create and return a new session.

Note that New should never return a nil session, even in the case of an error if using the Registry infrastructure to cache the session.

func (*Store) Save

func (s *Store) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error

Save should persist session to the underlying store implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL