Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExactlyOneChild ¶
ExactlyOneChild returns an AttributeValidator which ensures that any configured attribute object has only one child attribute. Null (unconfigured) and unknown values are skipped.
func IsRFC3339 ¶
IsRFC3339 returns an AttributeValidator which ensures that any configured attribute value:
- Is a String.
- Is in RFC3339 Format.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsValidDate ¶
IsDate returns an AttributeValidator which ensures that any configured attribute value:
- Is a String.
- Is in YYYY-MM-DD Format.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsValidJSON ¶
IsValidJSON returns an AttributeValidator which ensures that any configured attribute value:
- Is a String.
- Is considered valid JSON.
Null (unconfigured) and unknown (known after apply) values are skipped.
Types ¶
type DateValidator ¶
type DateValidator struct { }
func (DateValidator) Description ¶
func (validator DateValidator) Description(ctx context.Context) string
func (DateValidator) MarkdownDescription ¶
func (validator DateValidator) MarkdownDescription(ctx context.Context) string
func (DateValidator) ValidateString ¶
func (validator DateValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type JSONParseValidator ¶
type JSONParseValidator struct { }
JSONParseValidator validates if the provided value is of type string and can be parsed as JSON.
func (JSONParseValidator) Description ¶
func (validator JSONParseValidator) Description(ctx context.Context) string
func (JSONParseValidator) MarkdownDescription ¶
func (validator JSONParseValidator) MarkdownDescription(ctx context.Context) string
func (JSONParseValidator) ValidateString ¶
func (validator JSONParseValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type RFC3339TimeValidator ¶
type RFC3339TimeValidator struct { }
func (RFC3339TimeValidator) Description ¶
func (validator RFC3339TimeValidator) Description(ctx context.Context) string
func (RFC3339TimeValidator) MarkdownDescription ¶
func (validator RFC3339TimeValidator) MarkdownDescription(ctx context.Context) string
func (RFC3339TimeValidator) ValidateString ¶
func (validator RFC3339TimeValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)