Documentation
¶
Index ¶
- Constants
- type Add
- type AddResponse
- type HTMLFormat
- type Handler
- func (h *Handler) Add(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) HashQuery(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) Lookup(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) Register(r *httprouter.Router)
- type HandlerOption
- type HashQuery
- type IndexFormat
- type JSONFormat
- type Lookup
- type MRFormat
- type Operation
- type Option
- type OptionSet
- type StatsResponse
Constants ¶
View Source
const ( OperationGet = Operation("get") OperationIndex = Operation("index") OperationVIndex = Operation("vindex") OperationStats = Operation("stats") OperationHGet = Operation("hget") )
View Source
const ( OptionMachineReadable = Option("mr") OptionJSON = Option("json") OptionNotModifiable = Option("nm") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddResponse ¶
type HTMLFormat ¶
type HTMLFormat struct {
// contains filtered or unexported fields
}
func NewHTMLFormat ¶
func NewHTMLFormat(path string, extra []string) (*HTMLFormat, error)
func (*HTMLFormat) Write ¶
func (f *HTMLFormat) Write(w http.ResponseWriter, l *Lookup, keys []*openpgp.PrimaryKey) error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(storage storage.Storage, options ...HandlerOption) (*Handler, error)
func (*Handler) Add ¶
func (h *Handler) Add(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) HashQuery ¶
func (h *Handler) HashQuery(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) Lookup ¶
func (h *Handler) Lookup(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) Register ¶
func (h *Handler) Register(r *httprouter.Router)
type HandlerOption ¶
func IndexTemplate ¶
func IndexTemplate(path string, extra ...string) HandlerOption
func StatsFunc ¶
func StatsFunc(f func() (interface{}, error)) HandlerOption
func StatsTemplate ¶
func StatsTemplate(path string, extra ...string) HandlerOption
func VIndexTemplate ¶
func VIndexTemplate(path string, extra ...string) HandlerOption
type IndexFormat ¶
type IndexFormat interface {
Write(w http.ResponseWriter, l *Lookup, keys []*openpgp.PrimaryKey) error
}
type JSONFormat ¶
type JSONFormat struct{}
func (*JSONFormat) Write ¶
func (*JSONFormat) Write(w http.ResponseWriter, _ *Lookup, keys []*openpgp.PrimaryKey) error
type Lookup ¶
type Lookup struct { Op Operation Search string Options OptionSet Fingerprint bool Exact bool Hash bool }
Lookup contains all the parameters and options for a /pks/lookup request.
type Operation ¶
type Operation string
Operation enumerates the supported HKP operations (op parameter) in the request.
func ParseOperation ¶
type OptionSet ¶
func ParseOptionSet ¶
type StatsResponse ¶
Directories
¶
Path | Synopsis |
---|---|
Package jsonhkp defines an arbitrary, Hockeypuck-specific, JSON-friendly document model for representation of OpenPGP key material.
|
Package jsonhkp defines an arbitrary, Hockeypuck-specific, JSON-friendly document model for representation of OpenPGP key material. |
Click to show internal directories.
Click to hide internal directories.