Documentation
¶
Index ¶
- func ListLayers(rootDir string) error
- func ListStacks(rootDir string) error
- type ActionPlan
- func (ap *ActionPlan) AddEntity(meta types.IK2Metadata, body any)
- func (ap *ActionPlan) AddTask(task ActionTask)
- func (ap *ActionPlan) Apply() error
- func (ap *ActionPlan) Dedup()
- func (ap *ActionPlan) Destroy() error
- func (ap *ActionPlan) GetEntityAsTemplate(id string) (*types.IK2Template, error)
- func (ap *ActionPlan) GetEntityAsTemplateApply(id string) (*types.IK2TemplateApply, error)
- type ActionTask
- type ActionTaskType
- type FileStore
- func (fs *FileStore) GetAsInventory(key string) (*types.IK2Inventory, error)
- func (fs *FileStore) GetAsTemplate(key string) (*types.IK2Template, error)
- func (fs *FileStore) GetAsTemplateApply(key string) (*types.IK2TemplateApply, error)
- func (fs *FileStore) GetKey(key string) (*types.IK2[any], error)
- func (fs *FileStore) Scan(patterns []string) ([]string, error)
- type Inventory
- type StackInfo
- type StackStore
- func (s *StackStore) Build(targetLayer string) error
- func (s *StackStore) Down() error
- func (s *StackStore) Exec(verb string, args []string) error
- func (s *StackStore) Healthcheck() error
- func (s *StackStore) Logs(targetLayer string) error
- func (s *StackStore) Restart() error
- func (s *StackStore) Rm() error
- func (s *StackStore) Run(targetLayer, verb string, args []string) error
- func (s *StackStore) Status() error
- func (s *StackStore) Up() error
- func (s *StackStore) Urls() error
- type TemplatingStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListLayers ¶ added in v0.10.0
func ListStacks ¶ added in v0.10.0
Types ¶
type ActionPlan ¶
type ActionPlan struct {
Tasks []ActionTask `yaml:"actions"`
Entities map[string]any `yaml:"entities"`
Refs []types.IK2TemplateRef `yaml:"refs"`
Templates map[string]*types.IK2Template `yaml:"-"`
// contains filtered or unexported fields
}
func NewActionPlan ¶
func NewActionPlan(inventory *Inventory) *ActionPlan
func (*ActionPlan) AddEntity ¶
func (ap *ActionPlan) AddEntity(meta types.IK2Metadata, body any)
func (*ActionPlan) AddTask ¶
func (ap *ActionPlan) AddTask(task ActionTask)
func (*ActionPlan) Apply ¶
func (ap *ActionPlan) Apply() error
func (*ActionPlan) Dedup ¶
func (ap *ActionPlan) Dedup()
func (*ActionPlan) Destroy ¶
func (ap *ActionPlan) Destroy() error
func (*ActionPlan) GetEntityAsTemplate ¶
func (ap *ActionPlan) GetEntityAsTemplate(id string) (*types.IK2Template, error)
func (*ActionPlan) GetEntityAsTemplateApply ¶
func (ap *ActionPlan) GetEntityAsTemplateApply(id string) (*types.IK2TemplateApply, error)
type ActionTask ¶
type ActionTask struct {
Type ActionTaskType `yaml:"type"`
Params map[string]interface{} `yaml:"params"`
}
type ActionTaskType ¶
type ActionTaskType string
const ( ActionTaskTypeLocalResolve ActionTaskType = "local-resolve" ActionTaskTypeGitResolve ActionTaskType = "git-resolve" ActionTaskTypeApply ActionTaskType = "apply" )
type FileStore ¶
type FileStore struct {
// Path to the directory where the files are stored
Dir string
K2 []*types.IK2[any]
}
func (*FileStore) GetAsInventory ¶
func (fs *FileStore) GetAsInventory(key string) (*types.IK2Inventory, error)
func (*FileStore) GetAsTemplate ¶
func (fs *FileStore) GetAsTemplate(key string) (*types.IK2Template, error)
func (*FileStore) GetAsTemplateApply ¶
func (fs *FileStore) GetAsTemplateApply(key string) (*types.IK2TemplateApply, error)
type Inventory ¶
type Inventory struct {
InventoryDir string
InventoryKey string
// contains filtered or unexported fields
}
func NewInventory ¶
func (*Inventory) Apply ¶
func (i *Inventory) Apply(plan *ActionPlan) error
func (*Inventory) Destroy ¶
func (i *Inventory) Destroy(plan *ActionPlan) error
func (*Inventory) ListStacks ¶ added in v0.10.1
func (*Inventory) Plan ¶
func (i *Inventory) Plan() (*ActionPlan, error)
type StackStore ¶ added in v0.10.0
type StackStore struct {
RootDir string
StacksDir string
Name string
Definition *types.IK2Stack
Debug bool
}
func NewStackStore ¶ added in v0.10.0
func NewStackStore(rootDir string, stackName string, debug bool) (*StackStore, error)
func (*StackStore) Build ¶ added in v0.10.4
func (s *StackStore) Build(targetLayer string) error
func (*StackStore) Down ¶ added in v0.10.0
func (s *StackStore) Down() error
func (*StackStore) Exec ¶ added in v0.10.5
func (s *StackStore) Exec(verb string, args []string) error
func (*StackStore) Healthcheck ¶ added in v0.10.0
func (s *StackStore) Healthcheck() error
func (*StackStore) Logs ¶ added in v0.10.0
func (s *StackStore) Logs(targetLayer string) error
func (*StackStore) Restart ¶ added in v0.10.0
func (s *StackStore) Restart() error
func (*StackStore) Rm ¶ added in v0.10.5
func (s *StackStore) Rm() error
func (*StackStore) Run ¶ added in v0.10.0
func (s *StackStore) Run(targetLayer, verb string, args []string) error
func (*StackStore) Status ¶ added in v0.10.0
func (s *StackStore) Status() error
func (*StackStore) Up ¶ added in v0.10.0
func (s *StackStore) Up() error
func (*StackStore) Urls ¶ added in v0.10.0
func (s *StackStore) Urls() error
type TemplatingStore ¶
type TemplatingStore struct {
// contains filtered or unexported fields
}
func NewTemplatingStore ¶
func NewTemplatingStore(plan *ActionPlan) *TemplatingStore
func (*TemplatingStore) ApplyTemplate ¶
func (*TemplatingStore) DestroyTemplate ¶
func (t *TemplatingStore) DestroyTemplate(templateApplyId string) error
Click to show internal directories.
Click to hide internal directories.