Documentation
¶
Index ¶
- Variables
- func AuthAPIRouter(router *mux.Router)
- func AuthenticationMiddleware(next http.Handler) http.Handler
- func CredentialAPIRouter(client credentials.Client, router *mux.Router)
- func DeploymentAPIRouter(deploymentsClient deployments.Client, router *mux.Router)
- func DocsAPIRouter(router *mux.Router)
- func HealthCheckAPIRouter(router *mux.Router)
- func InitAuthenticationDriver(c *config.Config) error
- func InteractiveSessionAPIRouter(interactiveSessionsClient interactivesessions.Client, router *mux.Router)
- func JS2AllocationAPIRouter(js2allocationsClient js2allocations.Client, router *mux.Router)
- func ProviderAPIRouter(client providermetadata.Client, router *mux.Router)
- func ProviderSpecificAPIRouter(client providermetadata.Client, openstackAPI OpenStackProviderAPI, ...)
- func PublicAPIRouter(templatesClient templates.Client, router *mux.Router)
- func StorageAPIRouter(client storage.Client, router *mux.Router)
- func TemplateAPIRouter(templatesClient templates.Client, router *mux.Router)
- func TemplateWebhookAPIRouter(templatesClient templates.Client, router *mux.Router)
- func TokenAPIRouter(tokensClient tokens.Client, router *mux.Router)
- func UserAPIRouter(serviceClient service.UserClient, router *mux.Router)
- func UserActionAPIRouter(userActionsClient useractions.Client, router *mux.Router)
- func VersionAPIRouter(router *mux.Router, gitCommit string)
- func WorkspaceAPIRouter(workspacesClient workspaces.Client, deploymentsClient deployments.Client, ...)
- type AWSProviderAPI
- type OSProviderConstructor
- type OpenStackProviderAPI
Constants ¶
This section is empty.
Variables ¶
var ( // Authenticator contains the current driver used by api service Authenticator authentication.AuthDriver // CacaoAPITokenAuthenticator contains the driver for cacao tokens CacaoAPITokenAuthenticator authentication.AuthDriver )
Functions ¶
func AuthAPIRouter ¶
AuthAPIRouter will map the necessary auth functions to the endpoints
func AuthenticationMiddleware ¶
AuthenticationMiddleware is a middleware function required on some routes to make sure a user is authenticated and authorizaed to access that endpoint
func CredentialAPIRouter ¶
func CredentialAPIRouter(client credentials.Client, router *mux.Router)
CredentialAPIRouter creates routes for credential-related operations such as creating and updating credentials and logging in
func DeploymentAPIRouter ¶
func DeploymentAPIRouter(deploymentsClient deployments.Client, router *mux.Router)
DeploymentAPIRouter creates routes for operations related to deployments.
func DocsAPIRouter ¶
DocsAPIRouter maps documentation functions to endpoints.
func HealthCheckAPIRouter ¶
HealthCheckAPIRouter adds a health check endpoint, the endpoint can be used to check if api service is healthy (still responding to request). This is used by kubernetes readinessProbe and livenessProbe for the api service.
func InitAuthenticationDriver ¶
InitAuthenticationDriver initializes the authentication driver
func InteractiveSessionAPIRouter ¶
func InteractiveSessionAPIRouter(interactiveSessionsClient interactivesessions.Client, router *mux.Router)
InteractiveSessionAPIRouter routes for operations related to interactive sessions.
func JS2AllocationAPIRouter ¶
func JS2AllocationAPIRouter(js2allocationsClient js2allocations.Client, router *mux.Router)
JS2AllocationAPIRouter creates routes for operations related to JS2 Allocations.
func ProviderAPIRouter ¶
func ProviderAPIRouter(client providermetadata.Client, router *mux.Router)
ProviderAPIRouter creates routes for provider-related operations such as creating and updating providers and logging in
func ProviderSpecificAPIRouter ¶
func ProviderSpecificAPIRouter(client providermetadata.Client, openstackAPI OpenStackProviderAPI, awsAPI AWSProviderAPI, router *mux.Router)
ProviderSpecificAPIRouter ...
func PublicAPIRouter ¶
PublicAPIRouter creates routes for public API endpoints (endpoints that does not require authentication).
func StorageAPIRouter ¶
StorageAPIRouter creates routes for operations related to storage.
func TemplateAPIRouter ¶
TemplateAPIRouter creates routes for operations related to templates.
func TemplateWebhookAPIRouter ¶
TemplateWebhookAPIRouter creates routes for webhooks for templates.
func TokenAPIRouter ¶
TokenAPIRouter creates routes related to managing cacao api tokens
func UserAPIRouter ¶
func UserAPIRouter(serviceClient service.UserClient, router *mux.Router)
UserAPIRouter creates routes for user-related operations such as creating and updating users and logging in
func UserActionAPIRouter ¶
func UserActionAPIRouter(userActionsClient useractions.Client, router *mux.Router)
UserActionAPIRouter creates routes for operations related to user actions.
func VersionAPIRouter ¶
VersionAPIRouter setups version api that returns the version of cacao.
func WorkspaceAPIRouter ¶
func WorkspaceAPIRouter(workspacesClient workspaces.Client, deploymentsClient deployments.Client, router *mux.Router)
WorkspaceAPIRouter creates routes for operations related to workspaces.
Types ¶
type AWSProviderAPI ¶
type AWSProviderAPI interface { AuthenticationTest(w http.ResponseWriter, r *http.Request) CredentialList(w http.ResponseWriter, r *http.Request) RegionList(w http.ResponseWriter, r *http.Request) ImageList(w http.ResponseWriter, r *http.Request) GetImage(w http.ResponseWriter, r *http.Request) FlavorList(w http.ResponseWriter, r *http.Request) GetFlavor(w http.ResponseWriter, r *http.Request) }
AWSProviderAPI ...
func NewAWSProviderAPI ¶
func NewAWSProviderAPI(client awsprovider.Client) AWSProviderAPI
NewAWSProviderAPI ...
type OSProviderConstructor ¶
type OSProviderConstructor func(string, *messaging2.NatsConfig, *messaging2.StanConfig) providers.OpenStackProvider
OSProviderConstructor describes the signature of a function that can create new OpenStackProvider. Useful for unit tests.
type OpenStackProviderAPI ¶
type OpenStackProviderAPI interface { CreateApplicationCredential(w http.ResponseWriter, r *http.Request) ApplicationCredentialList(w http.ResponseWriter, r *http.Request) GetApplicationCredential(w http.ResponseWriter, r *http.Request) DeleteApplicationCredential(w http.ResponseWriter, r *http.Request) AuthenticationTest(w http.ResponseWriter, r *http.Request) CredentialList(w http.ResponseWriter, r *http.Request) RegionList(w http.ResponseWriter, r *http.Request) ImageList(w http.ResponseWriter, r *http.Request) GetImage(w http.ResponseWriter, r *http.Request) FlavorList(w http.ResponseWriter, r *http.Request) GetFlavor(w http.ResponseWriter, r *http.Request) ProjectList(w http.ResponseWriter, r *http.Request) GetProject(w http.ResponseWriter, r *http.Request) ZoneList(w http.ResponseWriter, r *http.Request) RecordsetList(w http.ResponseWriter, r *http.Request) }
OpenStackProviderAPI ...
func NewOpenStackProviderAPI ¶
func NewOpenStackProviderAPI(client openstackprovider.Client) OpenStackProviderAPI
NewOpenStackProviderAPI ...