fs

package
v1.12.9 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package fs implement a password-store compatible on disk storage layout with unencrypted paths.

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) Add

func (s *Store) Add(ctx context.Context, args ...string) error

Add does nothing

func (*Store) AddRemote

func (s *Store) AddRemote(ctx context.Context, remote, url string) error

AddRemote does nothing

func (*Store) Cmd

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

Cmd does nothing

func (*Store) Commit

func (s *Store) Commit(ctx context.Context, msg string) error

Commit does nothing

func (*Store) Compact

func (s *Store) Compact(context.Context) error

Compact is not implemented

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) GetRevision

func (s *Store) GetRevision(context.Context, string, string) ([]byte, error)

GetRevision is not implemented

func (*Store) Init

func (s *Store) Init(context.Context, string, string) error

Init does nothing

func (*Store) InitConfig

func (s *Store) InitConfig(context.Context, string, string) error

InitConfig does nothing

func (*Store) IsDir

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

IsDir returns true if the named entity is a directory

func (s *Store) Link(ctx context.Context, from, to string) error

Link creates a symlink

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 path to this storage

func (*Store) Prune

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

Prune removes a named directory

func (*Store) Pull

func (s *Store) Pull(ctx context.Context, origin, branch string) error

Pull does nothing

func (*Store) Push

func (s *Store) Push(ctx context.Context, origin, branch string) error

Push does nothing

func (*Store) RemoveRemote

func (s *Store) RemoveRemote(ctx context.Context, remote string) error

RemoveRemote does nothing

func (*Store) Revisions

func (s *Store) Revisions(context.Context, string) ([]backend.Revision, error)

Revisions is not implemented

func (*Store) Set

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

Set writes the given content

func (*Store) Status

func (s *Store) Status(context.Context) ([]byte, error)

Status is not implemented

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