Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscriminatedAttributesValidator ¶ added in v0.23.0
type DiscriminatedAttributesValidator struct {
// Discriminator is the name of the string attribute whose value selects the required attribute.
Discriminator string
// RequiredFor maps a discriminator value to the attribute that must be set for that value.
RequiredFor map[string]string
}
DiscriminatedAttributesValidator validates a discriminated-union object: the string value of the Discriminator attribute selects which one of the controlled attributes must be set, and requires every other controlled attribute to be null.
The controlled set is the set of attribute names in RequiredFor's values. Discriminator values not present in RequiredFor are ignored (validate the discriminator itself with stringvalidator.OneOf). Null/unknown objects and unknown attribute values are skipped.
func (DiscriminatedAttributesValidator) Description ¶ added in v0.23.0
func (v DiscriminatedAttributesValidator) Description(_ context.Context) string
func (DiscriminatedAttributesValidator) MarkdownDescription ¶ added in v0.23.0
func (v DiscriminatedAttributesValidator) MarkdownDescription(ctx context.Context) string
func (DiscriminatedAttributesValidator) ValidateObject ¶ added in v0.23.0
func (v DiscriminatedAttributesValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
type ExactlyOneAttributeValidator ¶ added in v0.18.2
type ExactlyOneAttributeValidator struct{}
func (ExactlyOneAttributeValidator) Description ¶ added in v0.18.2
func (v ExactlyOneAttributeValidator) Description(_ context.Context) string
func (ExactlyOneAttributeValidator) MarkdownDescription ¶ added in v0.18.2
func (v ExactlyOneAttributeValidator) MarkdownDescription(ctx context.Context) string
func (ExactlyOneAttributeValidator) ValidateObject ¶ added in v0.18.2
func (v ExactlyOneAttributeValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
type SupportedPlatforms ¶
type SupportedPlatforms struct{}
func (SupportedPlatforms) Description ¶
func (v SupportedPlatforms) Description(ctx context.Context) string
func (SupportedPlatforms) MarkdownDescription ¶
func (v SupportedPlatforms) MarkdownDescription(ctx context.Context) string
func (SupportedPlatforms) ValidateSet ¶
func (v SupportedPlatforms) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
type SymbolSize ¶ added in v0.20.2
type SymbolSize struct{}
SymbolSize validates the format and size of a building block definition symbol.
The value must be either:
- an http:// or https:// URL, or
- a data URI with one of the allowed image prefixes (png, jpeg, jpg, gif, webp, svg+xml).
For data URIs, the base64 payload must be valid and the decoded size must not exceed 100 KiB.
func (SymbolSize) Description ¶ added in v0.20.2
func (v SymbolSize) Description(_ context.Context) string
func (SymbolSize) MarkdownDescription ¶ added in v0.20.2
func (v SymbolSize) MarkdownDescription(ctx context.Context) string
func (SymbolSize) ValidateString ¶ added in v0.20.2
func (v SymbolSize) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)