httpapi

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(cfg Config) http.Handler

NewRouter creates an http.Handler which serves acmeproxy's public, non-encrypted HTTP API.

Types

type Config

type Config struct {
	Solver HandlerFactory // Presents solutions to HTTP01 challenges to ACME CA.
}

Config configures the public, non-encrypted HTTP API of acmeproxy.

type HandlerFactory

type HandlerFactory interface {
	Handler(func(*http.Request) map[string]string) http.Handler
}

HandlerFactory creates handlers for use by the HTTP API's router.

type MockHandlerFactory

type MockHandlerFactory struct {
	DelegateHandler http.Handler
	Params          []map[string]string
	// contains filtered or unexported fields
}

MockHandlerFactory creates an http.Handler which remembers the params it extracted from a request.

MockHandlerFactory may be called concurrently from multiple go routines. In this case the order of entries in Params is not guaranteed.

func (*MockHandlerFactory) Handler

func (mh *MockHandlerFactory) Handler(extractParams func(*http.Request) map[string]string) http.Handler

Handler creates a http.Handler which uses extractParams to extract parameters from req. The extracted parameters are stored in mh.Params.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL