You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`defaults.Value` fills a value before the type's runtime method runs. `defaults.Optional` says the field may be omitted and the zero value is acceptable.
43
+
`defaults.Value` fills a value before the type's runtime method runs.
44
+
`defaults.Optional` says the field may be omitted and the zero value is acceptable.
45
+
The same defaults method model applies to library configuration structs.
Set constraints include `ExactlyOneOf`, `AtLeastOneOf`, `AtMostOneOf`, `RequiredTogether`, `RequiredWith`, and `ForbiddenWith`. Predicate constraints use `Must` or `When(...).Require(...)`.
60
+
Set constraints include `ExactlyOneOf`, `AtLeastOneOf`, `AtMostOneOf`,
61
+
`RequiredTogether`, `RequiredWith`, and `ForbiddenWith`. Predicate constraints use
62
+
`Must` or `When(...).Require(...)`. Library configuration structs use the same
63
+
constraints method model.
55
64
56
65
## Check timing
57
66
58
-
Deep schema and constraint checks happen at compile time when the source and selected libraries are known. The compiled factory trusts those checks and decodes runtime values into the registered Go types.
67
+
Deep schema and constraint checks happen at compile time when the source and selected
68
+
libraries are known. The compiled factory trusts those checks and decodes runtime
69
+
values into the registered Go types.
59
70
60
-
For checks that need live configuration or external state, a resource can also implement `runtime.InputValidator`; see [Resources](resources.md#apply-time-input-validation).
71
+
For checks that need live configuration or external state, a resource can also implement
72
+
`runtime.InputValidator`; see [Resources](resources.md#apply-time-input-validation).
0 commit comments