Documentation ¶
Index ¶
- func AtLeastNAttributes(n int, attributes ...string) validator.Object
- func AtMostNAttributes(n int, attributes ...string) validator.Object
- func ExactlyNAttributes(n int, attributes ...string) validator.Object
- func ParseCidr(requireIpv4 bool, requireIpv6 bool) validator.String
- func ParseInt(min int, max int) validator.String
- func ParseIp(requireIpv4 bool, requireIpv6 bool) validator.String
- func ParseMac() validator.String
- func ParseMagic() validator.String
- func ParseName() validator.String
- func ParseNetmask(cidrFormat bool, decimalFormat bool) validator.String
- func ParseRangeOfInt(min int, max int, equalAlloweds bool) validator.String
- func ParseVar() validator.String
- type AllowedWhenValueIsInRequest
- type AllowedWhenValueIsInResponse
- type AllowedWhenValueIsInValidator
- func (o AllowedWhenValueIsInValidator) Description(_ context.Context) string
- func (o AllowedWhenValueIsInValidator) MarkdownDescription(ctx context.Context) string
- func (o AllowedWhenValueIsInValidator) Validate(ctx context.Context, req AllowedWhenValueIsInRequest, ...)
- func (o AllowedWhenValueIsInValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o AllowedWhenValueIsInValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o AllowedWhenValueIsInValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o AllowedWhenValueIsInValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o AllowedWhenValueIsInValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o AllowedWhenValueIsInValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o AllowedWhenValueIsInValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o AllowedWhenValueIsInValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o AllowedWhenValueIsInValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AllowedWhenValueIsRequest
- type AllowedWhenValueIsResponse
- type AllowedWhenValueIsValidator
- func (o AllowedWhenValueIsValidator) Description(_ context.Context) string
- func (o AllowedWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
- func (o AllowedWhenValueIsValidator) Validate(ctx context.Context, req AllowedWhenValueIsRequest, ...)
- func (o AllowedWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o AllowedWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o AllowedWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o AllowedWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o AllowedWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o AllowedWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o AllowedWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o AllowedWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o AllowedWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AtLeastNOfValidator
- func (o AtLeastNOfValidator) Description(ctx context.Context) string
- func (o AtLeastNOfValidator) MarkdownDescription(_ context.Context) string
- func (o AtLeastNOfValidator) Validate(ctx context.Context, req AtLeastNOfValidatorRequest, ...)
- func (o AtLeastNOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o AtLeastNOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o AtLeastNOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o AtLeastNOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o AtLeastNOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o AtLeastNOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o AtLeastNOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o AtLeastNOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o AtLeastNOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AtLeastNOfValidatorRequest
- type AtLeastNOfValidatorResponse
- type AtMostNOfValidator
- func (o AtMostNOfValidator) Description(ctx context.Context) string
- func (o AtMostNOfValidator) MarkdownDescription(_ context.Context) string
- func (o AtMostNOfValidator) Validate(ctx context.Context, req AtMostNOfValidatorRequest, ...)
- func (o AtMostNOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o AtMostNOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o AtMostNOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o AtMostNOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o AtMostNOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o AtMostNOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o AtMostNOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o AtMostNOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o AtMostNOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AtMostNOfValidatorRequest
- type AtMostNOfValidatorResponse
- type ForbiddenWhenValueIsRequest
- type ForbiddenWhenValueIsResponse
- type ForbiddenWhenValueIsValidator
- func (o ForbiddenWhenValueIsValidator) Description(_ context.Context) string
- func (o ForbiddenWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
- func (o ForbiddenWhenValueIsValidator) Validate(ctx context.Context, req ForbiddenWhenValueIsRequest, ...)
- func (o ForbiddenWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o ForbiddenWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o ForbiddenWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o ForbiddenWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o ForbiddenWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o ForbiddenWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o ForbiddenWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o ForbiddenWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o ForbiddenWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type NineTypesValidator
- type ParseCidrValidator
- type ParseIntValidator
- type ParseIpValidator
- type ParseMacValidator
- type ParseMagicValidator
- type ParseNameValidator
- type ParseNetmaskValidator
- type ParseRangeOfIntValidator
- type ParseVarValidator
- type RequiredWhenValueIsRequest
- type RequiredWhenValueIsResponse
- type RequiredWhenValueIsValidator
- func (o RequiredWhenValueIsValidator) Description(_ context.Context) string
- func (o RequiredWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
- func (o RequiredWhenValueIsValidator) Validate(ctx context.Context, req RequiredWhenValueIsRequest, ...)
- func (o RequiredWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (o RequiredWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (o RequiredWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (o RequiredWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (o RequiredWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (o RequiredWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (o RequiredWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (o RequiredWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (o RequiredWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMagic ¶ added in v0.1.32
func ParseRangeOfInt ¶ added in v0.1.13
Types ¶
type AllowedWhenValueIsInRequest ¶ added in v0.1.11
type AllowedWhenValueIsInResponse ¶ added in v0.1.11
type AllowedWhenValueIsInResponse struct {
Diagnostics diag.Diagnostics
}
type AllowedWhenValueIsInValidator ¶ added in v0.1.11
type AllowedWhenValueIsInValidator struct { Expression path.Expression Values []attr.Value }
func AllowedWhenValueIsIn ¶ added in v0.1.11
func AllowedWhenValueIsIn(expression path.Expression, values []attr.Value) AllowedWhenValueIsInValidator
func (AllowedWhenValueIsInValidator) Description ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) Description(_ context.Context) string
func (AllowedWhenValueIsInValidator) MarkdownDescription ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) MarkdownDescription(ctx context.Context) string
func (AllowedWhenValueIsInValidator) Validate ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) Validate(ctx context.Context, req AllowedWhenValueIsInRequest, resp *AllowedWhenValueIsInResponse)
func (AllowedWhenValueIsInValidator) ValidateBool ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AllowedWhenValueIsInValidator) ValidateFloat64 ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AllowedWhenValueIsInValidator) ValidateInt64 ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AllowedWhenValueIsInValidator) ValidateList ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AllowedWhenValueIsInValidator) ValidateMap ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AllowedWhenValueIsInValidator) ValidateNumber ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AllowedWhenValueIsInValidator) ValidateObject ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AllowedWhenValueIsInValidator) ValidateSet ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AllowedWhenValueIsInValidator) ValidateString ¶ added in v0.1.11
func (o AllowedWhenValueIsInValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type AllowedWhenValueIsRequest ¶ added in v0.1.9
type AllowedWhenValueIsResponse ¶ added in v0.1.9
type AllowedWhenValueIsResponse struct {
Diagnostics diag.Diagnostics
}
type AllowedWhenValueIsValidator ¶ added in v0.1.9
type AllowedWhenValueIsValidator struct { Expression path.Expression Value attr.Value }
func AllowedWhenValueIs ¶ added in v0.1.9
func AllowedWhenValueIs(expression path.Expression, value attr.Value) AllowedWhenValueIsValidator
func (AllowedWhenValueIsValidator) Description ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) Description(_ context.Context) string
func (AllowedWhenValueIsValidator) MarkdownDescription ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
func (AllowedWhenValueIsValidator) Validate ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) Validate(ctx context.Context, req AllowedWhenValueIsRequest, resp *AllowedWhenValueIsResponse)
func (AllowedWhenValueIsValidator) ValidateBool ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AllowedWhenValueIsValidator) ValidateFloat64 ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AllowedWhenValueIsValidator) ValidateInt64 ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AllowedWhenValueIsValidator) ValidateList ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AllowedWhenValueIsValidator) ValidateMap ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AllowedWhenValueIsValidator) ValidateNumber ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AllowedWhenValueIsValidator) ValidateObject ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AllowedWhenValueIsValidator) ValidateSet ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AllowedWhenValueIsValidator) ValidateString ¶ added in v0.1.9
func (o AllowedWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type AtLeastNOfValidator ¶ added in v0.1.9
type AtLeastNOfValidator struct { N int PathExpressions path.Expressions }
AtLeastNOfValidator is the underlying struct implementing AtLeastNOf.
func (AtLeastNOfValidator) Description ¶ added in v0.1.9
func (o AtLeastNOfValidator) Description(ctx context.Context) string
func (AtLeastNOfValidator) MarkdownDescription ¶ added in v0.1.9
func (o AtLeastNOfValidator) MarkdownDescription(_ context.Context) string
func (AtLeastNOfValidator) Validate ¶ added in v0.1.9
func (o AtLeastNOfValidator) Validate(ctx context.Context, req AtLeastNOfValidatorRequest, resp *AtLeastNOfValidatorResponse)
func (AtLeastNOfValidator) ValidateBool ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AtLeastNOfValidator) ValidateFloat64 ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AtLeastNOfValidator) ValidateInt64 ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AtLeastNOfValidator) ValidateList ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AtLeastNOfValidator) ValidateMap ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AtLeastNOfValidator) ValidateNumber ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AtLeastNOfValidator) ValidateObject ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AtLeastNOfValidator) ValidateSet ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AtLeastNOfValidator) ValidateString ¶ added in v0.1.9
func (o AtLeastNOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type AtLeastNOfValidatorRequest ¶ added in v0.1.9
type AtLeastNOfValidatorResponse ¶ added in v0.1.9
type AtLeastNOfValidatorResponse struct {
Diagnostics diag.Diagnostics
}
type AtMostNOfValidator ¶ added in v0.1.9
type AtMostNOfValidator struct { N int PathExpressions path.Expressions }
AtMostNOfValidator is the underlying struct implementing AtMostNOf.
func (AtMostNOfValidator) Description ¶ added in v0.1.9
func (o AtMostNOfValidator) Description(ctx context.Context) string
func (AtMostNOfValidator) MarkdownDescription ¶ added in v0.1.9
func (o AtMostNOfValidator) MarkdownDescription(_ context.Context) string
func (AtMostNOfValidator) Validate ¶ added in v0.1.9
func (o AtMostNOfValidator) Validate(ctx context.Context, req AtMostNOfValidatorRequest, resp *AtMostNOfValidatorResponse)
func (AtMostNOfValidator) ValidateBool ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AtMostNOfValidator) ValidateFloat64 ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AtMostNOfValidator) ValidateInt64 ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AtMostNOfValidator) ValidateList ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AtMostNOfValidator) ValidateMap ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AtMostNOfValidator) ValidateNumber ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AtMostNOfValidator) ValidateObject ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AtMostNOfValidator) ValidateSet ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AtMostNOfValidator) ValidateString ¶ added in v0.1.9
func (o AtMostNOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type AtMostNOfValidatorRequest ¶ added in v0.1.9
type AtMostNOfValidatorResponse ¶ added in v0.1.9
type AtMostNOfValidatorResponse struct {
Diagnostics diag.Diagnostics
}
type ForbiddenWhenValueIsRequest ¶ added in v0.1.8
type ForbiddenWhenValueIsResponse ¶ added in v0.1.8
type ForbiddenWhenValueIsResponse struct {
Diagnostics diag.Diagnostics
}
type ForbiddenWhenValueIsValidator ¶ added in v0.1.8
type ForbiddenWhenValueIsValidator struct { Expression path.Expression Value attr.Value }
func ForbiddenWhenValueIs ¶ added in v0.1.8
func ForbiddenWhenValueIs(expression path.Expression, value attr.Value) ForbiddenWhenValueIsValidator
func (ForbiddenWhenValueIsValidator) Description ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) Description(_ context.Context) string
func (ForbiddenWhenValueIsValidator) MarkdownDescription ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
func (ForbiddenWhenValueIsValidator) Validate ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) Validate(ctx context.Context, req ForbiddenWhenValueIsRequest, resp *ForbiddenWhenValueIsResponse)
func (ForbiddenWhenValueIsValidator) ValidateBool ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (ForbiddenWhenValueIsValidator) ValidateFloat64 ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (ForbiddenWhenValueIsValidator) ValidateInt64 ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (ForbiddenWhenValueIsValidator) ValidateList ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (ForbiddenWhenValueIsValidator) ValidateMap ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (ForbiddenWhenValueIsValidator) ValidateNumber ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (ForbiddenWhenValueIsValidator) ValidateObject ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (ForbiddenWhenValueIsValidator) ValidateSet ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (ForbiddenWhenValueIsValidator) ValidateString ¶ added in v0.1.8
func (o ForbiddenWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type NineTypesValidator ¶ added in v0.1.8
type NineTypesValidator interface { validator.Bool validator.Float64 validator.Int64 validator.List validator.Map validator.Number validator.Object validator.Set validator.String }
func AtLeastNOf ¶ added in v0.1.9
func AtLeastNOf(n int, expressions ...path.Expression) NineTypesValidator
AtLeastNOf checks that of a set of path.Expression, including the attribute this validator is applied to, at least 'n' have a non-null value.
Any relative path.Expression will be resolved using the attribute being validated.
func AtMostNOf ¶ added in v0.1.9
func AtMostNOf(n int, expressions ...path.Expression) NineTypesValidator
AtMostNOf checks that of a set of path.Expression, including the attribute this validator is applied to, at most 'n' have a non-null value.
Any relative path.Expression will be resolved using the attribute being validated.
type ParseCidrValidator ¶
type ParseCidrValidator struct {
// contains filtered or unexported fields
}
func (ParseCidrValidator) Description ¶
func (o ParseCidrValidator) Description(_ context.Context) string
func (ParseCidrValidator) MarkdownDescription ¶
func (o ParseCidrValidator) MarkdownDescription(ctx context.Context) string
func (ParseCidrValidator) ValidateString ¶
func (o ParseCidrValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseIntValidator ¶
type ParseIntValidator struct {
// contains filtered or unexported fields
}
func (ParseIntValidator) Description ¶
func (o ParseIntValidator) Description(_ context.Context) string
func (ParseIntValidator) MarkdownDescription ¶
func (o ParseIntValidator) MarkdownDescription(ctx context.Context) string
func (ParseIntValidator) ValidateString ¶
func (o ParseIntValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseIpValidator ¶
type ParseIpValidator struct {
// contains filtered or unexported fields
}
func (ParseIpValidator) Description ¶
func (o ParseIpValidator) Description(_ context.Context) string
func (ParseIpValidator) MarkdownDescription ¶
func (o ParseIpValidator) MarkdownDescription(ctx context.Context) string
func (ParseIpValidator) ValidateString ¶
func (o ParseIpValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseMacValidator ¶
type ParseMacValidator struct{}
func (ParseMacValidator) Description ¶
func (o ParseMacValidator) Description(_ context.Context) string
func (ParseMacValidator) MarkdownDescription ¶
func (o ParseMacValidator) MarkdownDescription(ctx context.Context) string
func (ParseMacValidator) ValidateString ¶
func (o ParseMacValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseMagicValidator ¶ added in v0.1.32
type ParseMagicValidator struct{}
func (ParseMagicValidator) Description ¶ added in v0.1.32
func (o ParseMagicValidator) Description(_ context.Context) string
func (ParseMagicValidator) MarkdownDescription ¶ added in v0.1.32
func (o ParseMagicValidator) MarkdownDescription(ctx context.Context) string
func (ParseMagicValidator) ValidateString ¶ added in v0.1.32
func (o ParseMagicValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseNameValidator ¶
type ParseNameValidator struct{}
func (ParseNameValidator) Description ¶
func (o ParseNameValidator) Description(_ context.Context) string
func (ParseNameValidator) MarkdownDescription ¶
func (o ParseNameValidator) MarkdownDescription(ctx context.Context) string
func (ParseNameValidator) ValidateString ¶
func (o ParseNameValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseNetmaskValidator ¶
type ParseNetmaskValidator struct {
// contains filtered or unexported fields
}
func (ParseNetmaskValidator) Description ¶
func (o ParseNetmaskValidator) Description(_ context.Context) string
func (ParseNetmaskValidator) MarkdownDescription ¶
func (o ParseNetmaskValidator) MarkdownDescription(ctx context.Context) string
func (ParseNetmaskValidator) ValidateString ¶
func (o ParseNetmaskValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseRangeOfIntValidator ¶ added in v0.1.13
type ParseRangeOfIntValidator struct {
// contains filtered or unexported fields
}
func (ParseRangeOfIntValidator) Description ¶ added in v0.1.13
func (o ParseRangeOfIntValidator) Description(_ context.Context) string
func (ParseRangeOfIntValidator) MarkdownDescription ¶ added in v0.1.13
func (o ParseRangeOfIntValidator) MarkdownDescription(ctx context.Context) string
func (ParseRangeOfIntValidator) ValidateString ¶ added in v0.1.13
func (o ParseRangeOfIntValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ParseVarValidator ¶
type ParseVarValidator struct{}
func (ParseVarValidator) Description ¶
func (o ParseVarValidator) Description(_ context.Context) string
func (ParseVarValidator) MarkdownDescription ¶
func (o ParseVarValidator) MarkdownDescription(ctx context.Context) string
func (ParseVarValidator) ValidateString ¶
func (o ParseVarValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
type RequiredWhenValueIsRequest ¶ added in v0.1.8
type RequiredWhenValueIsResponse ¶ added in v0.1.8
type RequiredWhenValueIsResponse struct {
Diagnostics diag.Diagnostics
}
type RequiredWhenValueIsValidator ¶ added in v0.1.8
type RequiredWhenValueIsValidator struct {
// contains filtered or unexported fields
}
func RequiredWhenValueIs ¶ added in v0.1.8
func RequiredWhenValueIs(expression path.Expression, value attr.Value) RequiredWhenValueIsValidator
func (RequiredWhenValueIsValidator) Description ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) Description(_ context.Context) string
func (RequiredWhenValueIsValidator) MarkdownDescription ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) MarkdownDescription(ctx context.Context) string
func (RequiredWhenValueIsValidator) Validate ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) Validate(ctx context.Context, req RequiredWhenValueIsRequest, resp *RequiredWhenValueIsResponse)
func (RequiredWhenValueIsValidator) ValidateBool ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (RequiredWhenValueIsValidator) ValidateFloat64 ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (RequiredWhenValueIsValidator) ValidateInt64 ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (RequiredWhenValueIsValidator) ValidateList ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (RequiredWhenValueIsValidator) ValidateMap ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (RequiredWhenValueIsValidator) ValidateNumber ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (RequiredWhenValueIsValidator) ValidateObject ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (RequiredWhenValueIsValidator) ValidateSet ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (RequiredWhenValueIsValidator) ValidateString ¶ added in v0.1.8
func (o RequiredWhenValueIsValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
Source Files ¶
- allowed_when_value_is.go
- allowed_when_value_is_in.go
- at_least_n_of.go
- at_most_n_of.go
- constants.go
- forbidden_when_value_is.go
- object_must_have_n_og.go
- parse_cidr.go
- parse_int.go
- parse_ip.go
- parse_mac.go
- parse_magic.go
- parse_name.go
- parse_netmask.go
- parse_range_int.go
- parse_var.go
- required_when_value_is.go
Click to show internal directories.
Click to hide internal directories.