plugin

package
v1.0.48 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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