Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action allows execution
func NewHTTPFromMap ¶
NewHTTPFromMap initializes an http action based on generic map
func NewSubprocessFromMap ¶
NewSubprocessFromMap parses generic map into subprocess action
type DummyAction ¶
DummyAction doesn't do anything!
type HTTP ¶
type HTTP struct {
URL string `mapstructure:"url"`
Method string
Headers map[string]string
Overrides []results.Override
Body string
Type string
}
HTTP action has all data necessary to make a request
type HTTPResult ¶
HTTPResult contains request result and metadata
func (HTTPResult) Error ¶
func (h HTTPResult) Error() error
Error gets the error associated with this result
func (HTTPResult) ValueOfProperty ¶
func (h HTTPResult) ValueOfProperty(property string) (results.Value, error)
ValueOfProperty gets value associated with an identifier
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps action identifiers to parser functions
type StubResult ¶
type StubResult struct{}
StubResult is a configurable result for testing
func (StubResult) ValueOfProperty ¶
func (sr StubResult) ValueOfProperty(property string) (results.Value, error)
ValueOfProperty returns a value and an error for testing
type Subprocess ¶
type Subprocess struct {
CommandName string `mapstructure:"command_name"`
Args []string
Overrides []results.Override
Type string
}
Subprocess can execute a shell command
type SubprocessResult ¶
type SubprocessResult struct {
Output []byte
Returncode int
// contains filtered or unexported fields
}
SubprocessResult from suprocess execution
func (SubprocessResult) Error ¶
func (s SubprocessResult) Error() error
Error unpacks error from the result
func (SubprocessResult) ValueOfProperty ¶
func (s SubprocessResult) ValueOfProperty(property string) (results.Value, error)
ValueOfProperty retrieves a result value based on a property of the result