Documentation ¶
Index ¶
- Constants
- func GetAvailableResources(flow specs.FlowInterface, breakpoint string) map[string]ReferenceMap
- func GetDefaultProp(resource string) string
- func GetNextResource(flow specs.FlowInterface, breakpoint string) string
- func GetReference(path string, prop string, references ReferenceMap) *specs.Property
- func GetResourceReference(reference *specs.PropertyReference, references map[string]ReferenceMap, ...) *specs.Property
- func ParseResource(resource string) (string, string)
- func ResolveSelfReference(path string, resource string) string
- type PathLookup
- func HeaderLookup(header specs.Header) PathLookup
- func OnErrLookup(node string, spec *specs.OnError) PathLookup
- func ParamsLookup(params map[string]*specs.Property, flow specs.FlowInterface, breakpoint string) PathLookup
- func PropertyLookup(param *specs.Property) PathLookup
- func VariableHeaderLookup(header specs.Header) PathLookup
- type ReferenceMap
Constants ¶
const SelfRef = "."
SelfRef represents the syntax used to reference the entire object
Variables ¶
This section is empty.
Functions ¶
func GetAvailableResources ¶
func GetAvailableResources(flow specs.FlowInterface, breakpoint string) map[string]ReferenceMap
GetAvailableResources fetches the available resources able to be referenced until the given breakpoint (call.Name) has been reached.
func GetDefaultProp ¶
GetDefaultProp returns the default resource for the given resource
func GetNextResource ¶
func GetNextResource(flow specs.FlowInterface, breakpoint string) string
GetNextResource returns the resource after the given breakpoint
func GetReference ¶
func GetReference(path string, prop string, references ReferenceMap) *specs.Property
GetReference attempts to lookup and return the available property on the given path
func GetResourceReference ¶
func GetResourceReference(reference *specs.PropertyReference, references map[string]ReferenceMap, breakpoint string) *specs.Property
GetResourceReference attempts to return the resource reference property
func ParseResource ¶
ParseResource parses the given resource into the resource and props
func ResolveSelfReference ¶
ResolveSelfReference appends the given resource if the path is a self reference
Types ¶
type PathLookup ¶
PathLookup represents a lookup method that returns the property available on the given path
func HeaderLookup ¶
func HeaderLookup(header specs.Header) PathLookup
HeaderLookup attempts to lookup the given path inside the header
func OnErrLookup ¶
func OnErrLookup(node string, spec *specs.OnError) PathLookup
OnErrLookup constructs a lookup method able to lookup error references
func ParamsLookup ¶
func ParamsLookup(params map[string]*specs.Property, flow specs.FlowInterface, breakpoint string) PathLookup
ParamsLookup constructs a lookup method able to lookup property references inside the given params map
func PropertyLookup ¶
func PropertyLookup(param *specs.Property) PathLookup
PropertyLookup attempts to lookup the given path inside the params collection
func VariableHeaderLookup ¶
func VariableHeaderLookup(header specs.Header) PathLookup
VariableHeaderLookup returns a string property for the given path and sets the header property
type ReferenceMap ¶
type ReferenceMap map[string]PathLookup
ReferenceMap holds the resource references and their representing parameter map