localstorage

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalFileStore

type LocalFileStore struct {
	Path string
}

LocalFileStore is a FileStore implementation that stores files locally in a folder.

func NewLocalFileStore

func NewLocalFileStore(path string) (*LocalFileStore, error)

NewLocalFileStore creates a FileStore locally in the provided path. Files will be encrypted client-side and stored as regular file system files and folders.

func (*LocalFileStore) Delete

func (lfs *LocalFileStore) Delete(charmID string, path string) error

Delete deletes the file at the given path for the provided Charm ID.

func (*LocalFileStore) Get

func (lfs *LocalFileStore) Get(charmID string, path string) (fs.File, error)

Get returns an fs.File for the given Charm ID and path.

func (*LocalFileStore) Put

func (lfs *LocalFileStore) Put(charmID string, path string, r io.Reader, mode fs.FileMode) error

Put reads from the provided io.Reader and stores the data with the Charm ID and path.

func (*LocalFileStore) Stat added in v0.11.0

func (lfs *LocalFileStore) Stat(charmID, path string) (fs.FileInfo, error)

Stat returns the FileInfo for the given Charm ID and path.

Jump to

Keyboard shortcuts

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