Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(binds libcnb.Bindings, predicates ...Predicate) libcnb.Bindings
Resolve returns all bindings from binds that match every Predicate in predicates.
func ResolveOne ¶
ResolveOne returns a single binding from bindings that match every Predicate if present. If exactly one match is found ResolveOne returns the binding and true. If zero matches are found, ResolveOne returns an empty binding and false. An error is returned if multiple matches are found.
Types ¶
type Predicate ¶
type Predicate func(bind libcnb.Binding) bool
Predicate should return true if it matches a given binding.
func OfProvider ¶
OfProvider returns a Predicate that returns true if a given binding has Provider that matches p. The comparison is case-insensitive.
Click to show internal directories.
Click to hide internal directories.