hkp.v1: gopkg.in/hockeypuck/hkp.v1/jsonhkp Index | Files

package jsonhkp

import "gopkg.in/hockeypuck/hkp.v1/jsonhkp"

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

Package Files

jsonhkp.go

func NewPrimaryKeys Uses

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

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"`
    // contains filtered or unexported fields
}

func NewPrimaryKey Uses

func NewPrimaryKey(from *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 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 {
    // contains filtered or unexported fields
}

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 2016-07-15. Refresh now. Tools for package owners.