Documentation
¶
Index ¶
- type ChangeSetExecutor
- type ExecutionResult
- type Executor
- func (executor *Executor) Create(creates []string) *OperationResult
- func (executor *Executor) Delete(deletes []string) *OperationResult
- func (executor *Executor) Execute(actionType git.ActionType, files []string, execFunc OperationExecFunc) *OperationResult
- func (e *Executor) Run() *ExecutionResult
- func (executor *Executor) Update(updates []string) *OperationResult
- type ExecutorOptions
- type OperationExecFunc
- type OperationResult
- type ServiceExecutor
- type ServiceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeSetExecutor ¶
type ChangeSetExecutor interface {
Run() *ExecutionResult
Execute(actionType git.ActionType, files []string, execFunc OperationExecFunc) *OperationResult
Create(creates []string) *OperationResult
Update(updates []string) *OperationResult
Delete(deletes []string) *OperationResult
}
func NewExecutor ¶
func NewExecutor( logger *logging.Logger, options *ExecutorOptions, changeSet *git.ChangeSet, service ServiceExecutor) ChangeSetExecutor
Creates a new executor instance. The executor is responsble for running the create, update, and delete operations for a service using the CLI defined parameters for parallel and exit-on-error.
type ExecutionResult ¶
type ExecutionResult struct {
ServiceName string `yaml:"service" json:"service"`
HasErrors bool `yaml:"errors" json:"errors"`
CreateResults *OperationResult `yaml:"create" json:"create"`
UpdateResults *OperationResult `yaml:"update" json:"update"`
DeleteResults *OperationResult `yaml:"delete" json:"delete"`
}
type Executor ¶
type Executor struct {
ChangeSetExecutor
// contains filtered or unexported fields
}
func (*Executor) Create ¶
func (executor *Executor) Create(creates []string) *OperationResult
Perform a create operation for each file in the changeset
func (*Executor) Delete ¶
func (executor *Executor) Delete(deletes []string) *OperationResult
Perform a delete operation for each deleted file in the changeset
func (*Executor) Execute ¶
func (executor *Executor) Execute(actionType git.ActionType, files []string, execFunc OperationExecFunc) *OperationResult
Execute the desired action (create, update, delete) using the passed options for parallelism and exit behavior.
func (*Executor) Run ¶
func (e *Executor) Run() *ExecutionResult
Executes create, update, and delete operations for each file in the changeset.
func (*Executor) Update ¶
func (executor *Executor) Update(updates []string) *OperationResult
Perform an update operation for each deleted file in the changeset
type ExecutorOptions ¶
type OperationExecFunc ¶
type OperationExecFunc func(serviceParams *ServiceParams)
type OperationResult ¶
type OperationResult struct {
Responses map[string]string `yaml:"responses" json:"responses" mapstructure:"responses"`
Errors map[string]error `yaml:"errors" json:"errors" mapstructure:"errors"`
}
func NewOperationResult ¶
func NewOperationResult(responses map[string]string, errors map[string]error) *OperationResult
type ServiceExecutor ¶
type ServiceExecutor interface {
Name() string
Create(serviceParams *ServiceParams)
Update(serviceParams *ServiceParams)
Delete(serviceParams *ServiceParams)
}
Click to show internal directories.
Click to hide internal directories.