Documentation ¶
Index ¶
- func ByPath(i, j *Module) int
- type Module
- type Service
- func (s *Service) CreateTask(mod *Module, opts task.CreateOptions) (*task.Task, error)
- func (s *Service) Format(moduleID resource.ID) (*task.Task, 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.Task, error)
- func (s *Service) List() []*Module
- func (s *Service) Reload() error
- func (s *Service) SetCurrent(moduleID, workspaceID resource.ID) error
- func (s *Service) Subscribe(ctx context.Context) <-chan resource.Event[*Module]
- func (s *Service) Validate(moduleID resource.ID) (*task.Task, error)
- type ServiceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Module ¶
type Module struct { resource.Resource // Pug working directory Workdir internal.Workdir // Path relative to pug working directory Path string // The module's current workspace. CurrentWorkspaceID *resource.ID // Whether module is initialized correctly. Nil means it is unknown. Initialized *bool // Whether a terraform init is in progress. InitInProgress bool // Whether module is formatted correctly. Nil means it is unknown. Formatted *bool // Whether formatting is in progress. FormatInProgress bool // Whether module is valid. Nil means it is unknown. Valid *bool // Whether validation is in progress. ValidationInProgress bool }
Module is a terraform root module.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(opts ServiceOptions) *Service
func (*Service) CreateTask ¶
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.
Click to show internal directories.
Click to hide internal directories.