types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func() *Result

type Context

type Context struct {
	Vars  map[string]interface{}
	State map[string]interface{}
	Item  interface{}
}

type Predicate

type Predicate func() (bool, error)

type Result

type Result struct {
	Succeeded bool                   `json:"succeeded"`
	Changed   bool                   `json:"changed"`
	Error     string                 `json:"error,omitempty"`
	Module    string                 `json:"module"`
	Output    map[string]interface{} `json:"output,omitempty"`
}

func DoIf

func DoIf(module string, condition Predicate, do Action) *Result

Jump to

Keyboard shortcuts

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