Documentation
¶
Index ¶
- Variables
- func CheckClientAuthMethod(typeExpr path.Expression, authMethods []string) validator.String
- func DefaultValuesChecker(defaultParamValues []attr.Value) validator.Set
- func PrintDefaultSchemas(schemas []attr.Value) string
- func ValidAttributeName() validator.String
- func ValidCertificate() validator.String
- func ValidDateTime() validator.String
- func ValidEmailDomain() validator.String
- func ValidIPAddress() validator.String
- func ValidJSON() validator.String
- func ValidType(typeExpr path.Expression, validValues []string) validator.Object
- func ValidUUID() validator.String
- func ValidUrl() validator.String
- func ValidValuesString(values []string) string
- type DefaultValuesValidator
- func (s DefaultValuesValidator) CheckDefaultValues(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse) ([]string, bool)
- func (s DefaultValuesValidator) Description(_ context.Context) string
- func (s DefaultValuesValidator) MarkdownDescription(_ context.Context) string
- func (s DefaultValuesValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
Constants ¶
This section is empty.
Variables ¶
View Source
var AttributeNameRegexp = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_]*$`)
View Source
var EmailDomainRegexp = regexp.MustCompile(`^$|^(((\*|([a-zA-Z0-9_\-]{1,63}))\.)(?:[a-zA-Z0-9_\-]{1,63}\.)*(?:[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(localhost))$`)
View Source
var IPRegexp = regexp.MustCompile(`^$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$`)
View Source
var UrlRegexp = regexp.MustCompile(`^(((http|https):\/\/(\*\.)?localhost)|(https:\/\/(([\w-])+|(((\*\.([\w-]{1,63}\.))?([\w-]{1,63}\.)*)|(([\w-]{1,63}\.)*(\*\.)?([\w-]{1,63}\.){2,}))([a-zA-Z]{2,}))))(:[\d]+)?(\/([\w-()@:%+.~?&/=])*)?$`)
View Source
var UuidRegexp = regexp.MustCompile(`^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$`)
Functions ¶
func CheckClientAuthMethod ¶
func CheckClientAuthMethod(typeExpr path.Expression, authMethods []string) validator.String
func DefaultValuesChecker ¶
func PrintDefaultSchemas ¶
string together the default schemas
func ValidAttributeName ¶
Checks that the String held in the attribute is a valid s\attribute name
func ValidCertificate ¶
func ValidDateTime ¶
func ValidEmailDomain ¶
Checks that the String held in the attribute is a valid Email Domain
func ValidIPAddress ¶
Checks that the String held in the attribute is a valid IP Address
func ValidValuesString ¶
string together the array of valid values for the attribute
Types ¶
type DefaultValuesValidator ¶
func (DefaultValuesValidator) CheckDefaultValues ¶
func (s DefaultValuesValidator) CheckDefaultValues(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse) ([]string, bool)
checks if all the default values are present in the attribute
func (DefaultValuesValidator) Description ¶
func (s DefaultValuesValidator) Description(_ context.Context) string
func (DefaultValuesValidator) MarkdownDescription ¶
func (s DefaultValuesValidator) MarkdownDescription(_ context.Context) string
func (DefaultValuesValidator) ValidateSet ¶
func (s DefaultValuesValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
Click to show internal directories.
Click to hide internal directories.