file

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultInterval = time.Minute * 30
)

Functions

func New

func New(opts *FileOptions) sessions.Store

func NewFilesystemStore

func NewFilesystemStore(opts *FileOptions) sessions.Store

NewFilesystemStore returns a new FilesystemStore.

The path argument is the directory where sessions will be saved. If empty it will use os.TempDir().

See NewCookieStore() for a description of the other parameters.

func Reg

func Reg(store sessions.Store, args ...string)

func RegWithOptions

func RegWithOptions(opts *FileOptions, args ...string) sessions.Store

Types

type FileOptions

type FileOptions struct {
	SavePath      string        `json:"savePath"`
	KeyPairs      [][]byte      `json:"-"`
	CheckInterval time.Duration `json:"checkInterval"`
	MaxAge        int           `json:"maxAge"`
	MaxLength     int           `json:"maxLength"`
}

Jump to

Keyboard shortcuts

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