Documentation ¶
Index ¶
- Constants
- func LogRequestHandler(h http.Handler) http.Handler
- func Start(ctx context.Context, cfg Config) error
- func WriteIndex(w io.Writer, el openpgp.EntityList) error
- type Config
- type Error
- type ErrorResponse
- type RateLimit
- type Status
- func NewAcceptedStatus(message ...string) Status
- func NewBadRequestStatus(message ...string) Status
- func NewConflictStatus(message ...string) Status
- func NewForbiddenStatus(message ...string) Status
- func NewInternalServerErrorStatus(message ...string) Status
- func NewMethodNotAllowedStatus(message ...string) Status
- func NewNotFoundStatus(message ...string) Status
- func NewNotImplementedStatus(message ...string) Status
- func NewOKStatus(message ...string) Status
- func NewStatus(code int, isError bool, message ...string) Status
- func NewTooManyRequestStatus(message ...string) Status
- type Verifier
Constants ¶
View Source
const ( BaseRoute = "/" AddRoute = "/pks/add" LookupRoute = "/pks/lookup" )
View Source
const (
DefaultAddr = "localhost:11371"
)
Variables ¶
This section is empty.
Functions ¶
func LogRequestHandler ¶
LogRequestHandler provides an HTTP handler to log HTTP requests.
func WriteIndex ¶
func WriteIndex(w io.Writer, el openpgp.EntityList) error
WriteIndex writes on w a readable index based on the entity list provided. The index format follows the one described in the HKP draft https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5.2
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error *Error `json:"error"`
}
ErrorResponse describes a JSON error response.
type Status ¶
type Status interface { Is(int) bool IsError() bool Write(http.ResponseWriter) }
func NewAcceptedStatus ¶
func NewBadRequestStatus ¶
func NewConflictStatus ¶
func NewForbiddenStatus ¶
func NewNotFoundStatus ¶
func NewNotImplementedStatus ¶
func NewOKStatus ¶
func NewTooManyRequestStatus ¶
Click to show internal directories.
Click to hide internal directories.