Documentation
¶
Index ¶
Constants ¶
View Source
const ( ComponentName = "array_get" RequestPort = "request" ResultPort = "result" ErrorPort = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the array element accessor
func (*Component) GetInfo ¶
func (c *Component) GetInfo() module.ComponentInfo
type Error ¶
type Error struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
Error string `json:"error" title:"Error"`
}
Error output
type Request ¶
type Request struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context" description:"Arbitrary context to pass through"`
Array []Item `json:"array" required:"true" configurable:"true" title:"Array" description:"Array to get element from"`
Index int `json:"index" required:"true" title:"Index" description:"1-based item number"`
}
Request is the input to get an array element
type Result ¶
type Result struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
Item Item `json:"item" configurable:"true" title:"Item"`
Index int `json:"index" title:"Index" description:"1-based index of the returned item"`
}
Result is the output with the resolved element
Click to show internal directories.
Click to hide internal directories.