config

package
v0.1.0-rc.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: BSD-3-Clause Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config defines the versioned YAML and JSON configuration format.

Index

Constants

View Source
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}$`
)
View Source
const DocumentVersion = 1
View Source
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.

View Source
const GitLabTokenEnv = "TNL_ID_TOKEN"
View Source
const GoogleWorkloadIssuer = "https://accounts.google.com"
View Source
const GoogleWorkloadJWKS = "https://www.googleapis.com/oauth2/v3/certs"
View Source
const MaxConfigInteger = 1<<53 - 1

MaxConfigInteger is the largest integer shared exactly by Go and JavaScript.

View Source
const MaxDocumentBytes = 1 << 20
View Source
const MaxWorkloadMaxDurationSeconds = (1<<63 - 1) / int64(time.Second)

Variables

View Source
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"}
View Source
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 ExactWorkloadValue(s string) bool

func MatchesDockerIdentifier

func MatchesDockerIdentifier(identifier, id, name string) bool

MatchesDockerIdentifier rejects Docker's implicit ID-prefix lookup. discovery must additionally check the container's worktree label before dialing it.

func NonHTTPProtocol

func NonHTTPProtocol(protocol string) bool

NonHTTPProtocol identifies non-HTTP labels, independently of reachability.

func NormalizeHTTPServiceTarget

func NormalizeHTTPServiceTarget(service Service, value string) (string, error)

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 Protocol

func Protocol(service Service) string

func RejectNullValues

func RejectNullValues(value any) error

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 SelectedDeployment(configuration TNL) string

func ServiceName

func ServiceName(serviceName string, service Service) string

ServiceName selects the saved name for one service.

func ServicePaths

func ServicePaths(service Service) map[string]PathMount

func ServiceProtocol

func ServiceProtocol(publish *Publish) string

ServiceProtocol selects the service protocol, defaulting to http.

func TargetType

func TargetType(service Service) string

func ValidDockerIdentifier

func ValidDockerIdentifier(value string) bool

ValidDockerIdentifier accepts one exact container name or ID, never a filter, path, option, or shell expression. runtime discovery must still verify labels.

func ValidGitLabPipelineSource

func ValidGitLabPipelineSource(value string) bool

func ValidGitLabProject

func ValidGitLabProject(value string) bool

func ValidGitLabServer

func ValidGitLabServer(value string) bool

func ValidGoogleServiceAccount

func ValidGoogleServiceAccount(value string) bool

func ValidKubernetesName

func ValidKubernetesName(value string) bool

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 ValidKubernetesUID(value string) bool

func ValidProtocol

func ValidProtocol(protocol string) bool

ValidProtocol accepts project service labels. a private label selects client guidance, not public reachability or a different transport.

func ValidPublisherCertificateScope

func ValidPublisherCertificateScope(hostname, aliasParent, scope string) bool

ValidPublisherCertificateScope checks the shape, not ownership, of the dedicated DNS subtree requested for one public HTTP deployment binding.

func ValidTLSIdentity

func ValidTLSIdentity(value string) bool

ValidTLSIdentity accepts a certificate DNS hostname or an unzoned IP address.

func ValidVercelProjectName

func ValidVercelProjectName(name string) bool

ValidVercelProjectName checks project names, which are not dns labels.

func ValidWebhookMethod

func ValidWebhookMethod(method string) bool

ValidWebhookMethod restricts configured endpoints to standard HTTP methods.

func ValidWorkloadNumericID

func ValidWorkloadNumericID(value string) bool

func ValidWorkloadRef

func ValidWorkloadRef(ref string) bool

func ValidateAliases

func ValidateAliases(config TNL) error

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 ValidateDocument(document Document) error

func ValidateInspection

func ValidateInspection(value *Inspection) error

func ValidateProject

func ValidateProject(project Project) error

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 ValidateTNL(config TNL) error

func ValidateTrustSource

func ValidateTrustSource(value TrustSource) error

func ValidateWebhooks

func ValidateWebhooks(services Services, definitions map[string]Webhook) error

ValidateWebhooks checks the declared target and admission policy without querying providers or publishing a URL.

func ValidateWorkloadTokenEnv

func ValidateWorkloadTokenEnv(name string) error

func ValidateWorkloads

func ValidateWorkloads(services Services, workloads map[string]Workload) error

func WorkloadHTTPS

func WorkloadHTTPS(s string) bool

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 (a *Access) UnmarshalJSON(data []byte) error

func (*Access) UnmarshalYAML

func (a *Access) UnmarshalYAML(node *yaml.Node) error

func (*Access) Validate

func (a *Access) Validate() error

Validate replaces IP with its canonical value only after validation succeeds.

func (Access) VisitorMode

func (a Access) VisitorMode() string

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

func (a Alias) DefinitionBytes(key string) ([]byte, [32]byte, error)

DefinitionBytes normalizes equivalent relative names and IP ordering for agreement between live worktrees. local targets are not alias declarations.

func (Alias) RelativeName

func (a Alias) RelativeName(key string) string

type ByteSize

type ByteSize int64

func ParseByteSize

func ParseByteSize(value string) (ByteSize, error)

func (ByteSize) MarshalJSON

func (size ByteSize) MarshalJSON() ([]byte, error)

func (ByteSize) MarshalYAML

func (size ByteSize) MarshalYAML() (any, error)

func (*ByteSize) UnmarshalJSON

func (size *ByteSize) UnmarshalJSON(data []byte) error

func (*ByteSize) UnmarshalYAML

func (size *ByteSize) UnmarshalYAML(node *yaml.Node) error

func (ByteSize) Value

func (size ByteSize) Value() int64

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 DeploymentSettings struct {
	Description *string `json:"description,omitempty" yaml:"description,omitempty"`
	Domain      *string `` /* 168-byte string literal not displayed */
}

type DeploymentWorkload

type DeploymentWorkload struct {
	Deployment string `` /* 160-byte string literal not displayed */
	Workload   `yaml:",inline"`
}

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

func LoadDocument(path string) (Document, error)

LoadDocument strictly loads one versioned static configuration document.

type Duration

type Duration time.Duration

Duration is a Go duration string in project configuration.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(data []byte) error

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(node *yaml.Node) error

func (Duration) Value

func (d Duration) Value() time.Duration

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

func (m *PathMount) UnmarshalJSON(data []byte) error

func (*PathMount) UnmarshalYAML

func (m *PathMount) UnmarshalYAML(node *yaml.Node) error

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

func ResolveServiceTarget(service Service, discovered string) (*Publish, error)

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

func ServicePublish(service Service) *Publish

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 Rate

type Rate struct {
	Count *int      `json:"count,omitempty" yaml:"count,omitempty"`
	Per   *Duration `json:"per,omitempty" yaml:"per,omitempty"`
	Burst *int      `json:"burst,omitempty" yaml:"burst,omitempty"`
}

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 Services

type Services map[string]Service

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.

func ResolveDeployment

func ResolveDeployment(project Project, name string) (TNL, error)

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

func (t *Target) UnmarshalJSON(data []byte) error

func (*Target) UnmarshalYAML

func (t *Target) UnmarshalYAML(node *yaml.Node) error

type TargetTLS

type TargetTLS struct {
	Hostname *string `` /* 186-byte string literal not displayed */
	CA       *string `` /* 233-byte string literal not displayed */
}

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

func (w Webhook) DefinitionBytes() ([]byte, [32]byte, error)

DefinitionBytes gives equivalent declarations the same fingerprint without modifying the caller's slices. fingerprints reject outdated receiver selections.

func (Webhook) DeliveryMode

func (w Webhook) DeliveryMode() string

DeliveryMode resolves the provider default without changing the declaration.

type WorkLimits

type WorkLimits struct {
	Total       *int  `json:"total,omitempty" yaml:"total,omitempty"`
	Rate        *Rate `json:"rate,omitempty" yaml:"rate,omitempty"`
	Concurrency *int  `json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
}

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

func (p Workload) DurationLimit() time.Duration

durationLimit returns zero when no absolute limit was declared.

func (Workload) Provider

func (p Workload) Provider() string

provider is derived from exactly one block, never from a second discriminator.

func (Workload) TokenAudience

func (p Workload) TokenAudience(server string) string

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 WorkloadGoogle struct {
	ServiceAccount string `` /* 222-byte string literal not displayed */
	Audience       string `` /* 131-byte string literal not displayed */
}

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 WorkloadToken struct {
	File *string `json:"file,omitempty" yaml:"file,omitempty"`
	Env  *string `json:"env,omitempty" yaml:"env,omitempty"`
}

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"`
}

Directories

Path Synopsis
cmd
configgen command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL