gpgagent

package
v0.0.0-...-d6cb8d1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gpgagent interacts with the local GPG Agent.

Index

Constants

This section is empty.

Variables

View Source
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")
)

Functions

This section is empty.

Types

type Conn

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

Conn is a connection to the GPG agent.

func NewConn

func NewConn() (*Conn, error)

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

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) GetPassphrase

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

func (*Conn) RemoveFromCache

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

type PassphraseRequest

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.

Jump to

Keyboard shortcuts

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