hkp.v1: Index | Files

package jsonhkp

import ""

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.


Package Files


type Packet Uses

type Packet struct {
    Tag    uint8  `json:"tag"`
    Data   []byte `json:"data"`
    Parsed bool   `json:"parsed"`

func NewPacket Uses

func NewPacket(from *openpgp.Packet) *Packet

type Photo Uses

type Photo struct {
    MIMEType string `json:"mimeType"`
    Contents []byte `json:"contents"`

func NewPhoto Uses

func NewPhoto(image []byte) *Photo

func (*Photo) DataURI Uses

func (p *Photo) DataURI() (*url.URL, error)

type PrimaryKey Uses

type PrimaryKey struct {

    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 Uses

func NewPrimaryKey(from *openpgp.PrimaryKey) *PrimaryKey

func NewPrimaryKeys Uses

func NewPrimaryKeys(froms []*openpgp.PrimaryKey) []*PrimaryKey

func (*PrimaryKey) Bytes Uses

func (pk *PrimaryKey) Bytes() []byte

func (*PrimaryKey) Serialize Uses

func (pk *PrimaryKey) Serialize(w io.Writer) error

type PublicKey Uses

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 Uses

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 Uses

func NewSignature(from *openpgp.Signature) *Signature

type SubKey Uses

type SubKey struct {

func NewSubKey Uses

func NewSubKey(from *openpgp.SubKey) *SubKey

type UserAttribute Uses

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 Uses

func NewUserAttribute(from *openpgp.UserAttribute) *UserAttribute

type UserID Uses

type UserID struct {
    Keywords    string       `json:"keywords"`
    Packet      *Packet      `json:"packet,omitempty"`
    Signatures  []*Signature `json:"signatures,omitempty"`
    Unsupported []*Packet    `json:"unsupported,omitempty"`

func NewUserID Uses

func NewUserID(from *openpgp.UserID) *UserID

Package jsonhkp imports 7 packages (graph) and is imported by 4 packages. Updated 2018-05-06. Refresh now. Tools for package owners.