Documentation ¶
Index ¶
- func ByPath(i, j *Module) int
- func IsInitTask(t *task.Task) bool
- type Module
- type Options
- type Service
- func (s *Service) Format(moduleID resource.ID) (task.Spec, error)
- func (s *Service) Get(id resource.ID) (*Module, error)
- func (s *Service) GetByPath(path string) (*Module, error)
- func (s *Service) Init(moduleID resource.ID) (task.Spec, error)
- func (s *Service) List() []*Module
- func (s *Service) Reload() (added []string, removed []string, err error)
- func (s *Service) SetCurrent(moduleID, workspaceID resource.ID) error
- func (s *Service) Validate(moduleID resource.ID) (task.Spec, error)
- type ServiceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInitTask ¶ added in v0.5.0
Types ¶
type Module ¶
type Module struct { resource.Common // Path relative to pug working directory Path string // The module's current workspace. CurrentWorkspaceID *resource.ID // The module's backend type Backend string }
Module is a terraform root module.
type Options ¶ added in v0.3.3
type Options struct { // Path is the module path relative to the working directory. Path string // Backend is the type of terraform backend Backend string }
Options for constructing a module.
type Service ¶
func NewService ¶
func NewService(opts ServiceOptions) *Service
func (*Service) Reload ¶
Reload searches the working directory recursively for modules and adds them to the store before pruning those that are currently stored but can no longer be found.
TODO: separate into Load and Reload
func (*Service) SetCurrent ¶
SetCurrent sets the current workspace for the module.
Click to show internal directories.
Click to hide internal directories.