Documentation ¶
Index ¶
- func BuildListHostsRequest(r *http.Request) (*instances.ListHostsRequest, error)
- func HostOrchestratorPath(path, host string) (string, error)
- type App
- func (c *App) AddCorsHeaderIfNeeded(w http.ResponseWriter, r *http.Request)
- func (c *App) AuthHandler(w http.ResponseWriter, r *http.Request) error
- func (a *App) Authenticate(fn AuthHTTPHandler) HTTPHandler
- func (a *App) ConfigHandler(w http.ResponseWriter, r *http.Request, user accounts.User) error
- func (a *App) DeAuthHandler(w http.ResponseWriter, r *http.Request, user accounts.User) error
- func (a *App) ForwardToHost(w http.ResponseWriter, r *http.Request, user accounts.User) error
- func (c *App) Handler() http.Handler
- func (a *App) InfraConfig() apiv1.InfraConfig
- func (c *App) OAuth2Callback(w http.ResponseWriter, r *http.Request) error
- func (a *App) RescindAuthorizationHandler(w http.ResponseWriter, r *http.Request, user accounts.User) error
- func (c *App) UsernameOnlyLoggingHandler(w http.ResponseWriter, r *http.Request) error
- type AuthHTTPHandler
- type HTTPHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildListHostsRequest ¶
func BuildListHostsRequest(r *http.Request) (*instances.ListHostsRequest, error)
func HostOrchestratorPath ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
The controller implements the web API of the cloud orchestrator. It parses and validates requests from the client and passes the information to the relevant modules
func (*App) AddCorsHeaderIfNeeded ¶
func (c *App) AddCorsHeaderIfNeeded(w http.ResponseWriter, r *http.Request)
func (*App) AuthHandler ¶
func (*App) Authenticate ¶
func (a *App) Authenticate(fn AuthHTTPHandler) HTTPHandler
Returns the received http handler wrapped in another that extracts user information from the request and passes it to to the original handler as the last parameter. The wrapper will only pass the request to the inner handler if a user is authenticated, otherwise it may choose to return an error or respond with an HTTP redirect to the login page.
func (*App) ConfigHandler ¶
func (*App) DeAuthHandler ¶
func (*App) ForwardToHost ¶
func (*App) InfraConfig ¶
func (a *App) InfraConfig() apiv1.InfraConfig
func (*App) OAuth2Callback ¶
func (*App) RescindAuthorizationHandler ¶
func (*App) UsernameOnlyLoggingHandler ¶
type AuthHTTPHandler ¶
type HTTPHandler ¶
type HTTPHandler func(http.ResponseWriter, *http.Request) error
func (HTTPHandler) ServeHTTP ¶
func (h HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Intercept errors returned by the HTTPHandler and transform them into HTTP error responses
Click to show internal directories.
Click to hide internal directories.