Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSRegister ¶
type DNSRegister interface {
GetExternalAddress() (net.IP, error)
RegisterAddress(host, user, password string, addr net.IP, offline bool) error
}
DNSRegister provides a mechanism to register DNS records to a remote dynamic DNS service
type Gateway ¶
type Gateway interface {
// Return the prefix for this gateway
Prefix() string
// Return the middleware in order, which is called from left to right, then right to left,
// on the serving of the route
Middleware() []string
}
Gateway provides a set of routes and middleware which is applied to those routes
type Log ¶
type Log interface {
// Print log message
Print(context.Context, ...interface{})
// Format and print log message
Printf(context.Context, string, ...interface{})
}
Log plugin
type Router ¶
type Router interface {
http.Handler
// Add a prefix/path mapping to a handler for one or more HTTP methods
// which match the regular expression. If the regular expression is nil,
// then any path is matched. The methods which are supported by the
// handler are determined are provided by the final argument. If no
// methods are provided, then the GET method is assumed.
AddHandler(Gateway, *regexp.Regexp, http.HandlerFunc, ...string) error
// Register a middleware handler to the router given unique name
AddMiddleware(string, func(http.HandlerFunc) http.HandlerFunc) error
}
Router is a task which maps paths to routes
Click to show internal directories.
Click to hide internal directories.