api

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = fmt.Errorf("not yet implemented")

ErrNotImplemented is returned when a method is not implemented.

View Source
var ErrNotInitialized = fmt.Errorf("password store not initialized. run 'gopass setup' first")

ErrNotInitialized is returned when the store is not initialized.

Functions

func ConfigDir

func ConfigDir() string

ConfigDir returns gopass' configuration directory.

Types

type Gopass

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

Gopass is a secret store implementation.

func New

func New(ctx context.Context) (*Gopass, error)

New creates a new secret store. WARNING: This will need to change to accommodate for runtime configuration.

func (*Gopass) Close

func (g *Gopass) Close(ctx context.Context) error

Close shuts down all background processes.

func (*Gopass) Get

func (g *Gopass) Get(ctx context.Context, name, revision string) (gopass.Secret, error)

Get returns a single, encrypted secret. It must be unwrapped before use.

func (*Gopass) List

func (g *Gopass) List(ctx context.Context) ([]string, error)

List returns a list of all secrets.

func (*Gopass) Remove

func (g *Gopass) Remove(ctx context.Context, name string) error

Remove removes a single secret.

func (*Gopass) RemoveAll

func (g *Gopass) RemoveAll(ctx context.Context, prefix string) error

RemoveAll removes all secrets with a given prefix.

func (*Gopass) Rename

func (g *Gopass) Rename(ctx context.Context, src, dest string) error

Rename move a prefix to another.

func (*Gopass) Revisions

func (g *Gopass) Revisions(ctx context.Context, name string) ([]string, error)

Revisions lists all revisions of this secret.

func (*Gopass) Set

func (g *Gopass) Set(ctx context.Context, name string, sec gopass.Byter) error

Set adds a new revision to an existing secret or creates a new one.

func (*Gopass) String

func (g *Gopass) String() string

func (*Gopass) Sync

func (g *Gopass) Sync(ctx context.Context) error

Sync synchronizes a secret with a remote.

Jump to

Keyboard shortcuts

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