gopgagent: go.mozilla.org/gopgagent Index | Files

package gopgagent

import "go.mozilla.org/gopgagent"

Package gpgagent interacts with the local GPG Agent.

Index

Package Files

gpgagent.go

Variables

var (
    ErrNoAgent = errors.New("GPG_AGENT_INFO not set in environment")
    ErrNoData  = errors.New("GPG_ERR_NO_DATA cache miss")
    ErrCancel  = errors.New("gpgagent: Cancel")
)

type Conn Uses

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

Conn is a connection to the GPG agent.

func NewConn Uses

func NewConn() (*Conn, error)

NewConn connects to the GPG Agent as described in the GPG_AGENT_INFO environment variable.

func (*Conn) Close Uses

func (c *Conn) Close() error

func (*Conn) GetPassphrase Uses

func (c *Conn) GetPassphrase(pr *PassphraseRequest) (passphrase string, outerr error)

func (*Conn) RemoveFromCache Uses

func (c *Conn) RemoveFromCache(cacheKey string) error

type PassphraseRequest Uses

type PassphraseRequest struct {
    CacheKey, Error, Prompt, Desc string

    // If the option --no-ask is used and the passphrase is not in
    // the cache the user will not be asked to enter a passphrase
    // but the error code GPG_ERR_NO_DATA is returned.  (ErrNoData)
    NoAsk bool
}

PassphraseRequest is a request to get a passphrase from the GPG Agent.

Package gopgagent imports 11 packages (graph) and is imported by 1 packages. Updated 2017-10-20. Refresh now. Tools for package owners.