filestore

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStore

type FileStore struct {
	Level int
	Dir   string
}

FileStore uses the local filesystem.

func NewFileStore

func NewFileStore() FileStore

NewFileStore uses `caddy.AppDataDir()` to get a location to store the cached files.

func (FileStore) Get

func (f FileStore) Get(key string) (interface{}, error)

Get value from file.

func (FileStore) Has

func (f FileStore) Has(key string) bool

Has checks if the key exists.

func (FileStore) Put

func (f FileStore) Put(key string, value interface{}, expiration time.Duration)

Put the value in a file.

Jump to

Keyboard shortcuts

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