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

package store

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

Index

Package Files

err.go secret.go sort.go store.go

Variables

var (
    // ErrExistsFailed is returend if we can't check for existence
    ErrExistsFailed = errors.Errorf("Failed to check for existence")
    // ErrNotFound is returned if an entry was not found
    ErrNotFound = errors.Errorf("Entry is not in the password store")
    // ErrEncrypt is returned if we failed to encrypt an entry
    ErrEncrypt = errors.Errorf("Failed to encrypt")
    // ErrDecrypt is returned if we failed to decrypt and entry
    ErrDecrypt = errors.Errorf("Failed to decrypt")
    // ErrIO is any kind of I/O error
    ErrIO = errors.Errorf("I/O error")
    // ErrGitInit is returned if git is already initialized
    ErrGitInit = errors.Errorf("git is already initialized")
    // ErrGitNotInit is returned if git is not initialized
    ErrGitNotInit = errors.Errorf("git is not initialized")
    // ErrGitNoRemote is returned if git has no origin remote
    ErrGitNoRemote = errors.Errorf("git has no remote origin")
    // ErrGitNothingToCommit is returned if there are no staged changes
    ErrGitNothingToCommit = errors.Errorf("git has nothing to commit")
    // ErrNoBody is returned if a secret exists but has no content beyond a password
    ErrNoBody = errors.Errorf("no safe content to display, you can force display with show -f")
    // ErrNoPassword is returned is a secret exists but has no password, only a body
    ErrNoPassword = errors.Errorf("no password to display")
    // ErrYAMLNoMark is returned if a secret contains no valid YAML document marker
    ErrYAMLNoMark = errors.Errorf("no YAML document marker found")
    // ErrYAMLNoKey is returned if a YAML document doesn't contain a key
    ErrYAMLNoKey = errors.Errorf("key not found in YAML document")
    // ErrYAMLValueUnsupported is returned is the user tries to unmarshal an nested struct
    ErrYAMLValueUnsupported = errors.Errorf("can not unmarshal nested YAML value")
)

type ByLen Uses

type ByLen []string

ByLen is a list of mount points (string) that can be sorted by length

func (ByLen) Len Uses

func (s ByLen) Len() int

Len return the number of mount points in the list

func (ByLen) Less Uses

func (s ByLen) Less(i, j int) bool

Less returns if a Mount point is shorter than another

func (ByLen) Swap Uses

func (s ByLen) Swap(i, j int)

Swap Mount Point in the list of Mount Points.

type ByPathLen Uses

type ByPathLen []string

ByPathLen sorts mount points by the number of level / path separators

func (ByPathLen) Len Uses

func (s ByPathLen) Len() int

func (ByPathLen) Less Uses

func (s ByPathLen) Less(i, j int) bool

func (ByPathLen) Swap Uses

func (s ByPathLen) Swap(i, j int)

type FsckCallback Uses

type FsckCallback func(context.Context, string) bool

FsckCallback is a callback to ask the user to confirm certain fsck corrective actions

type ImportCallback Uses

type ImportCallback func(context.Context, string, []string) bool

ImportCallback is a callback to ask the user if he wants to import a certain recipients public key into his keystore

type RecipientCallback Uses

type RecipientCallback func(context.Context, string, []string) ([]string, error)

RecipientCallback is a callback to verify the list of recipients

type RecipientStore Uses

type RecipientStore interface {
    AddRecipient(context.Context, string) error
    GetRecipients(context.Context, string) ([]string, error)
    RemoveRecipient(context.Context, string) error
    SaveRecipients(context.Context) error
    SetRecipients(context.Context, []string) error
    Recipients(context.Context) []string
    ImportMissingPublicKeys(context.Context) error
    ExportMissingPublicKeys(context.Context, []string) (bool, error)
}

RecipientStore is a store supporting recipient operations

type Secret Uses

type Secret interface {
    Body() string
    Bytes() ([]byte, error)
    Data() map[string]interface{}
    DeleteKey(string) error
    Equal(Secret) bool
    Password() string
    SetBody(string) error
    SetPassword(string)
    SetValue(string, string) error
    String() string
    Value(string) (string, error)
}

Secret is an in-memory secret with a key/value part

type Store Uses

type Store interface {
    fmt.Stringer

    TemplateStore
    RecipientStore

    Fsck(context.Context, string) error
    Path() string
    URL() string
    RCS() backend.RCS
    Crypto() backend.Crypto
    Storage() backend.Storage
    GitInit(context.Context, string, string) error
    Alias() string
    Copy(context.Context, string, string) error
    Delete(context.Context, string) error
    Equals(Store) bool
    Exists(context.Context, string) bool
    Get(context.Context, string) (Secret, error)
    GetRevision(context.Context, string, string) (Secret, error)
    Init(context.Context, string, ...string) error
    Initialized(context.Context) bool
    IsDir(context.Context, string) bool
    List(context.Context, string) ([]string, error)
    ListRevisions(context.Context, string) ([]backend.Revision, error)
    Move(context.Context, string, string) error
    Set(context.Context, string, Secret) error
    Prune(context.Context, string) error
    Valid() bool
}

Store is secrets store

type TemplateStore Uses

type TemplateStore interface {
    GetTemplate(context.Context, string) ([]byte, error)
    HasTemplate(context.Context, string) bool
    ListTemplates(context.Context, string) []string
    LookupTemplate(context.Context, string) (string, []byte, bool)
    RemoveTemplate(context.Context, string) error
    SetTemplate(context.Context, string, []byte) error
    TemplateTree(context.Context) (tree.Tree, error)
}

TemplateStore is a store supporting templating operations

Directories

PathSynopsis
root
secret
sub
vault

Package store imports 6 packages (graph). Updated 2019-09-02. Refresh now. Tools for package owners.