Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { // Pattern is the pattern to match for the endpoint. Pattern string // Method is the HTTP method to use (e.g. GET). Method string // Handler is the HTTP handler to use. Handler http.Handler }
Endpoint describes a single HTTP endpoint.
type HandlerConstraints ¶
type HandlerConstraints struct { // AuthKind defines the kind of authenticated "user" that the // handler supports. This correlates directly to entities, as // identified by tag kinds (e.g. names.UserTagKind). The empty // string indicates support for unauthenticated requests. AuthKind string // StrictValidation is the value that will be used for the handler's // httpContext (see apiserver/httpcontext.go). StrictValidation bool // ControllerModelOnly is the value that will be used for the handler's // httpContext (see apiserver/httpcontext.go). ControllerModelOnly bool }
HandlerConstraints describes conditions under which a handler may operate.
type HandlerSpec ¶
type HandlerSpec struct { // Constraints are the handler's constraints. Constraints HandlerConstraints // NewHandler returns a new HTTP handler for the given args. // The function is idempotent--if given the same args, it will // produce an equivalent handler each time. NewHandler func(NewHandlerArgs) http.Handler }
HandlerSpec defines an HTTP handler for a specific endpoint on Juju's HTTP server. Such endpoints facilitate behavior that is not supported through normal (websocket) RPC. That includes file transfer.
Click to show internal directories.
Click to hide internal directories.