Documentation ¶
Index ¶
Constants ¶
const ( // UnsupportedKeyIDLength is returned on invalid keyID lengths. See // ParseKeyID(). UnsupportedKeyIDLength = Error("invalid keyID length") // InvalidKeyIDBytes is returned when a keyID contains nonhex characters. InvalidKeyIDBytes = Error("keyID contains invalid characters") // UnsupportedSchemeError is returned for keyserver addresses which have // an unsupported scheme. UnsupportedSchemeError = Error("unsupported scheme") // KeyNotFoundError is returned when the requested key does not exist on the // server. KeyNotFoundError = Error("key not found on server") // UnexpectedContentTypeError is returned when the server sets an invalid // Content-Type in its response. UnexpectedContentTypeError = Error("unexpected Content-Type in server response") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an OpenPGP HTTP Keyserver Protocol (HKP) client.
func NewClient ¶
NewClient creates a new Client using the provided keyserver and http.Client. If client is nil a new one will be created. Panics if keyserver is nil.
func (*Client) GetKeysByID ¶
GetKeysByID requests keys from the keyserver that match the provided keyID.
type Error ¶
type Error string
Error represents an error constant. It implements the error interface.
type GPG ¶
type GPG struct { KeyID string KeyServer string PublicKeyPath string PrivateKeyPath string Passphrase string }
GPG struct represents GPG (GnuPG) service
type KeyID ¶
type KeyID struct {
// contains filtered or unexported fields
}
KeyID represents an 8 digit (32-bit key ID), 16 digit (64-bit key ID), 32 digit (version 3 fingerprint), or 40 digit (version 4 fingerprint).
func ParseKeyID ¶
ParseKeyID parses rawkeyid into a KeyID structure. It accepts an 8, 16, 32, or 40 digit hexadecimal string without the leading "0x".
type Keyserver ¶
type Keyserver struct {
// contains filtered or unexported fields
}
Keyserver is an OpenPGP HTTP Keyserver Protocol (HKP) keyserver.
func ParseKeyserver ¶
ParseKeyserver parses rawurl into a Keyserver structure. It supports schemes http, https, hkp, hkps. If no scheme is provided it is assumed to be hkp.