Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // Print logging message Print(context.Context, ...any) // Print formatted logging message Printf(context.Context, string, ...any) }
Logger interface
type Middleware ¶
type Middleware interface { Task // Wrap a handler function Wrap(context.Context, http.HandlerFunc) http.HandlerFunc }
Middleware represents an interceptor for HTTP requests
type Plugin ¶
type Plugin interface { // Return the unique name for the plugin Name() string // Return a description of the plugin Description() string // Create a task from a plugin New() (Task, error) }
Plugin represents a plugin that can create a task
type Route ¶ added in v1.4.7
type Route interface { // Label Label() string // Matched host Host() string // Matched prefix Prefix() string // Matching Path Path() string // Matched parameters Parameters() []string // Matched methods Methods() []string // Scopes for authorization Scopes() []string }
Route maps a request to a route handler, with associated host, prefix and path
type Router ¶
type Router interface { Task // Add a handler to the router, with the given path // and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandler(context.Context, string, http.Handler, ...string) Route // Add a handler function to the router, with the given path // and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerFunc(context.Context, string, http.HandlerFunc, ...string) Route // Add a handler to the router, with the given regular expression // path and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerRe(context.Context, *regexp.Regexp, http.Handler, ...string) Route // Add a handler function to the router, with the given regular expression // path and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerFuncRe(context.Context, *regexp.Regexp, http.HandlerFunc, ...string) Route }
Router represents a router to which you can add requests
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
npm
|
|
pkg
|
|
handler/auth/client
Implements an API client for the Token auth API (https://github.com/mutablelogic/go-server/pkg/handler/auth)
|
Implements an API client for the Token auth API (https://github.com/mutablelogic/go-server/pkg/handler/auth) |
handler/certmanager/certstore
certstore implements file-based storage for certificates and certificate authorities.
|
certstore implements file-based storage for certificates and certificate authorities. |
handler/nginx
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration programmatically or through the API gateway.
|
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration programmatically or through the API gateway. |
handler/nginx/client
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx)
|
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx) |
handler/nginx/folders
Manages the lifecycle of configuration folders for nginx
|
Manages the lifecycle of configuration folders for nginx |
handler/tokenjar
implements a token jar that stores tokens into memory, and potentially a file on the file system
|
implements a token jar that stores tokens into memory, and potentially a file on the file system |
httpserver
The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI
|
The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI |
httpserver/fcgi
Package fcgi implements the FastCGI protocol.
|
Package fcgi implements the FastCGI protocol. |
provider/dep
implements a dependency graph algorithm
|
implements a dependency graph algorithm |
plugin
|
|
Click to show internal directories.
Click to hide internal directories.