Documentation ¶
Index ¶
- type WorkspacesController
- func (w *WorkspacesController) CreateWorkspace(cheURL string, keycloakUrl string, workspaceDefinition []byte) (workspaceID string, err error)
- func (w *WorkspacesController) DeleteWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
- func (w *WorkspacesController) KeycloakToken(keycloakTokenUrl string) (token string, err error)
- func (w *WorkspacesController) RunWorkspace(workspaceDefinition []byte, workspaceStack string) (workspaceID string)
- func (w *WorkspacesController) StartWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
- func (w *WorkspacesController) StopWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
- func (w *WorkspacesController) WaitWorkspaceStatusViaApi(keycloakUrl string, cheURL string, workspaceID string, desiredStatus string, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkspacesController ¶
WorkspacesController useful to add logger and http client.
func NewWorkspaceController ¶
func NewWorkspaceController(c *http.Client) *WorkspacesController
NewWorkspaceController creates a new WorkspacesController from a given client.
func (*WorkspacesController) CreateWorkspace ¶
func (w *WorkspacesController) CreateWorkspace(cheURL string, keycloakUrl string, workspaceDefinition []byte) (workspaceID string, err error)
CreateWorkspace create an workspace using token and given devFile
func (*WorkspacesController) DeleteWorkspace ¶
func (w *WorkspacesController) DeleteWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
DeleteWorkspace delete a workspace from a given workspace_id
func (*WorkspacesController) KeycloakToken ¶
func (w *WorkspacesController) KeycloakToken(keycloakTokenUrl string) (token string, err error)
KeycloakToken return a JWT from keycloak
func (*WorkspacesController) RunWorkspace ¶
func (w *WorkspacesController) RunWorkspace(workspaceDefinition []byte, workspaceStack string) (workspaceID string)
RunWorkspace create a new workspace from a given devfile and call an method to get measure time for workspace after a workspace pod is up and ready
func (*WorkspacesController) StartWorkspace ¶
func (w *WorkspacesController) StartWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
StartWorkspace start a new workspace from a given workspace_id
func (*WorkspacesController) StopWorkspace ¶
func (w *WorkspacesController) StopWorkspace(keycloakUrl string, cheURL string, workspaceID string) (err error)
StopWorkspace stop a workspace from a given workspace_id
func (*WorkspacesController) WaitWorkspaceStatusViaApi ¶
func (w *WorkspacesController) WaitWorkspaceStatusViaApi(keycloakUrl string, cheURL string, workspaceID string, desiredStatus string, timeoutInSeconds int) (err error)
WaitWorkspaceStatusViaApi waits for workspace to have desired status in specified timeout