Documentation
¶
Index ¶
- Constants
- Variables
- func Execute(ctx context.FeatureContext, action *Base, fn ExecuteFn) errors.Error
- func IsPluginBaseArgument(name string) bool
- func SetBaseArgs(action Action, attribute *hcl.Attribute) errors.Error
- type Action
- type Actions
- type Base
- func (s *Base) Description() string
- func (s *Base) SetCount(count hcl.Expression)
- func (s *Base) SetDesc(desc string)
- func (s *Base) SetItems(items hcl.Expression)
- func (s *Base) SetKind(kind string)
- func (s *Base) SetWhen(when hcl.Expression)
- func (s *Base) SetWhile(while hcl.Expression)
- func (s *Base) ShouldExecute(ctx *hcl.EvalContext) bool
- func (s *Base) String() string
- type Decoder
- type ExecuteFn
Constants ¶
View Source
const ( // ArgDesc contains the name of the argument used in the plugins block. ArgDesc = "description" // ArgWhen contains the name of the argument used in the plugins block. ArgWhen = "when" // ArgWhile contains the name of the argument used in the plugins block. ArgWhile = "while" // ArgCount contains the name of the argument used in the plugins block. ArgCount = "count" // ArgItems contains the name of the slice to be iterated over. ArgItems = "items" )
Variables ¶
View Source
var BaseArguments = []hcl.AttributeSchema{ {Name: ArgDesc, Required: false}, {Name: ArgWhen, Required: false}, {Name: ArgWhile, Required: false}, {Name: ArgCount, Required: false}, {Name: ArgItems, Required: false}, }
BaseArguments contain the list of common attributes.
Functions ¶
func IsPluginBaseArgument ¶
IsPluginBaseArgument returns true if the name is common for all the plugins.
func SetBaseArgs ¶
SetBaseArgs set the common arguments.
Types ¶
type Action ¶
type Action interface { SetDesc(string) SetWhen(hcl.Expression) SetCount(hcl.Expression) SetWhile(hcl.Expression) SetItems(hcl.Expression) SetKind(string) Description() string String() string ShouldExecute(ctx *hcl.EvalContext) bool Execute(ctx context.FeatureContext) errors.Error }
Action interface to be implemented by any action.
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base contain the common attributes of all the plugins.
func (*Base) Description ¶
Description return block description.
func (*Base) ShouldExecute ¶
Directories
¶
Path | Synopsis |
---|---|
Package assert contains types and methods used by the plugin
|
Package assert contains types and methods used by the plugin |
Package pprint contains the root elements required by the plugin
|
Package pprint contains the root elements required by the plugin |
internal
Package internal contains not exported types and functions
|
Package internal contains not exported types and functions |
Package plugins contain the types and method to deal with plugins
|
Package plugins contain the types and method to deal with plugins |
Package set contain types and method to deal with this plugin
|
Package set contain types and method to deal with this plugin |
Click to show internal directories.
Click to hide internal directories.