persist

package
v0.0.0-...-724bf7d Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const FolderStoreExt = ".persist"
View Source
const FolderStoreFileMode = 0600
View Source
const FolderStoreMode = 0700

Variables

View Source
var ErrNotFound = errors.New("persist datakey not found")

Functions

This section is empty.

Types

type Factory

type Factory func(loader func(v interface{}) error) (Store, error)

type FolderStore

type FolderStore string

func (FolderStore) LoadBytes

func (s FolderStore) LoadBytes(key string) ([]byte, error)

func (FolderStore) SaveBytes

func (s FolderStore) SaveBytes(key string, data []byte) error

func (FolderStore) Start

func (s FolderStore) Start() error

func (FolderStore) Stop

func (s FolderStore) Stop() error

type Store

type Store interface {
	Start() error
	Stop() error
	SaveBytes(key string, data []byte) error
	LoadBytes(key string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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