Documentation
¶
Index ¶
- func EnvoyHeaderValueRule() *validate.Rule
- func ParseHost(name string) (apex, sub string, err error)
- func RouteCanaryRule() *validate.Rule
- func RouteMirrorRule() *validate.Rule
- func RouteRule() *validate.Rule
- type CertChallengeType
- type CertificateGeneratorLink
- type CorsMaxAge
- type DnsConfigRecord
- type Domain
- type DomainSpec
- type DomainSpecCertChallengeType
- type DomainSpecDnsMode
- type DomainStatus
- type DomainStatusEndpoints
- type DomainStatusLocations
- type DomainStatusLocationsCertificateStatus
- type DomainStatusStatus
- type DomainTags
- type EnvoyHeaderValue
- type ExternalPort
- type ExternalPortCors
- type ExternalPortCorsAllowOrigins
- type ExternalPortProtocol
- type ExternalPortTLS
- type ExternalPortTls
- type ExternalPortTlsCipherSuites
- type ExternalPortTlsClientCertificate
- type ExternalPortTlsMinProtocolVersion
- type ExternalPortTlsServerCertificate
- type GvcLink
- type HeaderOperation
- type HeaderOperationSet
- type LowerHeader
- type Route
- type RouteCanary
- type RouteHeaders
- type RouteMirror
- type Routes
- type SecretLink
- type WorkloadLink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvoyHeaderValueRule ¶
EnvoyHeaderValueRule ports domain.ts:13: only the three allowed %WILDCARD%s.
func ParseHost ¶
ParseHost splits a hostname into its registrable apex (eTLD+1) and the subdomain labels below it, mirroring tld-extract's {domain, sub}.
tld-extract THROWS rather than falling back when the name's suffix is not in the ICANN list (`EXAMPLE.COM` — the lookup is case-sensitive and `COM` is not a key) or when the name IS exactly a public suffix (`co.uk`). Every TS call site lets that throw out, so it is a 400; the port swallowed it and created the domain. The error is the JS message verbatim, because it reaches the client.
Types ¶
type CertChallengeType ¶
type CertChallengeType string
const ( CertChallengeTypeHttp01 CertChallengeType = "http01" CertChallengeTypeDns01 CertChallengeType = "dns01" )
type CertificateGeneratorLink ¶
type CertificateGeneratorLink string
CertificateGeneratorLink is an org-local link to a certificategenerator — DomainSpec.certificateGeneratorLink (domain.ts:304, master 0c0ece779).
func (CertificateGeneratorLink) ValidationRule ¶
func (CertificateGeneratorLink) ValidationRule() *validate.Rule
type CorsMaxAge ¶
type CorsMaxAge string
CorsMaxAge is ExternalPortCors.maxAge restricted to the corsMaxAge pattern (was pattern=corsMaxAge). Replaces the string field type.
func (CorsMaxAge) ValidationRule ¶
func (CorsMaxAge) ValidationRule() *validate.Rule
type DnsConfigRecord ¶
type Domain ¶
type Domain struct {
Id string `json:"id,omitzero" validate:"uuid,readOnly"`
Kind base.Kind `json:"kind,omitzero"`
Version *float64 `json:"version,omitzero" validate:"positive,integer,readOnly"`
Description string `json:"description,omitzero" validate:"trim,max=250,allow="`
Tags DomainTags `json:"tags,omitzero" validate:"default={}"`
Created string `json:"created,omitzero" validate:"date,readOnly"`
LastModified string `json:"lastModified,omitzero" validate:"date,readOnly"`
Links base.Links `json:"links,omitzero" validate:"readOnly"`
Name string `json:"name,omitzero" validate:"max=253"`
Spec *DomainSpec `json:"spec,omitzero"`
Status *DomainStatus `json:"status,omitzero"`
}
func (Domain) ValidationRule ¶
ValidationRule reflects Domain and layers the two Domain-level .custom()s (maxRoutes then domainName) — the schema the "domain" kind validates against.
type DomainSpec ¶
type DomainSpec struct {
DnsMode DomainSpecDnsMode `json:"dnsMode,omitzero"`
GvcLink GvcLink `json:"gvcLink,omitzero"`
CertChallengeType DomainSpecCertChallengeType `json:"certChallengeType,omitzero"`
CertificateGeneratorLink CertificateGeneratorLink `json:"certificateGeneratorLink,omitzero" validate:"optional"`
WorkloadLink WorkloadLink `json:"workloadLink,omitzero"`
AcceptAllHosts *bool `json:"acceptAllHosts,omitzero" validate:"default=false"`
AcceptAllSubdomains *bool `json:"acceptAllSubdomains,omitzero" validate:"default=false"`
Ports []ExternalPort `json:"ports,omitzero" validate:"min=0,max=10"`
}
DomainSpec ports `DomainSpec` (domain.ts:297). nand(gvcLink, workloadLink) is a RegisterObjectRules; the big cross-field .custom() is the domainSpecCustom Refine; ports' content-ful default ([getDefaultExternalPort()]) is applied by that Refine.
func (DomainSpec) ValidationRule ¶
func (DomainSpec) ValidationRule() *validate.Rule
ValidationRule reflects DomainSpec, layers nand(gvcLink, workloadLink) and the domainSpecCustom cross-field refine (which also applies the ports default).
type DomainSpecCertChallengeType ¶
type DomainSpecCertChallengeType string
const ( DomainSpecCertChallengeTypeHttp01 DomainSpecCertChallengeType = "http01" DomainSpecCertChallengeTypeDns01 DomainSpecCertChallengeType = "dns01" )
func (DomainSpecCertChallengeType) EnumValues ¶
func (DomainSpecCertChallengeType) EnumValues() []string
type DomainSpecDnsMode ¶
type DomainSpecDnsMode string
const ( DomainSpecDnsModeCname DomainSpecDnsMode = "cname" DomainSpecDnsModeNs DomainSpecDnsMode = "ns" )
func (DomainSpecDnsMode) EnumValues ¶
func (DomainSpecDnsMode) EnumValues() []string
type DomainStatus ¶
type DomainStatus struct {
Endpoints []DomainStatusEndpoints `json:"endpoints,omitzero"`
Status DomainStatusStatus `json:"status,omitzero"`
Warning string `json:"warning,omitzero" validate:"allow="`
StatusUpdated string `json:"statusUpdated,omitzero" validate:"date"`
Locations []DomainStatusLocations `json:"locations,omitzero"`
Fingerprint string `json:"fingerprint,omitzero"`
DnsConfig []DnsConfigRecord `json:"dnsConfig,omitzero"`
}
type DomainStatusEndpoints ¶
type DomainStatusLocations ¶
type DomainStatusLocations struct {
Name string `json:"name" validate:"required"`
CertificateStatus DomainStatusLocationsCertificateStatus `json:"certificateStatus,omitzero"`
}
type DomainStatusLocationsCertificateStatus ¶
type DomainStatusLocationsCertificateStatus string
const ( DomainStatusLocationsCertificateStatusInitializing DomainStatusLocationsCertificateStatus = "initializing" DomainStatusLocationsCertificateStatusReady DomainStatusLocationsCertificateStatus = "ready" DomainStatusLocationsCertificateStatusPendingDnsConfig DomainStatusLocationsCertificateStatus = "pendingDnsConfig" DomainStatusLocationsCertificateStatusPendingCertificate DomainStatusLocationsCertificateStatus = "pendingCertificate" DomainStatusLocationsCertificateStatusIgnored DomainStatusLocationsCertificateStatus = "ignored" DomainStatusLocationsCertificateStatusErrored DomainStatusLocationsCertificateStatus = "errored" )
func (DomainStatusLocationsCertificateStatus) EnumValues ¶
func (DomainStatusLocationsCertificateStatus) EnumValues() []string
type DomainStatusStatus ¶
type DomainStatusStatus string
const ( DomainStatusStatusInitializing DomainStatusStatus = "initializing" DomainStatusStatusReady DomainStatusStatus = "ready" DomainStatusStatusPendingDnsConfig DomainStatusStatus = "pendingDnsConfig" DomainStatusStatusPendingCertificate DomainStatusStatus = "pendingCertificate" DomainStatusStatusUsedByGvc DomainStatusStatus = "usedByGvc" DomainStatusStatusWarning DomainStatusStatus = "warning" DomainStatusStatusCreated DomainStatusStatus = "created" DomainStatusStatusUpdated DomainStatusStatus = "updated" DomainStatusStatusDeleted DomainStatusStatus = "deleted" DomainStatusStatusErrored DomainStatusStatus = "errored" DomainStatusStatusIgnored DomainStatusStatus = "ignored" )
func (DomainStatusStatus) EnumValues ¶
func (DomainStatusStatus) EnumValues() []string
type DomainTags ¶
DomainTags aliases base.Tags for the reflection base-type registry.
type EnvoyHeaderValue ¶
type EnvoyHeaderValue string //ts:export
func (EnvoyHeaderValue) ValidationRule ¶
func (EnvoyHeaderValue) ValidationRule() *validate.Rule
ValidationRule makes the canonical EnvoyHeaderValue type self-validating.
type ExternalPort ¶
type ExternalPort struct {
Number *float64 `json:"number,omitzero" validate:"default=443"`
Protocol ExternalPortProtocol `json:"protocol,omitzero" validate:"default=http2"`
Routes Routes `json:"routes,omitzero" validate:"min=0"`
Cors *ExternalPortCors `json:"cors,omitzero"`
Tls *ExternalPortTls `json:"tls,omitzero"`
}
ExternalPort ports `ExternalPort` (domain.ts:208). routes uses the prebuilt Route rule (RegisterType) + the uniqueRoute array custom; the port-443 TLS-default / route-sort / tcp-canary .custom() is the externalPortCustom Refine.
func (ExternalPort) ValidationRule ¶
func (ExternalPort) ValidationRule() *validate.Rule
ValidationRule reflects ExternalPort and layers the externalPortCustom refine (443 TLS default, tcp-canary rejection, route sort).
type ExternalPortCors ¶
type ExternalPortCors struct {
AllowOrigins []ExternalPortCorsAllowOrigins `json:"allowOrigins,omitzero"`
AllowMethods []string `json:"allowMethods,omitzero"`
AllowHeaders []LowerHeader `json:"allowHeaders,omitzero"`
ExposeHeaders []LowerHeader `json:"exposeHeaders,omitzero"`
MaxAge CorsMaxAge `json:"maxAge,omitzero"`
AllowCredentials *bool `json:"allowCredentials,omitzero"`
}
type ExternalPortCorsAllowOrigins ¶
type ExternalPortCorsAllowOrigins struct {
Exact string `json:"exact,omitzero"`
Regex base.Regex `json:"regex,omitzero"`
}
func (ExternalPortCorsAllowOrigins) ValidationRule ¶
func (ExternalPortCorsAllowOrigins) ValidationRule() *validate.Rule
ValidationRule reflects the cors allowOrigins entry and layers xor(exact, regex).
type ExternalPortProtocol ¶
type ExternalPortProtocol string
const ( ExternalPortProtocolHttp ExternalPortProtocol = "http" ExternalPortProtocolHttp2 ExternalPortProtocol = "http2" ExternalPortProtocolTcp ExternalPortProtocol = "tcp" )
func (ExternalPortProtocol) EnumValues ¶
func (ExternalPortProtocol) EnumValues() []string
type ExternalPortTLS ¶
type ExternalPortTLS struct {
MinProtocolVersion ExternalPortTlsMinProtocolVersion `json:"minProtocolVersion,omitzero"`
CipherSuites []ExternalPortTlsCipherSuites `json:"cipherSuites,omitzero"`
ClientCertificate *ExternalPortTlsClientCertificate `json:"clientCertificate,omitzero"`
ServerCertificate *ExternalPortTlsServerCertificate `json:"serverCertificate,omitzero"`
}
type ExternalPortTls ¶
type ExternalPortTls struct {
MinProtocolVersion ExternalPortTlsMinProtocolVersion `json:"minProtocolVersion,omitzero" validate:"default=TLSV1_2"`
CipherSuites []ExternalPortTlsCipherSuites `json:"cipherSuites,omitzero"`
ClientCertificate *ExternalPortTlsClientCertificate `json:"clientCertificate,omitzero"`
ServerCertificate *ExternalPortTlsServerCertificate `json:"serverCertificate,omitzero"`
}
type ExternalPortTlsCipherSuites ¶
type ExternalPortTlsCipherSuites string
const ( ExternalPortTlsCipherSuitesEcdheEcdsaAes256GcmSha384 ExternalPortTlsCipherSuites = "ECDHE-ECDSA-AES256-GCM-SHA384" ExternalPortTlsCipherSuitesEcdheEcdsaChacha20Poly1305 ExternalPortTlsCipherSuites = "ECDHE-ECDSA-CHACHA20-POLY1305" ExternalPortTlsCipherSuitesEcdheEcdsaAes128GcmSha256 ExternalPortTlsCipherSuites = "ECDHE-ECDSA-AES128-GCM-SHA256" ExternalPortTlsCipherSuitesEcdheRsaAes256GcmSha384 ExternalPortTlsCipherSuites = "ECDHE-RSA-AES256-GCM-SHA384" ExternalPortTlsCipherSuitesEcdheRsaChacha20Poly1305 ExternalPortTlsCipherSuites = "ECDHE-RSA-CHACHA20-POLY1305" ExternalPortTlsCipherSuitesEcdheRsaAes128GcmSha256 ExternalPortTlsCipherSuites = "ECDHE-RSA-AES128-GCM-SHA256" ExternalPortTlsCipherSuitesAes256GcmSha384 ExternalPortTlsCipherSuites = "AES256-GCM-SHA384" ExternalPortTlsCipherSuitesAes128GcmSha256 ExternalPortTlsCipherSuites = "AES128-GCM-SHA256" ExternalPortTlsCipherSuitesTlsRsaWithAes256GcmSha384 ExternalPortTlsCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" ExternalPortTlsCipherSuitesTlsRsaWithAes128GcmSha256 ExternalPortTlsCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" ExternalPortTlsCipherSuitesTlsEcdheRsaWithChacha20Poly1305Sha256 ExternalPortTlsCipherSuites = "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" ExternalPortTlsCipherSuitesTlsEcdheRsaWithAes256GcmSha384 ExternalPortTlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" ExternalPortTlsCipherSuitesTlsEcdheRsaWithAes128GcmSha256 ExternalPortTlsCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" ExternalPortTlsCipherSuitesTlsChacha20Poly1305Sha256 ExternalPortTlsCipherSuites = "TLS_CHACHA20_POLY1305_SHA256" ExternalPortTlsCipherSuitesTlsAes256GcmSha384 ExternalPortTlsCipherSuites = "TLS_AES_256_GCM_SHA384" ExternalPortTlsCipherSuitesTlsAes128GcmSha256 ExternalPortTlsCipherSuites = "TLS_AES_128_GCM_SHA256" ExternalPortTlsCipherSuitesDesCbc3Sha ExternalPortTlsCipherSuites = "DES-CBC3-SHA" ExternalPortTlsCipherSuitesEcdheRsaAes128Sha ExternalPortTlsCipherSuites = "ECDHE-RSA-AES128-SHA" ExternalPortTlsCipherSuitesEcdheRsaAes256Sha ExternalPortTlsCipherSuites = "ECDHE-RSA-AES256-SHA" ExternalPortTlsCipherSuitesAes128Sha ExternalPortTlsCipherSuites = "AES128-SHA" ExternalPortTlsCipherSuitesAes256Sha ExternalPortTlsCipherSuites = "AES256-SHA" )
func (ExternalPortTlsCipherSuites) EnumValues ¶
func (ExternalPortTlsCipherSuites) EnumValues() []string
EnumValues = allowedCiphers (domain.ts:135): the defaultCiphers plus the legacy names the cipher-migration custom rewrites.
type ExternalPortTlsClientCertificate ¶
type ExternalPortTlsClientCertificate struct {
SecretLink SecretLink `json:"secretLink,omitzero"`
}
type ExternalPortTlsMinProtocolVersion ¶
type ExternalPortTlsMinProtocolVersion string
const ( ExternalPortTlsMinProtocolVersionTlsv13 ExternalPortTlsMinProtocolVersion = "TLSV1_3" ExternalPortTlsMinProtocolVersionTlsv12 ExternalPortTlsMinProtocolVersion = "TLSV1_2" ExternalPortTlsMinProtocolVersionTlsv11 ExternalPortTlsMinProtocolVersion = "TLSV1_1" ExternalPortTlsMinProtocolVersionTlsv10 ExternalPortTlsMinProtocolVersion = "TLSV1_0" )
func (ExternalPortTlsMinProtocolVersion) EnumValues ¶
func (ExternalPortTlsMinProtocolVersion) EnumValues() []string
type ExternalPortTlsServerCertificate ¶
type ExternalPortTlsServerCertificate struct {
SecretLink SecretLink `json:"secretLink,omitzero"`
}
type GvcLink ¶
type GvcLink string
GvcLink is an org-local link constrained to a "gvc" — DomainSpec.gvcLink (domain.ts). Replaces the `localLink=gvc` tag.
func (GvcLink) ValidationRule ¶
type HeaderOperation ¶
type HeaderOperation struct {
Set HeaderOperationSet `json:"set,omitzero"`
}
type HeaderOperationSet ¶
type HeaderOperationSet map[string]EnvoyHeaderValue
type LowerHeader ¶
type LowerHeader string
LowerHeader is the constrained element type for cors allow/expose headers (String().lowercase()); registered in schema_reflect_datanet.go.
func (LowerHeader) ValidationRule ¶
func (LowerHeader) ValidationRule() *validate.Rule
ValidationRule ports the lowercase cors allow/expose header element type.
type Route ¶
type Route struct {
ReplacePrefix string `json:"replacePrefix,omitzero"`
Regex string `json:"regex,omitzero"`
Prefix string `json:"prefix,omitzero"`
CaseInsensitive *bool `json:"caseInsensitive,omitzero"`
WorkloadLink string `json:"workloadLink"`
Port *float64 `json:"port,omitzero"`
HostPrefix string `json:"hostPrefix,omitzero"`
HostRegex string `json:"hostRegex,omitzero"`
Headers *RouteHeaders `json:"headers,omitzero"`
Replica *float64 `json:"replica,omitzero"`
Mirror []RouteMirror `json:"mirror,omitzero"`
Canaries []RouteCanary `json:"canaries,omitzero"`
}
func (Route) ValidationRule ¶
ValidationRule makes the canonical Route type self-validating (prebuilt rule).
type RouteCanary ¶ added in v1.1.17
type RouteHeaders ¶
type RouteHeaders struct {
Request *HeaderOperation `json:"request,omitzero"`
}
type RouteMirror ¶ added in v1.1.2
type Routes ¶
type Routes []Route
Routes is ExternalPort.routes: an array of the prebuilt Route rule plus the uniqueRoute array custom (was custom=uniqueRoute on the field). Replaces the []Route field type.
func (Routes) ValidationRule ¶
type SecretLink ¶
type SecretLink string
SecretLink is an org-local link constrained to a "secret" — the TLS client/server certificate secretLink (domain.ts). Replaces the `localLink=secret` tag.
func (SecretLink) ValidationRule ¶
func (SecretLink) ValidationRule() *validate.Rule
type WorkloadLink ¶
type WorkloadLink string
WorkloadLink is an org-local link constrained to a workload via the `!workload` expansion — DomainSpec.workloadLink (domain.ts). Replaces the `localLink=!workload` tag.
func (WorkloadLink) ValidationRule ¶
func (WorkloadLink) ValidationRule() *validate.Rule