Documentation
¶
Overview ¶
Package tag provides YAML tag constants and validation for Atmos functions. This package is intentionally minimal and dependency-free to avoid import cycles when used from pkg/utils.
Index ¶
Constants ¶
const ( // Exec executes a shell command and returns the output. Exec = "exec" // Secret resolves a declared secret from its configured backend. Secret = "secret" // Store retrieves a value from a configured store. Store = "store" // StoreGet retrieves a value from a configured store (alternative syntax). StoreGet = "store.get" // Template processes a JSON template. Template = "template" // TerraformOutput retrieves a Terraform output value. TerraformOutput = "terraform.output" // TerraformState retrieves a value from Terraform state. TerraformState = "terraform.state" // Env retrieves an environment variable value. Env = "env" // CEL evaluates a Common Expression Language condition. CEL = "cel" // Include includes content from another file. Include = "include" // IncludeRaw includes raw content from another file. IncludeRaw = "include.raw" // RepoRoot returns the git repository root path. RepoRoot = "repo-root" // GitRoot returns the git repository root path. GitRoot = "git.root" // GitSha returns the current Git HEAD commit SHA. GitSha = "git.sha" // GitBranch returns the current Git branch name. GitBranch = "git.branch" // GitRef returns the immutable Git ref used for source pinning. GitRef = "git.ref" // GitRepository returns the repository owner/name slug. GitRepository = "git.repository" // GitOwner returns the repository owner. GitOwner = "git.owner" // GitName returns the repository name. GitName = "git.name" // GitHost returns the repository host. GitHost = "git.host" // GitURL returns the repository URL. GitURL = "git.url" // Append appends list items during stack merging. Append = "append" // Cwd returns the current working directory. Cwd = "cwd" // Unset removes a value during configuration processing. Unset = "unset" // Random generates a random number. Random = "random" // Literal preserves values exactly as written, bypassing template processing. Literal = "literal" // AwsAccountID returns the AWS account ID. AwsAccountID = "aws.account_id" // AwsCallerIdentityArn returns the AWS caller identity ARN. AwsCallerIdentityArn = "aws.caller_identity_arn" // AwsCallerIdentityUserID returns the AWS caller identity user ID. AwsCallerIdentityUserID = "aws.caller_identity_user_id" // AwsRegion returns the AWS region. AwsRegion = "aws.region" // AwsOrganizationID returns the AWS Organization ID. AwsOrganizationID = "aws.organization_id" // Emulator resolves a value from a local emulator. Emulator = "emulator" // Version resolves a locked version from the Atmos Version Tracker. Version = "version" // Tags returns the current component's own metadata.tags as a list. Tags = "tags" // Labels returns the current component's own metadata.labels as a map. Labels = "labels" // LabelsKeys returns the current component's own metadata.labels keys as a sorted list. LabelsKeys = "labels.keys" // LabelsValues returns the current component's own metadata.labels values as a list, ordered by key. LabelsValues = "labels.values" )
Tag constants for Atmos configuration functions. These are the canonical function names used across all formats. In YAML they appear as !tag, in HCL as tag(), etc.
const YAMLPrefix = "!"
YAMLPrefix is the prefix used for YAML custom tags.
Variables ¶
This section is empty.
Functions ¶
func AllYAML ¶
func AllYAML() []string
AllYAML returns all registered tag names with the YAML prefix (e.g., "!env", "!exec"). This is useful for error messages that need to show supported YAML tags.
func AtmosConfigYAML ¶
func AtmosConfigYAML() []string
AtmosConfigYAML returns the YAML tags supported while preprocessing atmos.yaml. Some registered YAML functions require stack/component context and are resolved later by the stack YAML processor, so they are intentionally excluded here.
func IsAtmosConfigYAML ¶
IsAtmosConfigYAML checks if a YAML tag is supported by atmos.yaml preprocessing.
func IsValid ¶
IsValid checks if a tag name is registered. The name should not include the YAML prefix.
func IsValidYAML ¶
IsValidYAML checks if a YAML tag is registered. The tag should include the YAML prefix.
Types ¶
This section is empty.