Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StubGetResource ¶
func StubGetResource(resources StubResources) dependency.GetResourceFunc
StubGetResource returns a GetResourceFunc which will set outputs, or return errors, as defined by the supplied StubResources. Any unexpected usage of the result will return Errorf errors describing the problem; in particular, missing resources will not trigger dependency.ErrMissing unless specifically configured to do so.
Types ¶
type StubResource ¶
type StubResource struct { Output interface{} Error error }
StubResource is used to define the behaviour of a StubGetResource func for a particular resource name.
type StubResources ¶
type StubResources map[string]StubResource
StubResources defines the complete behaviour of a StubGetResource func.
Click to show internal directories.
Click to hide internal directories.