rundocument

package
v0.0.0-...-a9ed6da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package rundocument implements the aws:runDocument plugin

Package rundocument implements the aws:runDocument plugin

Package rundocument implements the aws:runDocument plugin

Index

Constants

View Source
const (
	SSMDocumentType = "SSMDocument"
	LocalPathType   = "LocalPath"

	FailExitCode = 1
	PassExitCode = 0
)

Variables

This section is empty.

Functions

func Name

func Name() string

Name returns the plugin name

Types

type ExecDocument

type ExecDocument interface {
	ParseDocument(log log.T, documentRaw []byte, orchestrationDir string,
		s3Bucket string, s3KeyPrefix string, messageID string, documentID string, defaultWorkingDirectory string,
		params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error)
	ExecuteDocument(context context.T, pluginInput []contracts.PluginState, documentID string,
		documentCreatedDate string) (chan contracts.DocumentResult, error)
}

type ExecDocumentImpl

type ExecDocumentImpl struct {
	DocExecutor executer.Executer
}

func (ExecDocumentImpl) ExecuteDocument

func (exec ExecDocumentImpl) ExecuteDocument(context context.T, pluginInput []contracts.PluginState, documentID string,
	documentCreatedDate string) (resultChannels chan contracts.DocumentResult, err error)

ExecuteDocument is responsible to execute the sub-documents that are created or downloaded by the executeCommand plugin

func (ExecDocumentImpl) ParseDocument

func (exec ExecDocumentImpl) ParseDocument(log log.T, documentRaw []byte, orchestrationDir string,
	s3Bucket string, s3KeyPrefix string, messageID string, documentID string, defaultWorkingDirectory string,
	params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error)

ParseDocument parses the remote document obtained to a format that the executor can use. This function is also responsible for all the validation of document and replacement of parameters

type ExecMock

type ExecMock struct {
	mock.Mock
}

func NewExecMock

func NewExecMock() ExecMock

func (ExecMock) ExecuteDocument

func (e ExecMock) ExecuteDocument(context context.T, pluginInput []contracts.PluginState, documentID string, documentCreatedDate string) (chan contracts.DocumentResult, error)

func (ExecMock) ParseDocument

func (e ExecMock) ParseDocument(log log.T, documentRaw []byte, orchestrationDir string, s3Bucket string, s3KeyPrefix string, messageID string, documentID string, defaultWorkingDirectory string, params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error)

type ExecutePluginDepth

type ExecutePluginDepth struct {
	// contains filtered or unexported fields
}

ExecutePluginDepth is the struct that is sent through to the sub-documents to maintain the depth of execution

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin is the type for the aws:copyContent plugin.

func NewPlugin

func NewPlugin() (*Plugin, error)

NewPlugin returns a new instance of the plugin.

func (*Plugin) Execute

func (p *Plugin) Execute(context context.T, config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)

Execute runs multiple sets of commands and returns their outputs. res.Output will contain a slice of RunCommandPluginOutput.

type RunDocumentPluginInput

type RunDocumentPluginInput struct {
	contracts.PluginInput
	DocumentType       string      `json:"documentType"`
	DocumentPath       string      `json:"documentPath"`
	DocumentParameters interface{} `json:"documentParameters"`
}

RunDocumentPluginInput is a struct that holds the parameters sent through send command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL