gopass: github.com/justwatchcom/gopass/pkg/gopass Index | Files | Directories

package gopass

import "github.com/justwatchcom/gopass/pkg/gopass"

Package gopass contains the public gopass API.

WARNING: This package is incomplete and unstable. DO NOT USE!

Feel free to report feedback on API design and missing features but please note that bug reports will be silently ignored and the API WILL CHANGE WITHOUT NOTICE until this note is gone.

Index

Package Files

doc.go store.go

type Byter Uses

type Byter interface {
    Bytes() []byte
}

Byter is a minimal secrets write interface

type Secret Uses

type Secret interface {
    Byter

    Keys() []string
    // Get returns a single header value, use Get("Password") to get the
    // password value.
    Get(key string) string
    // Set sets a single header value, use Set("Password") to set the password
    // value.
    Set(key, value string)
    // Del removes a single header value
    Del(key string)

    // GetBody returns everything except the header. Use Bytes to get everything
    GetBody() string

    // MIME converts the secret to a MIME secret
    MIME() *secret.MIME
}

Secret is a secret type.

type Store Uses

type Store interface {
    fmt.Stringer

    // List all secrets
    List(context.Context) ([]string, error)
    // Get an decrypted secret. Revision defaults to "latest".
    Get(ctx context.Context, name, revision string) (Secret, error)
    // Set (add) a new revision of an secret
    Set(ctx context.Context, name string, sec Byter) error
    // Revisions is TODO
    Revisions(ctx context.Context, name string) ([]string, error)
    // Remove a single secret
    Remove(ctx context.Context, name string) error
    // RemoveAll secrets with a common prefix
    RemoveAll(ctx context.Context, prefix string) error
    // Rename a path (secret of prefix) without decrypting
    Rename(ctx context.Context, src, dest string) error
    // Sync with a remote (if configured)
    // NOTE: We will always auto-sync when mutating the store. Use this to
    // manually pull in changes.
    Sync(ctx context.Context) error
    // Clean up any resources. MUST be called before the process exists.
    Close(ctx context.Context) error
}

Store is a secret store.

Directories

PathSynopsis
api
apimock
secret
secret/secparse

Package gopass imports 3 packages (graph). Updated 2020-09-23. Refresh now. Tools for package owners.