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 { // Label returns the label of the gateway service Label() string // Description returns a description of the gateway service Description() string // Register routes for the gateway with a router RegisterHandlers(context.Context, Router) }
Gateway provides a set of handlers for a router
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 Nginx ¶ added in v1.1.1
type Nginx interface { // Test configuration, return error if it fails Test() error // Test the configuration and then reload it (the SIGHUP signal) Reload() error // Reopen log files (the SIGUSR1 signal) Reopen() error // Version returns the version string from nginx Version() string }
Nginx provides a forked nginx instance, with the ability to reopen log files and reload the configuration
type Router ¶
type Router interface { http.Handler // Add a host/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(context.Context, *regexp.Regexp, http.HandlerFunc, ...string) }
Router is a task which maps paths to handlers
type TokenAuth ¶ added in v1.1.3
type TokenAuth interface { // Return true if a token associated with the name already exists Exists(string) bool // Create a new token associated with a name, duration and scopes. // Return the token value. The duration can be zero for no expiry. Create(string, time.Duration, ...string) (string, error) // Revoke a token associated with a name. For the admin token, it is // rotated rather than revoked. Revoke(string) error // Return all token names and their last access times, including // expired tokens Enumerate() map[string]time.Time // Returns the name of the token if a value matches and is // valid. Updates the access time for the token. If token with value not // found, then return empty string MatchesValue(string) string // Returns true if the named token is valid, and one of the scopes match. MatchesScope(string, ...string) bool }
TokenAuth is an interface for access to API methods through tokens
Click to show internal directories.
Click to hide internal directories.