fs

package
v1.9.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package fs implement a password-store compatible on disk storage layout with unencrypted paths. TODO(2.x) DEPRECATED and slated for removal in the 2.0.0 release.

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) 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 e.g. foo, far/bar baz/.bang directory separator are normalized using `/`

func (*Store) Name

func (s *Store) Name() string

Name returns the name of this backend

func (*Store) Path

func (s *Store) Path() string

Path returns the ondisk path

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

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