session

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DRIVER_MEMORY = "memory" // Not recommended for production
	DRIVER_FILE   = "file"
	DRIVER_REDIS  = "redis"
)

Variables

This section is empty.

Functions

func Set

func Set(store scs.Store, cookie scs.SessionCookie)

Types

type FileStore

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

func NewFileSession

func NewFileSession(directoryPath string) *FileStore

func (*FileStore) Commit

func (fs *FileStore) Commit(token string, b []byte, expiry time.Time) error

func (*FileStore) Delete

func (fs *FileStore) Delete(token string) error

func (*FileStore) Find

func (fs *FileStore) Find(token string) ([]byte, bool, error)

type Session

type Session struct {
	*scs.SessionManager
}

func Get

func Get() *Session

Jump to

Keyboard shortcuts

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