filestore

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileNotFound error = fmt.Errorf("No such file or directory")
)

Functions

func OptionCreatePath

func OptionCreatePath(create bool) func(*FileStore)

Types

type FileStore

type FileStore struct {
	Path string
	// contains filtered or unexported fields
}

func NewFileStore

func NewFileStore(path string, opts ...FileStoreOption) (*FileStore, error)

func (*FileStore) GetFilepath

func (s *FileStore) GetFilepath(filename string) (string, error)

func (*FileStore) Read

func (s *FileStore) Read(filename string) ([]byte, error)

func (*FileStore) Remove

func (s *FileStore) Remove(filename string) error

func (*FileStore) Store

func (s *FileStore) Store(filename string, filecontent []byte) error

type FileStoreOption

type FileStoreOption func(*FileStore)

Jump to

Keyboard shortcuts

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