Documentation ¶
Overview ¶
Package jsonhkp defines an arbitrary, Hockeypuck-specific, JSON-friendly document model for representation of OpenPGP key material. Intended to be used by front-end Javascript as well as server-side HTML template developers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrimaryKey ¶
type PrimaryKey struct { *PublicKey MD5 string `json:"md5"` SHA256 string `json:"sha256,omitempty"` SubKeys []*SubKey `json:"subKeys,omitempty"` UserIDs []*UserID `json:"userIDs,omitempty"` UserAttrs []*UserAttribute `json:"userAttrs,omitempty"` }
func NewPrimaryKey ¶
func NewPrimaryKey(from *openpgp.PrimaryKey) *PrimaryKey
func NewPrimaryKeys ¶
func NewPrimaryKeys(froms []*openpgp.PrimaryKey) []*PrimaryKey
func (*PrimaryKey) Bytes ¶
func (pk *PrimaryKey) Bytes() []byte
type PublicKey ¶
type PublicKey struct { Fingerprint string `json:"fingerprint"` LongKeyID string `json:"longKeyID"` ShortKeyID string `json:"shortKeyID"` Creation string `json:"creation,omitempty"` Expiration string `json:"expiration,omitempty"` NeverExpires bool `json:"neverExpires,omitempty"` Algorithm algorithm `json:"algorithm"` BitLength int `json:"bitLength"` Signatures []*Signature `json:"signatures,omitempty"` Unsupported []*Packet `json:"unsupported,omitempty"` Packet *Packet `json:"packet,omitempty"` }
type Signature ¶
type Signature struct { SigType int `json:"sigType"` Revocation bool `json:"revocation,omitempty"` Primary bool `json:"primary,omitempty"` IssuerKeyID string `json:"issuerKeyID,omitempty"` Creation string `json:"creation,omitempty"` Expiration string `json:"expiration,omitempty"` NeverExpires bool `json:"neverExpires,omitempty"` Packet *Packet `json:"packet,omitempty"` }
func NewSignature ¶
func NewSignature(from *openpgp.Signature) *Signature
type UserAttribute ¶
type UserAttribute struct { Photos []*Photo `json:"photos,omitempty"` Packet *Packet `json:"packet,omitempty"` Signatures []*Signature `json:"signatures,omitempty"` Unsupported []*Packet `json:"unsupported,omitempty"` }
func NewUserAttribute ¶
func NewUserAttribute(from *openpgp.UserAttribute) *UserAttribute
Click to show internal directories.
Click to hide internal directories.