Documentation
¶
Overview ¶
Package config defines the versioned YAML and JSON configuration format.
Index ¶
- Constants
- Variables
- func DeclaredProtocol(service ServiceDeclaration) string
- func ExactWorkloadValue(s string) bool
- func MatchesDockerIdentifier(identifier, id, name string) bool
- func NonHTTPProtocol(protocol string) bool
- func NormalizeHTTPServiceTarget(service Service, value string) (string, error)
- func Protocol(service Service) string
- func RejectNullValues(value any) error
- func ResolveInspection(value *Inspection, protocol string) (inspection.Policy, error)
- func ResolveTrafficSelection(traffic *TrafficLimits) (*trafficlimits.Selection, error)
- func ResolveWorkLimits(limits *WorkLimits) (applicationlimits.Limits, error)
- func SelectedDeployment(configuration TNL) string
- func ServiceName(serviceName string, service Service) string
- func ServicePaths(service Service) map[string]PathMount
- func ServiceProtocol(publish *Publish) string
- func TargetType(service Service) string
- func ValidDockerIdentifier(value string) bool
- func ValidGitLabPipelineSource(value string) bool
- func ValidGitLabProject(value string) bool
- func ValidGitLabServer(value string) bool
- func ValidGoogleServiceAccount(value string) bool
- func ValidKubernetesName(value string) bool
- func ValidKubernetesUID(value string) bool
- func ValidProtocol(protocol string) bool
- func ValidPublisherCertificateScope(hostname, aliasParent, scope string) bool
- func ValidTLSIdentity(value string) bool
- func ValidVercelProjectName(name string) bool
- func ValidWebhookMethod(method string) bool
- func ValidWorkloadNumericID(value string) bool
- func ValidWorkloadRef(ref string) bool
- func ValidateAliases(config TNL) error
- func ValidateCloudTarget(protocol string, target ServiceTarget) error
- func ValidateDocument(document Document) error
- func ValidateInspection(value *Inspection) error
- func ValidateProject(project Project) error
- func ValidateRemoteHTTP(value *HTTPService) error
- func ValidateServiceHTTP(value *HTTPService) error
- func ValidateTNL(config TNL) error
- func ValidateTrustSource(value TrustSource) error
- func ValidateWebhooks(services Services, definitions map[string]Webhook) error
- func ValidateWorkloadTokenEnv(name string) error
- func ValidateWorkloads(services Services, workloads map[string]Workload) error
- func WorkloadHTTPS(s string) bool
- type Access
- type Alias
- type ByteSize
- type CAURLError
- type CloudTarget
- type Deployment
- type DeploymentBinding
- type DeploymentSettings
- type DeploymentWorkload
- type Document
- type Duration
- type HTTPService
- type Inspection
- type InspectionMode
- type PathMount
- type Project
- type ProtocolName
- type Publish
- type RDSEndpoint
- type Rate
- type Readiness
- type Service
- type ServiceAccess
- type ServiceDeclaration
- type ServiceTarget
- type Services
- type TNL
- type TNLDSection
- func (s TNLDSection) Apply(target *daemonconfig.Config)
- func (s TNLDSection) ApplyLowerPrecedence(target *daemonconfig.Config, commandLine map[string]bool) map[string]bool
- func (s *TNLDSection) UnmarshalJSON(data []byte) error
- func (s *TNLDSection) UnmarshalYAML(node *yaml.Node) error
- func (s TNLDSection) Value() daemonconfig.Config
- type Target
- type TargetTLS
- type TrafficLimits
- type TrustSource
- type Webhook
- type WorkLimits
- type Workload
- type WorkloadFly
- type WorkloadGitHub
- type WorkloadGitLab
- type WorkloadGoogle
- type WorkloadKubernetes
- type WorkloadOIDC
- type WorkloadToken
- type WorkloadVercel
Constants ¶
const ( RDSWriter RDSEndpoint = "writer" RDSReader RDSEndpoint = "reader" AWSRegionPattern = `^[a-z]{2}(-[a-z]+)+-[0-9]+$` EKSNamePattern = `^[A-Za-z][A-Za-z0-9_-]{0,99}$` RDSNamePattern = `^[a-z][a-z0-9-]{0,62}$` )
const DocumentVersion = 1
const DurationPattern = `^([0-9]+(\.[0-9]+)?|\.[0-9]+)(ns|us|\u00b5s|ms|s|m|h)(([0-9]+(\.[0-9]+)?|\.[0-9]+)(ns|us|\u00b5s|ms|s|m|h))*$`
DurationPattern describes the positive Go duration syntax accepted by project configuration. semantic bounds are checked after decoding.
const GitLabTokenEnv = "TNL_ID_TOKEN"
const GoogleWorkloadIssuer = "https://accounts.google.com"
const GoogleWorkloadJWKS = "https://www.googleapis.com/oauth2/v3/certs"
const MaxConfigInteger = 1<<53 - 1
MaxConfigInteger is the largest integer shared exactly by Go and JavaScript.
const MaxDocumentBytes = 1 << 20
const MaxWorkloadMaxDuration = time.Duration(MaxWorkloadMaxDurationSeconds) * time.Second
const MaxWorkloadMaxDurationSeconds = (1<<63 - 1) / int64(time.Second)
Variables ¶
var GitLabPipelineSources = []string{"push", "web", "schedule", "api", "trigger", "pipeline", "parent_pipeline", "merge_request_event", "external", "external_pull_request_event", "chat", "webide", "ondemand_dast_scan", "ondemand_dast_validation", "security_orchestration_policy"}
var WorkloadEvents = []string{"push", "pull_request", "pull_request_target", "workflow_dispatch", "workflow_call", "schedule", "release", "merge_group", "repository_dispatch", "workflow_run"}
Functions ¶
func DeclaredProtocol ¶
func DeclaredProtocol(service ServiceDeclaration) string
func ExactWorkloadValue ¶
func MatchesDockerIdentifier ¶
MatchesDockerIdentifier rejects Docker's implicit ID-prefix lookup. discovery must additionally check the container's worktree label before dialing it.
func NonHTTPProtocol ¶
NonHTTPProtocol identifies non-HTTP labels, independently of reachability.
func NormalizeHTTPServiceTarget ¶
NormalizeHTTPServiceTarget retains listener origins for local app ownership. a private host:port is an opaque dial target, represented locally as an HTTP origin without selecting who, if anyone, negotiates TLS on its bytes.
func RejectNullValues ¶
RejectNullValues checks decoded external JSON before pointer fields can turn an explicit null into an omitted value.
func ResolveInspection ¶
func ResolveInspection(value *Inspection, protocol string) (inspection.Policy, error)
ResolveInspection supplies bounded native retention settings.
func ResolveTrafficSelection ¶
func ResolveTrafficSelection(traffic *TrafficLimits) (*trafficlimits.Selection, error)
ResolveTrafficSelection sends configured values only. control applies its defaults and ceilings when it creates the service run.
func ResolveWorkLimits ¶
func ResolveWorkLimits(limits *WorkLimits) (applicationlimits.Limits, error)
ResolveWorkLimits converts an explicit application budget without defaults.
func SelectedDeployment ¶
func ServiceName ¶
ServiceName selects the saved name for one service.
func ServicePaths ¶
func ServiceProtocol ¶
ServiceProtocol selects the service protocol, defaulting to http.
func TargetType ¶
func ValidDockerIdentifier ¶
ValidDockerIdentifier accepts one exact container name or ID, never a filter, path, option, or shell expression. runtime discovery must still verify labels.
func ValidGitLabProject ¶
func ValidGitLabServer ¶
func ValidKubernetesName ¶
kubernetes service-account and pod names use DNS subdomain syntax with only a total length limit, not the per-label 63-character DNS limit.
func ValidKubernetesUID ¶
func ValidProtocol ¶
ValidProtocol accepts project service labels. a private label selects client guidance, not public reachability or a different transport.
func ValidPublisherCertificateScope ¶
ValidPublisherCertificateScope checks the shape, not ownership, of the dedicated DNS subtree requested for one public HTTP deployment binding.
func ValidTLSIdentity ¶
ValidTLSIdentity accepts a certificate DNS hostname or an unzoned IP address.
func ValidVercelProjectName ¶
ValidVercelProjectName checks project names, which are not dns labels.
func ValidWebhookMethod ¶
ValidWebhookMethod restricts configured endpoints to standard HTTP methods.
func ValidWorkloadNumericID ¶
func ValidWorkloadRef ¶
func ValidateAliases ¶
ValidateAliases validates local declarations without resolving a member namespace, consulting server policy, or creating services.
func ValidateCloudTarget ¶
func ValidateCloudTarget(protocol string, target ServiceTarget) error
ValidateCloudTarget checks selectors without normalizing input or provider I/O.
func ValidateDocument ¶
func ValidateInspection ¶
func ValidateInspection(value *Inspection) error
func ValidateProject ¶
func ValidateRemoteHTTP ¶
func ValidateRemoteHTTP(value *HTTPService) error
remote HTTP policy cannot add local readiness, path mounts, or browser opening.
func ValidateServiceHTTP ¶
func ValidateServiceHTTP(value *HTTPService) error
validates owned HTTP settings and normalizes their IP policy. read-only project validation supplies a detached access value. placement does not change policy.
func ValidateTNL ¶
func ValidateTrustSource ¶
func ValidateTrustSource(value TrustSource) error
func ValidateWebhooks ¶
ValidateWebhooks checks the declared target and admission policy without querying providers or publishing a URL.
func ValidateWorkloads ¶
func WorkloadHTTPS ¶
Types ¶
type Access ¶
type Access struct {
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
IP []string `json:"ip,omitempty" yaml:"ip,omitempty"`
}
Access is the complete visitor policy. an IP list narrows its mode; it never grants access to a visitor without the mode's required credential.
func (*Access) UnmarshalJSON ¶
func (*Access) Validate ¶
Validate replaces IP with its canonical value only after validation succeeds.
func (Access) VisitorMode ¶
type Alias ¶
type Alias struct {
Service string `json:"service" yaml:"service"`
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
Domain *string `json:"domain,omitempty" yaml:"domain,omitempty"`
Hostname *string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
Access *Access `json:"access,omitempty" yaml:"access,omitempty"`
}
Alias names an HTTP service serving one configured entry service. an omitted visitor policy remains restricted, independent of the entry service.
func (Alias) DefinitionBytes ¶
DefinitionBytes normalizes equivalent relative names and IP ordering for agreement between live worktrees. local targets are not alias declarations.
func (Alias) RelativeName ¶
type ByteSize ¶
type ByteSize int64
func ParseByteSize ¶
func (ByteSize) MarshalJSON ¶
func (ByteSize) MarshalYAML ¶
func (*ByteSize) UnmarshalJSON ¶
type CAURLError ¶
type CAURLError struct {
// contains filtered or unexported fields
}
CAURLError preserves URL parser failures without putting source URLs or query credentials in the diagnostic text.
func (*CAURLError) Error ¶
func (e *CAURLError) Error() string
func (*CAURLError) GoString ¶
func (e *CAURLError) GoString() string
func (*CAURLError) Unwrap ¶
func (e *CAURLError) Unwrap() error
type CloudTarget ¶
type CloudTarget struct {
Type, Region, Cluster, Instance string
Endpoint RDSEndpoint
}
CloudTarget is a pure selector, independent of provider credentials and wire descriptors. Normalize supplies the default RDS endpoint without changing input.
func NormalizeCloudTarget ¶
func NormalizeCloudTarget(protocol string, target ServiceTarget) (CloudTarget, error)
NormalizeCloudTarget preserves presence rules from source configuration and control descriptors before projecting them to the value-only selector.
func (CloudTarget) Normalize ¶
func (t CloudTarget) Normalize(protocol string) (CloudTarget, error)
type Deployment ¶
type Deployment struct {
Description *string `json:"description,omitempty" yaml:"description,omitempty"`
Domain *string `json:"domain,omitempty" yaml:"domain,omitempty"`
Targets map[string]DeploymentBinding `json:"targets,omitempty" yaml:"targets,omitempty"`
}
type DeploymentBinding ¶
type DeploymentBinding struct {
ServiceTarget `yaml:",inline"`
Name *string `` /* 127-byte string literal not displayed */
Access *ServiceAccess `json:"access,omitempty" yaml:"access,omitempty"`
Public *bool `` /* 193-byte string literal not displayed */
Inspection *Inspection `json:"inspection,omitempty" yaml:"inspection,omitempty"`
Hostname *string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
RunAliasParent *string `json:"publisher_alias_parent,omitempty" yaml:"publisher_alias_parent,omitempty"`
CertificateScope *string `json:"certificate_scope,omitempty" yaml:"certificate_scope,omitempty"`
Domain *string `json:"domain,omitempty" yaml:"domain,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty" yaml:"ephemeral,omitempty"`
RequirePostQuantum *bool `json:"require_post_quantum,omitempty" yaml:"require_post_quantum,omitempty"`
Traffic *TrafficLimits `json:"traffic,omitempty" yaml:"traffic,omitempty"`
HTTP *HTTPService `json:"http,omitempty" yaml:"http,omitempty"`
}
DeploymentBinding reuses the target mechanics without repeating a protocol. an omitted target type selects address when present, otherwise an app listener.
type DeploymentSettings ¶
type DeploymentWorkload ¶
type Document ¶
type Document struct {
Schema string `` /* 128-byte string literal not displayed */
Version *int `json:"version" yaml:"version" jsonschema:"required" jsonschema_description:"Configuration format version. Must be 1."`
TNL *Project `` /* 131-byte string literal not displayed */
TNLD *TNLDSection `json:"tnld,omitempty" yaml:"tnld,omitempty" jsonschema_description:"Process configuration used by tnld."`
}
Document is the versioned static tnl.yml, tnl.yaml, or tnl.json contract. TypeScript configuration evaluates directly to the TnlConfig shape and is wrapped in this document shape by the loader.
func LoadDocument ¶
LoadDocument strictly loads one versioned static configuration document.
type Duration ¶
Duration is a Go duration string in project configuration.
func (Duration) MarshalJSON ¶
func (*Duration) UnmarshalJSON ¶
type HTTPService ¶
type HTTPService struct {
RequestBodyIdleTimeout *Duration `` /* 342-byte string literal not displayed */
Access *Access `` /* 189-byte string literal not displayed */
Limits *WorkLimits `json:"limits,omitempty" yaml:"limits,omitempty" jsonschema_description:"HTTP request limits for a local or remote service."`
Readiness *Readiness `` /* 185-byte string literal not displayed */
Paths map[string]PathMount `` /* 168-byte string literal not displayed */
Open *bool `json:"open,omitempty" yaml:"open,omitempty"`
}
func HTTPRequestPolicy ¶
func HTTPRequestPolicy(value *HTTPService) *HTTPService
HTTPRequestPolicy excludes publisher-only readiness, mounts, and browser opening. the returned policy shares its nested values; callers must copy before editing.
type Inspection ¶
type Inspection struct {
Mode *InspectionMode `json:"mode,omitempty" yaml:"mode,omitempty" jsonschema:"enum=none,enum=summary"`
Retention *Duration `json:"retention,omitempty" yaml:"retention,omitempty"`
MaxBytes *ByteSize `json:"max_bytes,omitempty" yaml:"max_bytes,omitempty"`
}
Inspection provides project defaults and optional service-level overrides.
func MergeInspection ¶
func MergeInspection(base, override *Inspection) *Inspection
type InspectionMode ¶
type InspectionMode string
InspectionMode selects whether local observations are recorded.
const ( InspectionNone InspectionMode = "none" InspectionSummary InspectionMode = "summary" )
func (InspectionMode) Valid ¶
func (mode InspectionMode) Valid() bool
type PathMount ¶
type PathMount struct {
Service string `json:"service" yaml:"service"`
StripPrefix bool `json:"strip_prefix,omitempty" yaml:"strip_prefix,omitempty"`
}
PathMount selects a local service reached at a path on another HTTP service.
func (*PathMount) UnmarshalJSON ¶
type Project ¶
type Project struct {
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
Server *string `json:"server,omitempty" yaml:"server,omitempty"`
Team *string `json:"team,omitempty" yaml:"team,omitempty"`
Naming string `` /* 167-byte string literal not displayed */
Feedback *bool `json:"feedback,omitempty" yaml:"feedback,omitempty"`
OAuth bool `json:"oauth,omitempty" yaml:"oauth,omitempty"`
Inspection *Inspection `json:"inspection,omitempty" yaml:"inspection,omitempty"`
Services map[string]ServiceDeclaration `json:"services,omitempty" yaml:"services,omitempty"`
Deployments map[string]Deployment `json:"deployments,omitempty" yaml:"deployments,omitempty"`
Webhooks map[string]Webhook `json:"webhooks,omitempty" yaml:"webhooks,omitempty"`
Aliases map[string]Alias `json:"aliases,omitempty" yaml:"aliases,omitempty"`
Workloads map[string]DeploymentWorkload `json:"workloads,omitempty" yaml:"workloads,omitempty"`
}
Project separates logical service declarations from deployment bindings. TNL is the evaluated configuration of one selected deployment.
type ProtocolName ¶
type ProtocolName string
ProtocolName identifies service behavior independently of public or private publication. public HTTPS accepts only ProtocolHTTP.
const ( ProtocolHTTP ProtocolName = "http" ProtocolTCP ProtocolName = "tcp" ProtocolMySQL ProtocolName = "mysql" ProtocolPostgres ProtocolName = "postgres" ProtocolKubernetes ProtocolName = "kubernetes" )
func (ProtocolName) Valid ¶
func (p ProtocolName) Valid() bool
type Publish ¶
type Publish struct {
Protocol *string `` /* 169-byte string literal not displayed */
Target *Target `` /* 149-byte string literal not displayed */
TargetTLSName *string `` /* 170-byte string literal not displayed */
TargetTLS *bool `json:"target_tls,omitempty" yaml:"target_tls,omitempty" jsonschema_description:"Use verified TLS for the TCP target."`
TargetCAFile *string `` /* 194-byte string literal not displayed */
}
func ResolveServiceTarget ¶
ResolveServiceTarget turns a configured address or a discovered private listener into native publication settings. compose/docker discovery supplies host:port; an app supplies its reported HTTP origin. no public address is used.
func ServicePublish ¶
ServicePublish resolves address targets into the native publication settings. compose and docker addresses must first be discovered by the runtime.
type RDSEndpoint ¶
type RDSEndpoint string
type Readiness ¶
type Readiness struct {
Path string `json:"path" yaml:"path" jsonschema:"required"`
}
readiness selects the public GET used to check one app publication.
type Service ¶
type Service struct {
Name *string `json:"name,omitempty" yaml:"name,omitempty" jsonschema_description:"Saved name; defaults to the configuration key."`
Access *ServiceAccess `json:"access,omitempty" yaml:"access,omitempty" jsonschema_description:"Declare team access for this service."`
Public *bool `json:"public,omitempty" yaml:"public,omitempty"`
Inspection *Inspection `` /* 146-byte string literal not displayed */
Hostname *string `` /* 167-byte string literal not displayed */
RunAliasParent *string `` /* 262-byte string literal not displayed */
CertificateScope *string `json:"certificate_scope,omitempty" yaml:"certificate_scope,omitempty"`
Domain *string `json:"domain,omitempty" yaml:"domain,omitempty" jsonschema_description:"Ready team domain used for the service endpoint."`
Ephemeral *bool `` /* 126-byte string literal not displayed */
RequirePostQuantum *bool `` /* 159-byte string literal not displayed */
Traffic *TrafficLimits `json:"traffic,omitempty" yaml:"traffic,omitempty"`
Protocol *string `` /* 245-byte string literal not displayed */
Target *ServiceTarget `json:"target,omitempty" yaml:"target,omitempty"`
HTTP *HTTPService `json:"http,omitempty" yaml:"http,omitempty"`
}
Service contains the resolved settings for one deployment binding.
type ServiceAccess ¶
type ServiceAccess struct {
Team bool `json:"team,omitempty" yaml:"team,omitempty"`
}
ServiceAccess declares team access for a service.
type ServiceDeclaration ¶
type ServiceDeclaration struct {
Protocol *string `` /* 253-byte string literal not displayed */
}
type ServiceTarget ¶
type ServiceTarget struct {
Type string `json:"type,omitempty" yaml:"type,omitempty" jsonschema:"enum=app,enum=address,enum=compose,enum=docker,enum=eks,enum=rds"`
Address *Target `json:"address,omitempty" yaml:"address,omitempty"`
Project *string `json:"project,omitempty" yaml:"project,omitempty"`
File *string `json:"file,omitempty" yaml:"file,omitempty"`
Service *string `json:"service,omitempty" yaml:"service,omitempty"`
Port *int `json:"port,omitempty" yaml:"port,omitempty"`
Container *string `json:"container,omitempty" yaml:"container,omitempty"`
TLS *TargetTLS `json:"tls,omitempty" yaml:"tls,omitempty"`
Region *string `json:"region,omitempty" yaml:"region,omitempty"`
Cluster *string `json:"cluster,omitempty" yaml:"cluster,omitempty"`
Instance *string `json:"instance,omitempty" yaml:"instance,omitempty"`
Endpoint *string `json:"endpoint,omitempty" yaml:"endpoint,omitempty" jsonschema:"enum=writer,enum=reader"`
}
ServiceTarget describes one target discovery mechanism. an omitted target means an app-reported HTTP listener.
type TNL ¶
type TNL struct {
Name *string `` /* 164-byte string literal not displayed */
Server *string `json:"server,omitempty" yaml:"server,omitempty" jsonschema_description:"Control URL used by this project."`
Team *string `` /* 128-byte string literal not displayed */
Naming string `json:"naming,omitempty" yaml:"naming,omitempty"`
Feedback *bool `json:"feedback,omitempty" yaml:"feedback,omitempty" jsonschema_description:"Show the feedback toolbar on development pages."`
OAuth bool `` /* 135-byte string literal not displayed */
Inspection *Inspection `` /* 138-byte string literal not displayed */
Deployment string `json:"deployment" yaml:"deployment"`
DeploymentSettings DeploymentSettings `json:"deployment_settings" yaml:"deployment_settings"`
Services Services `` /* 206-byte string literal not displayed */
Webhooks map[string]Webhook `` /* 142-byte string literal not displayed */
Aliases map[string]Alias `` /* 175-byte string literal not displayed */
Workloads map[string]Workload `` /* 150-byte string literal not displayed */
}
TNL contains the bindings and settings of one selected deployment.
type TNLDSection ¶
type TNLDSection struct {
// contains filtered or unexported fields
}
TNLDSection is a presence-aware partial daemonconfig.Config value. its field names and types are derived from Config so file configuration cannot drift from flags.
func (TNLDSection) Apply ¶
func (s TNLDSection) Apply(target *daemonconfig.Config)
Apply replaces only fields explicitly present in the file.
func (TNLDSection) ApplyLowerPrecedence ¶
func (s TNLDSection) ApplyLowerPrecedence(target *daemonconfig.Config, commandLine map[string]bool) map[string]bool
ApplyLowerPrecedence applies file fields unless a command-line flag or one of the field's TNLD_* environment variables supplied a higher-precedence value.
func (*TNLDSection) UnmarshalJSON ¶
func (s *TNLDSection) UnmarshalJSON(data []byte) error
func (*TNLDSection) UnmarshalYAML ¶
func (s *TNLDSection) UnmarshalYAML(node *yaml.Node) error
func (TNLDSection) Value ¶
func (s TNLDSection) Value() daemonconfig.Config
type Target ¶
type Target string
Target accepts an HTTP or HTTPS origin or a literal local port.
func (*Target) UnmarshalJSON ¶
type TrafficLimits ¶
type TrafficLimits struct {
Connections *int `json:"connections,omitempty" yaml:"connections,omitempty"`
Rate *int `json:"rate,omitempty" yaml:"rate,omitempty"`
RatePer *Duration `json:"rate_per,omitempty" yaml:"rate_per,omitempty"`
Burst *int `json:"burst,omitempty" yaml:"burst,omitempty"`
UploadBytes *int64 `json:"upload_bytes,omitempty" yaml:"upload_bytes,omitempty"`
DownloadBytes *int64 `json:"download_bytes,omitempty" yaml:"download_bytes,omitempty"`
TotalConnections *int64 `json:"total_connections,omitempty" yaml:"total_connections,omitempty"`
TotalUploadBytes *int64 `json:"total_upload_bytes,omitempty" yaml:"total_upload_bytes,omitempty"`
TotalDownloadBytes *int64 `json:"total_download_bytes,omitempty" yaml:"total_download_bytes,omitempty"`
}
TrafficLimits selects independent ingress connection and directional byte budgets.
type TrustSource ¶
type TrustSource struct {
Hostname *string `` /* 191-byte string literal not displayed */
CA string `json:"ca" yaml:"ca"`
}
TrustSource is an evaluated CA source, not a service configuration setting.
type Webhook ¶
type Webhook struct {
Service string `json:"service" yaml:"service"`
Path string `json:"path" yaml:"path"`
Provider string `` /* 342-byte string literal not displayed */
Delivery string `json:"delivery,omitempty" yaml:"delivery,omitempty" jsonschema:"enum=fanout,enum=selected"`
Methods []string `json:"methods,omitempty" yaml:"methods,omitempty" jsonschema:"uniqueItems=true"`
// source_ips replaces this endpoint's provider-managed ranges, not a union.
SourceIPs []string `json:"source_ips,omitempty" yaml:"source_ips,omitempty" jsonschema:"uniqueItems=true,minItems=1"`
}
Webhook declares one exact endpoint on the project's stable webhook hostname.
func (Webhook) DefinitionBytes ¶
DefinitionBytes gives equivalent declarations the same fingerprint without modifying the caller's slices. fingerprints reject outdated receiver selections.
func (Webhook) DeliveryMode ¶
DeliveryMode resolves the provider default without changing the declaration.
type WorkLimits ¶
type Workload ¶
type Workload struct {
GitHub *WorkloadGitHub `json:"github,omitempty" yaml:"github,omitempty"`
GitLab *WorkloadGitLab `json:"gitlab,omitempty" yaml:"gitlab,omitempty"`
Vercel *WorkloadVercel `json:"vercel,omitempty" yaml:"vercel,omitempty"`
Fly *WorkloadFly `json:"fly,omitempty" yaml:"fly,omitempty"`
Google *WorkloadGoogle `json:"google,omitempty" yaml:"google,omitempty"`
Kubernetes *WorkloadKubernetes `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"`
OIDC *WorkloadOIDC `json:"oidc,omitempty" yaml:"oidc,omitempty"`
Token *WorkloadToken `json:"token,omitempty" yaml:"token,omitempty"`
Services []string `` /* 209-byte string literal not displayed */
MaxDuration *Duration `` /* 205-byte string literal not displayed */
}
workload declares provider identity constraints and exact service rights.
func (Workload) DurationLimit ¶
durationLimit returns zero when no absolute limit was declared.
func (Workload) Provider ¶
provider is derived from exactly one block, never from a second discriminator.
func (Workload) TokenAudience ¶
type WorkloadFly ¶
type WorkloadFly struct {
App string `json:"app,omitempty" yaml:"app,omitempty" jsonschema_description:"Application name; defaults to fly.toml."`
Org string `json:"org,omitempty" yaml:"org,omitempty" jsonschema_description:"Organization slug; defaults to the application's owner."`
MachineID string `json:"machine_id,omitempty" yaml:"machine_id,omitempty"`
}
type WorkloadGitHub ¶
type WorkloadGitHub struct {
Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"`
Workflow string `json:"workflow" yaml:"workflow"`
Environment *string `json:"environment,omitempty" yaml:"environment,omitempty"`
Branch *string `` /* 180-byte string literal not displayed */
Tag *string `json:"tag,omitempty" yaml:"tag,omitempty" jsonschema_description:"Exact tag; mutually exclusive with branch."`
Events []string `json:"events,omitempty" yaml:"events,omitempty" jsonschema_description:"Allowed workflow events; defaults to push."`
ReusableWorkflow *string `json:"reusable_workflow,omitempty" yaml:"reusable_workflow,omitempty"`
}
func (WorkloadGitHub) AllowedEvents ¶
func (g WorkloadGitHub) AllowedEvents() []string
func (WorkloadGitHub) ExecutionRef ¶
func (g WorkloadGitHub) ExecutionRef(defaultBranch string) string
type WorkloadGitLab ¶
type WorkloadGitLab struct {
Project string `` /* 146-byte string literal not displayed */
Server string `json:"server,omitempty" yaml:"server,omitempty" jsonschema_description:"GitLab HTTPS origin; defaults to https://gitlab.com."`
Branch *string `` /* 161-byte string literal not displayed */
Tag *string `json:"tag,omitempty" yaml:"tag,omitempty"`
PipelineSource string `` /* 138-byte string literal not displayed */
Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
Audience string `` /* 131-byte string literal not displayed */
}
func (WorkloadGitLab) ExecutionRef ¶
func (g WorkloadGitLab) ExecutionRef(defaultBranch string) string
func (WorkloadGitLab) Origin ¶
func (g WorkloadGitLab) Origin() string
func (WorkloadGitLab) Source ¶
func (g WorkloadGitLab) Source() string
type WorkloadGoogle ¶
type WorkloadKubernetes ¶
type WorkloadKubernetes struct {
Context string `` /* 182-byte string literal not displayed */
Namespace string `` /* 149-byte string literal not displayed */
ServiceAccount string `json:"service_account" yaml:"service_account" jsonschema:"required"`
Audience string `` /* 131-byte string literal not displayed */
}
type WorkloadOIDC ¶
type WorkloadOIDC struct {
Issuer string `json:"issuer" yaml:"issuer" jsonschema:"required"`
JWKSURL string `` /* 141-byte string literal not displayed */
Audience string `` /* 131-byte string literal not displayed */
Claims map[string]string `json:"claims" yaml:"claims" jsonschema:"required,minProperties=1,maxProperties=32"`
}
type WorkloadToken ¶
type WorkloadVercel ¶
type WorkloadVercel struct {
Project string `` /* 127-byte string literal not displayed */
Team string `json:"team,omitempty" yaml:"team,omitempty" jsonschema_description:"Team slug; defaults to the linked project's owner."`
Environment string `json:"environment" yaml:"environment" jsonschema:"required,enum=production,enum=preview,enum=development"`
}