Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndpoint ¶
type APIEndpoint struct { Path string // Path pattern for this endpoint. Get APIEndpointAction Head APIEndpointAction Put APIEndpointAction Post APIEndpointAction Delete APIEndpointAction Patch APIEndpointAction }
APIEndpoint represents a URL in our API.
type APIEndpointAction ¶
type APIEndpointAction struct { Handler func(d *Daemon, r *http.Request) response.Response AccessHandler func(d *Daemon, r *http.Request) response.Response AllowUntrusted bool }
APIEndpointAction represents an action on an API endpoint.
type Daemon ¶
type Daemon struct { ShutdownCtx context.Context // Canceled when shutdown starts. ShutdownCancel context.CancelFunc // Cancels the shutdownCtx to indicate shutdown starting. ShutdownDoneCh chan error // Receives the result of the d.Stop() function and tells the daemon to end. // contains filtered or unexported fields }
func NewDaemon ¶
func NewDaemon(cfg *config.DaemonConfig) *Daemon
func (*Daemon) Authenticate ¶
Authenticate validates an incoming http Request It will check over what protocol it came, what type of request it is and will validate the TLS certificate.
This does not perform authorization, only validates authentication. Returns whether trusted or not, the username (or certificate fingerprint) of the trusted client, and the type of client that has been authenticated (unix or tls).
func (*Daemon) ServerCert ¶
Click to show internal directories.
Click to hide internal directories.