Documentation ¶
Index ¶
- Constants
- Variables
- func ComposeOrValidations(fs ...func(interface{}, cty.Path) diag.Diagnostics) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateCIDR4() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateCustomUrlOrIPV4() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateDNS() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateDomainName() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateEmail() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateHTTPNetLocation() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateHostName() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateHostnameOrIPV4() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateID(numeric bool, prefixes ...string) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateIntENUM(enum ...int) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateIntRange(min, max int) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateIsoTimeFormat() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateJson() func(interface{}, cty.Path) diag.Diagnostics
- func ValidatePEMCert() func(interface{}, cty.Path) diag.Diagnostics
- func ValidatePattern(pattern *regexp.Regexp) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateStringENUM(enum ...string) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateStringToIntRange(min, max int) func(interface{}, cty.Path) diag.Diagnostics
- func ValidateURL() func(interface{}, cty.Path) diag.Diagnostics
- func ValidateWildcardHostName() func(interface{}, cty.Path) diag.Diagnostics
Constants ¶
View Source
const ( CountriesDoc = "`AD`,`AE`,`AF`,`AG`,`AI`,`AL`,`AM`,`AO`,`AQ`,`AR`,`AS`,`AT`,`AU`,`AW`,`AX`,`AZ`,`BA`,`BB`,`BD`,`BE`,`BF`," + "`BG`,`BH`,`BI`,`BJ`,`BL`,`BM`,`BN`,`BO`,`BQ`,`BR`,`BS`,`BT`,`BV`,`BW`,`BY`,`BZ`,`CA`,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C`,`VE`,`VG`,`VI`,`VN`," + "`VU`,`WF`,`WS`,`YE`,`YT`,`ZA`,`ZM`,`ZW`" ContentTypesDoc = "`Abortion`, `Abused Drugs`, " + "`Adult and Pornography`, `Alcohol and Tobacco`, `Auctions`, `Business and Economy`, " + "`Cheating`, `Computer and Internet Info`, `Computer and Internet Security`, " + "`Content Delivery Networks`, `Cult and Occult`, `Dating`, `Dead Sites`, " + "`Dynamically Generated Content`, `Educational Institutions`, `Entertainment and Arts`, " + "`Fashion and Beauty`, `Financial Services`, `Gambling`, `Games`, `Government`, `Gross`, " + "`Hacking`, `Hate and Racism`, `Health and Medicine`, `Home and Garden`, `Hunting and Fishing`, " + "`Illegal`, `Image and Video Search`, `Individual Stock Advice and Tools`, `Internet Portals`, " + "`Internet Communications`, `Job Search`, `Kids`, `Legal`, `Local Information`, `Marijuana`, " + "`Military`, `Motor Vehicles`, `Music`, `News and Media`, `Nudity`, `Online Greeting Cards`, " + "`Parked Domains`, `Pay to Surf`, `Personal sites and Blogs`, `Personal Storage`, " + "`Philosophy and Political Advocacy`, `Questionable`, `Real Estate`, `Recreation and Hobbies`, " + "`Reference and Research`, `Religion`, `Search Engines`, `Sex Education`, " + "`Shareware and Freeware`, `Shopping`, `Social Networking`, `Society`, `Sports`, " + "`Streaming Media`, `Swimsuits and Intimate Apparel`, `Training and Tools`, `Translation`, " + "`Travel`, `Violence`, `Weapons`, `Web Advertisements`, `Web-based Email`, `Web Hosting`" )
Variables ¶
View Source
var ContentTypes = []string{"Abortion", "Abused Drugs",
"Adult and Pornography", "Alcohol and Tobacco", "Auctions", "Business and Economy",
"Cheating", "Computer and Internet Info", "Computer and Internet Security",
"Content Delivery Networks", "Cult and Occult", "Dating", "Dead Sites",
"Dynamically Generated Content", "Educational Institutions", "Entertainment and Arts",
"Fashion and Beauty", "Financial Services", "Gambling", "Games", "Government", "Gross",
"Hacking", "Hate and Racism", "Health and Medicine", "Home and Garden", "Hunting and Fishing",
"Illegal", "Image and Video Search", "Individual Stock Advice and Tools", "Internet Portals",
"Internet Communications", "Job Search", "Kids", "Legal", "Local Information", "Marijuana",
"Military", "Motor Vehicles", "Music", "News and Media", "Nudity", "Online Greeting Cards",
"Parked Domains", "Pay to Surf", "Personal sites and Blogs", "Personal Storage",
"Philosophy and Political Advocacy", "Questionable", "Real Estate", "Recreation and Hobbies",
"Reference and Research", "Religion", "Search Engines", "Sex Education",
"Shareware and Freeware", "Shopping", "Social Networking", "Society", "Sports",
"Streaming Media", "Swimsuits and Intimate Apparel", "Training and Tools", "Translation",
"Travel", "Violence", "Weapons", "Web Advertisements", "Web-based Email", "Web Hosting"}
View Source
var Countries = []string{}/* 249 elements not displayed */
View Source
var DomainPattern = regexp.MustCompile("^(?:[a-z0-9](?:[a-z0-9-_]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-_]{0,61}[a-z]$")
View Source
var HttpHeaderPattern = regexp.MustCompile("^([\\w\\-]+):(.*)$")
View Source
var PrivilegesPattern = regexp.MustCompile("^[a-z_]+:(read|write)$")
View Source
var TagPattern = regexp.MustCompile("^[a-zA-Z0-9-_]+$")
Functions ¶
func ComposeOrValidations ¶
func ComposeOrValidations(fs ...func(interface{}, cty.Path) diag.Diagnostics) func(interface{}, cty.Path) diag.Diagnostics
ComposeOrValidations will take a list of validation functions and will allow the validated attribute if at least one function has approved the attribute
func ValidateCIDR4 ¶
func ValidateCIDR4() func(interface{}, cty.Path) diag.Diagnostics
func ValidateCustomUrlOrIPV4 ¶
func ValidateCustomUrlOrIPV4() func(interface{}, cty.Path) diag.Diagnostics
func ValidateDNS ¶
func ValidateDNS() func(interface{}, cty.Path) diag.Diagnostics
func ValidateDomainName ¶
func ValidateDomainName() func(interface{}, cty.Path) diag.Diagnostics
func ValidateEmail ¶
func ValidateEmail() func(interface{}, cty.Path) diag.Diagnostics
func ValidateHTTPNetLocation ¶
func ValidateHTTPNetLocation() func(interface{}, cty.Path) diag.Diagnostics
func ValidateHostName ¶
func ValidateHostName() func(interface{}, cty.Path) diag.Diagnostics
func ValidateHostnameOrIPV4 ¶
func ValidateHostnameOrIPV4() func(interface{}, cty.Path) diag.Diagnostics
func ValidateID ¶
func ValidateIntENUM ¶
func ValidateIntENUM(enum ...int) func(interface{}, cty.Path) diag.Diagnostics
ValidateIntENUM validates ENUM values
func ValidateIntRange ¶
func ValidateIntRange(min, max int) func(interface{}, cty.Path) diag.Diagnostics
ValidateIntRange that integer value is between specified range
func ValidateIsoTimeFormat ¶
func ValidateIsoTimeFormat() func(interface{}, cty.Path) diag.Diagnostics
func ValidateJson ¶
func ValidateJson() func(interface{}, cty.Path) diag.Diagnostics
func ValidatePEMCert ¶
func ValidatePEMCert() func(interface{}, cty.Path) diag.Diagnostics
func ValidatePattern ¶
func ValidateStringENUM ¶
func ValidateStringENUM(enum ...string) func(interface{}, cty.Path) diag.Diagnostics
ValidateStringENUM validates ENUM values
func ValidateStringToIntRange ¶
func ValidateStringToIntRange(min, max int) func(interface{}, cty.Path) diag.Diagnostics
ValidateStringToIntRange that integer value given as string is between specified range
func ValidateURL ¶
func ValidateURL() func(interface{}, cty.Path) diag.Diagnostics
func ValidateWildcardHostName ¶
func ValidateWildcardHostName() func(interface{}, cty.Path) diag.Diagnostics
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.