session

package
v0.0.0-...-0fdad32 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	UserID         int64
	IsAdmin        bool
	AuthSchemeData interface{}
}

type Store

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

func NewStore

func NewStore(db *database.Connection, opts StoreOptions) (*Store, error)

func (*Store) Delete

func (store *Store) Delete(w http.ResponseWriter, r *http.Request) error

func (*Store) Read

func (store *Store) Read(r *http.Request) *Session

func (*Store) Set

func (store *Store) Set(w http.ResponseWriter, r *http.Request, s *Session) error

type StoreOptions

type StoreOptions struct {
	SessionDuration  time.Duration
	UseSecureCookies bool
	Key              []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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