fs

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a fs based store

func New

func New(dir string) *Store

New creates a new store

func (*Store) Available

func (s *Store) Available(ctx context.Context) error

Available will check if this backend is useable

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, name string) error

Delete removes the named entity

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, name string) bool

Exists checks if the named entity exists

func (*Store) Fsck

func (s *Store) Fsck(ctx context.Context) error

Fsck checks the storage integrity

func (*Store) Get

func (s *Store) Get(ctx context.Context, name string) ([]byte, error)

Get retrieves the named content

func (*Store) IsDir

func (s *Store) IsDir(ctx context.Context, name string) bool

IsDir returns true if the named entity is a directory

func (*Store) List

func (s *Store) List(ctx context.Context, prefix string) ([]string, error)

List returns a list of all entities

func (*Store) Name

func (s *Store) Name() string

Name returns the name of this backend

func (*Store) Prune

func (s *Store) Prune(ctx context.Context, prefix string) error

Prune removes a named directory

func (*Store) Set

func (s *Store) Set(ctx context.Context, name string, value []byte) error

Set writes the given content

func (*Store) String added in v1.7.2

func (s *Store) String() string

String implements fmt.Stringer

func (*Store) Version

func (s *Store) Version(context.Context) semver.Version

Version returns the version of this backend

Jump to

Keyboard shortcuts

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