env

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvCollection

type EnvCollection []EnvVar

func (EnvCollection) ValidationRule

func (EnvCollection) ValidationRule() *validate.Rule

ValidationRule ports EnvCollection (env.ts:44-60): `Joi.array().items(EnvVar).sort({by:'name'}).custom(duplicate-name check)`.

The sort was missing, so an env list persisted in submitted order here and in name order there — a difference in the STORED document, since the array is stored sorted. Order matters: TS sorts BEFORE the duplicate scan.

type EnvFromCollection added in v1.1.25

type EnvFromCollection []EnvFromSource

type EnvFromSource added in v1.1.25

type EnvFromSource struct {
	SecretRef EnvFromSourceSecretRef `json:"secretRef" validate:"required"`
}

EnvFromSource references a dictionary (opaque key/value) secret whose keys are injected as environment variables (env.ts EnvFromSource/EnvFromCollection).

type EnvFromSourceSecretRef added in v1.1.25

type EnvFromSourceSecretRef struct {
	Name base.Name `json:"name" validate:"required"`
}

type EnvName

type EnvName string //ts:export

EnvName is the env-var name value. Its Validator (validate.go) ports EnvName's custom (CPLN_ reserved + name regex) plus the field-level disallow of the reserved knative names. trim/max/required stay declarative on the field tag.

func (EnvName) ValidationRule

func (EnvName) ValidationRule() *validate.Rule

ValidationRule ports EnvName = Joi.string().trim().max(120).custom(...) plus the EnvVar.name field-level .disallow('K_SERVICE','K_CONFIGURATION','K_REVISION'). trim/max/required are declarative on the EnvVar.Name field tag; the two customs live here in tag order (envName, then the reserved-name disallow).

type EnvValue

type EnvValue string

EnvValue is the env-var value. Its Validator (validate.go) chains the three internal-reference customs (value ref, manifest ref, secret ref). max/allow stay declarative on the field tag.

func (EnvValue) ValidationRule

func (EnvValue) ValidationRule() *validate.Rule

ValidationRule ports EnvVar.value's custom chain: internal reference, manifest reference, secret reference — in that order. max(4096)/allow(”) are declarative on the EnvVar.Value field tag.

type EnvVar

type EnvVar struct {
	Name  EnvName  `json:"name" validate:"trim,max=120,required"`
	Value EnvValue `json:"value,omitzero" validate:"max=4096,allow="`
}

Jump to

Keyboard shortcuts

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