fs

package
v0.0.0-...-e3c0b49 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(address string, insecure bool) *api.Config

NewConfig creates a new config

Types

type Root

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

Root implements both Node and Handle

func NewRoot

func NewRoot(root string, logic *api.Logical) *Root

NewRoot creates a new root and returns it

func (Root) Attr

func (Root) Attr(ctx context.Context, a *fuse.Attr) error

Attr sets attrs on the given fuse.Attr

func (*Root) Lookup

func (r *Root) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup looks up a path

func (*Root) ReadDirAll

func (r *Root) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns a list of secrets

type Secret

type Secret struct {
	*api.Secret
	// contains filtered or unexported fields
}

Secret implements Node and Handle

func (Secret) Attr

func (s Secret) Attr(ctx context.Context, a *fuse.Attr) error

Attr returns attributes about this Secret

func (Secret) ReadAll

func (s Secret) ReadAll(ctx context.Context) ([]byte, error)

ReadAll gets the content of this Secret Logic tries to parse the data portion of the file, on failure, returns entire byte stream

type VaultFS

type VaultFS struct {
	*api.Client
	// contains filtered or unexported fields
}

VaultFS is a vault filesystem

func New

func New(config *api.Config, mountpoint, token, root string) (*VaultFS, error)

New returns a new VaultFS

func (*VaultFS) Mount

func (v *VaultFS) Mount() error

Mount the FS at the given mountpoint

func (*VaultFS) Root

func (v *VaultFS) Root() (fs.Node, error)

Root returns the struct that does the actual work

func (*VaultFS) Unmount

func (v *VaultFS) Unmount() error

Unmount the FS

Jump to

Keyboard shortcuts

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