Documentation ¶
Index ¶
- Constants
- func Apply(configFile string, continueDirectly bool) error
- func Create(tool *configloader.Tool) (map[string]interface{}, error)
- func Delete(tool *configloader.Tool) (bool, error)
- func Destroy(configFile string, continueDirectly bool) error
- func HandleOutputsReferences(smgr statemanager.Manager, options map[string]interface{}) []error
- func Read(tool *configloader.Tool) (map[string]interface{}, error)
- func Remove(configFile string, continueDirectly bool, isForceDelete bool) error
- func Update(tool *configloader.Tool) (map[string]interface{}, error)
- func Verify(configFile string) bool
- type Change
- type ChangeResult
- type CommandType
- type DevStreamPlugin
Constants ¶
const DefaultPluginDir = ".devstream"
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(tool *configloader.Tool) (map[string]interface{}, error)
Create loads the plugin and calls the Create method of that plugin.
func Delete ¶
func Delete(tool *configloader.Tool) (bool, error)
Delete loads the plugin and calls the Delete method of that plugin.
func HandleOutputsReferences ¶
func HandleOutputsReferences(smgr statemanager.Manager, options map[string]interface{}) []error
Types ¶
type Change ¶
type Change struct { Tool *configloader.Tool ActionName statemanager.ComponentAction Result *ChangeResult Description string }
Change is a wrapper with a single Tool and its Action should be execute.
func GetChangesForApply ¶
func GetChangesForApply(smgr statemanager.Manager, cfg *configloader.Config) ([]*Change, error)
GetChangesForApply takes "State Manager" & "Config" then do some calculate and return a Plan. All actions should be executed is included in this Plan.changes.
func GetChangesForDelete ¶
func GetChangesForDelete(smgr statemanager.Manager, cfg *configloader.Config, isForceDelete bool) ([]*Change, error)
GetChangesForDelete takes "State Manager" & "Config" then do some calculation and return a Plan to delete all plugins in the Config. All actions should be executed is included in this Plan.changes.
func GetChangesForDestroy ¶ added in v0.4.0
func GetChangesForDestroy(smgr statemanager.Manager) ([]*Change, error)
type ChangeResult ¶
type ChangeResult struct { Succeeded bool Error error Time string ReturnValue map[string]interface{} }
ChangeResult holds the result with a change action.
type CommandType ¶
type CommandType string
const ( CommandApply CommandType = "apply" CommandDelete CommandType = "delete" )
type DevStreamPlugin ¶
type DevStreamPlugin interface { // Create, Read, and Update return two results, the first being the "state" Create(map[string]interface{}) (map[string]interface{}, error) Read(map[string]interface{}) (map[string]interface{}, error) Update(map[string]interface{}) (map[string]interface{}, error) // Delete returns (true, nil) if there is no error; otherwise it returns (false, error) Delete(map[string]interface{}) (bool, error) }
DevStreamPlugin is a struct, on which Create/Read/Update/Delete interfaces are defined.