Documentation
¶
Overview ¶
Package toolanswer holds a managed script's declared answers to what the tools answer (#1953). A test that declares the answer a call gets (testing.answer) is checked here against the tool's answer contract (toolkit.AnswerContract), so a test cannot pass by relying on a shape the tool never returns: an answer lacking a field the tool always returns, a field of the wrong type, or a key a nested object never carries is refused, naming the field.
The top level of an answer admits keys the contract does not name, because the platform adds its own there after the tool returns (the call reference, the enrichment blocks).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lister ¶
Lister is the live toolkit registry, which gains and loses toolkits as connections are added and removed.
type Live ¶
type Live struct {
Kits Lister
Extra []toolkit.AnswerContract
}
Live is the contracts of the toolkits a registry holds at the moment a declared answer is checked, and Extra's: the contracts of the tools the platform registers outside any toolkit (notify). A nil registry holds none.