handlers

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: BSD-3-Clause Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FileMode = os.FileMode(0666)
)

Functions

This section is empty.

Types

type CacheHandler

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

func NewCacheHandler

func NewCacheHandler(repo cache.Repository, duration time.Duration) *CacheHandler

func (*CacheHandler) Destroy

func (ch *CacheHandler) Destroy(id string) error

func (*CacheHandler) GC

func (ch *CacheHandler) GC(maxLifeTime time.Duration) error

func (*CacheHandler) Init

func (ch *CacheHandler) Init(id string) error

func (*CacheHandler) Read

func (ch *CacheHandler) Read(id string) (data []byte, err error)

func (*CacheHandler) Write

func (ch *CacheHandler) Write(id string, data []byte) error

type FileSessionHandler

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

func NewFileSessionHandler

func NewFileSessionHandler(dir string) *FileSessionHandler

func (*FileSessionHandler) Destroy

func (f *FileSessionHandler) Destroy(id string) error

func (*FileSessionHandler) GC

func (f *FileSessionHandler) GC(maxLifeTime time.Duration) error

func (*FileSessionHandler) Init

func (f *FileSessionHandler) Init(id string) error

func (*FileSessionHandler) Read

func (f *FileSessionHandler) Read(id string) ([]byte, error)

func (*FileSessionHandler) Write

func (f *FileSessionHandler) Write(id string, data []byte) error

Jump to

Keyboard shortcuts

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