sessions

package
v1.0.0-dev.11 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CookieName = "hh-session"

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func (*Session) AddFlash

func (s *Session) AddFlash(flash any, vars ...string)

func (*Session) DeleteUserID

func (s *Session) DeleteUserID()

func (*Session) Flashes

func (s *Session) Flashes() []any

func (*Session) NeedsSave

func (s *Session) NeedsSave() bool

func (*Session) SetUserID

func (s *Session) SetUserID(userID uuid.UUID)

func (*Session) UserID

func (s *Session) UserID() (uuid.UUID, bool)

type Store

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

func NewStore

func NewStore(store sessions.Store) *Store

func (*Store) Get

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

func (*Store) Save

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

Jump to

Keyboard shortcuts

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