Documentation ¶
Index ¶
- func Sort(getter moduleGetter) func(*Workspace, *Workspace) int
- type ListOptions
- type Service
- func (s *Service) Create(path, name string) (*Workspace, *task.Task, error)
- func (s *Service) Delete(id resource.ID) (*task.Task, error)
- func (s *Service) Get(workspaceID resource.ID) (*Workspace, error)
- func (s *Service) GetByName(moduleID resource.ID, name string) (*Workspace, error)
- func (s *Service) List(opts ListOptions) []*Workspace
- func (s *Service) LoadWorkspacesUponModuleLoad(modules moduleSubscription)
- func (s *Service) Reload(moduleID resource.ID) (*task.Task, error)
- func (s *Service) SelectWorkspace(moduleID, workspaceID resource.ID) error
- func (s *Service) SetCurrentRun(workspaceID, runID resource.ID) error
- type ServiceOptions
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListOptions ¶
type Service ¶
func NewService ¶
func NewService(opts ServiceOptions) *Service
func (*Service) List ¶
func (s *Service) List(opts ListOptions) []*Workspace
func (*Service) LoadWorkspacesUponModuleLoad ¶
func (s *Service) LoadWorkspacesUponModuleLoad(modules moduleSubscription)
LoadWorkspacesUponModuleLoad automatically loads workspaces for a module whenever: * a new module is loaded into pug for the first time * an existing module is updated and does not yet have a current workspace.
func (*Service) Reload ¶
Reload invokes `terraform workspace list` on a module and updates pug with the results, adding any newly discovered workspaces and pruning any workspaces no longer found to exist.
func (*Service) SelectWorkspace ¶
SelectWorkspace runs the `terraform workspace select <workspace_name>` command, which sets the current workspace for the module. Once that's finished it then updates the current workspace in pug itself too.
type ServiceOptions ¶
Click to show internal directories.
Click to hide internal directories.