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

package gpg

import "github.com/justwatchcom/gopass/pkg/backend/crypto/gpg"

Index

Package Files

context.go identity.go key.go key_list.go

func IsAlwaysTrust Uses

func IsAlwaysTrust(ctx context.Context) bool

IsAlwaysTrust will return the value of the always trust flag or the default (false)

func WithAlwaysTrust Uses

func WithAlwaysTrust(ctx context.Context, at bool) context.Context

WithAlwaysTrust will return a context with the flag for always trust set

type Identity Uses

type Identity struct {
    Name           string
    Comment        string
    Email          string
    CreationDate   time.Time
    ExpirationDate time.Time
}

Identity is a GPG identity, one key can have many IDs

func (Identity) ID Uses

func (i Identity) ID() string

ID returns the GPG ID format

func (Identity) String Uses

func (i Identity) String() string

String implement fmt.Stringer. This method resembles the output gpg uses for user-ids

type Key Uses

type Key struct {
    KeyType        string
    KeyLength      int
    Validity       string
    CreationDate   time.Time
    ExpirationDate time.Time
    Ownertrust     string
    Fingerprint    string
    Identities     map[string]Identity
    SubKeys        map[string]struct{}
}

Key is a GPG key (public or secret)

func (Key) ID Uses

func (k Key) ID() string

ID returns the short fingerprint

func (Key) Identity Uses

func (k Key) Identity() Identity

Identity returns the first identity

func (Key) IsUseable Uses

func (k Key) IsUseable() bool

IsUseable returns true if GPG would assume this key is useable for encryption

func (Key) OneLine Uses

func (k Key) OneLine() string

OneLine prints a terse representation of this key on one line (includes only the first identity!)

func (Key) String Uses

func (k Key) String() string

String implement fmt.Stringer. This method produces output that is close to, but not exactly the same, as the output form GPG itself

type KeyList Uses

type KeyList []Key

KeyList is a searchable slice of Keys

func (KeyList) FindKey Uses

func (kl KeyList) FindKey(id string) (Key, error)

FindKey will try to find the requested key

func (KeyList) Len Uses

func (kl KeyList) Len() int

func (KeyList) Less Uses

func (kl KeyList) Less(i, j int) bool

func (KeyList) Recipients Uses

func (kl KeyList) Recipients() []string

Recipients returns the KeyList formatted as a recipient list

func (KeyList) Swap Uses

func (kl KeyList) Swap(i, j int)

func (KeyList) UnusableKeys Uses

func (kl KeyList) UnusableKeys() KeyList

UnusableKeys returns the list of unusable keys (invalid keys)

func (KeyList) UseableKeys Uses

func (kl KeyList) UseableKeys() KeyList

UseableKeys returns the list of useable (valid keys)

Directories

PathSynopsis
cli
openpgp

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