Documentation
¶
Index ¶
- func GetAnyWorkspaceByIDOrNameInActiveOrgErr(storeQ GetWorkspaceByNameOrIDErrStore, workspaceNameOrID string) (*entity.Workspace, error)
- func GetClassIDString(classID string) string
- func GetInstanceNames(args []string) ([]string, error)
- func GetInstanceNamesWithPipeInfo(args []string) ([]string, bool)
- func GetInstanceString(w entity.Workspace) string
- func GetUserWorkspaceByNameOrIDErr(storeQ GetWorkspaceByNameOrIDErrStore, workspaceNameOrID string) (*entity.Workspace, error)
- func IsStdinPiped() bool
- func IsStdoutPiped() bool
- func PollUntil(s *spinner.Spinner, wsid string, state string, ...) error
- func StartWorkspaceIfStopped(t *terminal.Terminal, s *spinner.Spinner, tstore WorkspaceStartStore, ...) error
- func WaitForSSHToBeAvailable(sshAlias string, s *spinner.Spinner) error
- type GetWorkspaceByNameOrIDErrStore
- type MakeWorkspaceWithMetaStore
- type WorkspacePollingStore
- type WorkspaceStartStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAnyWorkspaceByIDOrNameInActiveOrgErr ¶ added in v0.6.76
func GetAnyWorkspaceByIDOrNameInActiveOrgErr(storeQ GetWorkspaceByNameOrIDErrStore, workspaceNameOrID string) (*entity.Workspace, error)
func GetClassIDString ¶ added in v0.6.209
func GetInstanceNames ¶ added in v0.6.317
GetInstanceNames gets instance names from args or stdin (supports piping) Returns error if no names are provided
func GetInstanceNamesWithPipeInfo ¶ added in v0.6.317
GetInstanceNamesWithPipeInfo gets instance names from args or stdin and returns whether stdin was piped. Useful when you need to know if input came from a pipe vs args.
func GetInstanceString ¶ added in v0.6.209
func GetUserWorkspaceByNameOrIDErr ¶ added in v0.6.66
func GetUserWorkspaceByNameOrIDErr(storeQ GetWorkspaceByNameOrIDErrStore, workspaceNameOrID string) (*entity.Workspace, error)
func IsStdinPiped ¶ added in v0.6.317
func IsStdinPiped() bool
IsStdinPiped returns true if stdin is being piped from another command
func IsStdoutPiped ¶ added in v0.6.317
func IsStdoutPiped() bool
IsStdoutPiped returns true if stdout is being piped to another command Enables command chaining like: brev ls | grep RUNNING | brev stop
func PollUntil ¶ added in v0.6.317
func PollUntil(s *spinner.Spinner, wsid string, state string, pollingStore WorkspacePollingStore, waitMsg string, timeout time.Duration) error
PollUntil polls the workspace status until it matches the desired state or times out
Types ¶
type MakeWorkspaceWithMetaStore ¶
type MakeWorkspaceWithMetaStore interface {
GetWorkspaceMetaData(workspaceID string) (*entity.WorkspaceMetaData, error)
}
type WorkspacePollingStore ¶ added in v0.6.317
type WorkspacePollingStore interface {
GetWorkspace(workspaceID string) (*entity.Workspace, error)
}
WorkspacePollingStore is the minimal interface needed for polling workspace state
type WorkspaceStartStore ¶ added in v0.6.317
type WorkspaceStartStore interface {
GetWorkspaceByNameOrIDErrStore
WorkspacePollingStore
StartWorkspace(workspaceID string) (*entity.Workspace, error)
}
WorkspaceStartStore is the interface needed for starting stopped workspaces