Documentation ¶
Index ¶
- Variables
- func CheckEnvironment(ctx context.Context, name string, env *ast.EnvironmentDecl, ...) (*esc.Environment, syntax.Diagnostics)
- func DecryptSecrets(ctx context.Context, filename string, source []byte, decrypter Decrypter) ([]byte, error)
- func EncryptSecrets(ctx context.Context, filename string, source []byte, encrypter Encrypter) ([]byte, error)
- func EvalEnvironment(ctx context.Context, name string, env *ast.EnvironmentDecl, ...) (*esc.Environment, syntax.Diagnostics)
- func LoadYAML(filename string, r io.Reader) (*ast.EnvironmentDecl, syntax.Diagnostics, error)
- func LoadYAMLBytes(filename string, source []byte) (*ast.EnvironmentDecl, syntax.Diagnostics, error)
- type Decrypter
- type Encrypter
- type EnvironmentLoader
- type ProviderLoader
Constants ¶
This section is empty.
Variables ¶
var TagDecoder = tagDecoder(0)
The TagDecoder is responsible for decoding YAML tags that represent calls to builtin functions.
No tags are presently supported, but the machinery to support tags is useful to preserve until we are confident that we won't re-introduce.
Functions ¶
func CheckEnvironment ¶
func CheckEnvironment( ctx context.Context, name string, env *ast.EnvironmentDecl, providers ProviderLoader, environments EnvironmentLoader, ) (*esc.Environment, syntax.Diagnostics)
CheckEnvironment symbolically evaluates the given environment. Calls to fn::open are not invoked, and instead evaluate to unknown values with appropriate schemata.
func DecryptSecrets ¶ added in v0.6.0
func DecryptSecrets(ctx context.Context, filename string, source []byte, decrypter Decrypter) ([]byte, error)
DecryptSecrets decrypts any secrets in the given YAML document and returns the rewritten source. Decryption replaces all ciphertext arguments to `fn::secret` with decrypted plaintext.
func EncryptSecrets ¶ added in v0.6.0
func EncryptSecrets(ctx context.Context, filename string, source []byte, encrypter Encrypter) ([]byte, error)
EncryptSecrets encrypts any secrets in the given YAML document and returns the rewritten source. Encryption replaces all plaintext arguments to `fn::secret` with encrypted ciphertext.
func EvalEnvironment ¶
func EvalEnvironment( ctx context.Context, name string, env *ast.EnvironmentDecl, decrypter Decrypter, providers ProviderLoader, environments EnvironmentLoader, ) (*esc.Environment, syntax.Diagnostics)
EvalEnvironment evaluates the given environment.
func LoadYAML ¶
func LoadYAML(filename string, r io.Reader) (*ast.EnvironmentDecl, syntax.Diagnostics, error)
LoadYAML decodes a YAML template from an io.Reader.
func LoadYAMLBytes ¶
func LoadYAMLBytes(filename string, source []byte) (*ast.EnvironmentDecl, syntax.Diagnostics, error)
LoadYAMLBytes decodes a YAML template from a byte array.
Types ¶
type Decrypter ¶ added in v0.6.0
type Decrypter interface { // Decrypt decrypts a single ciphertext value. Decrypt(ctx context.Context, value []byte) ([]byte, error) }
A Decrypter decrypts ciphertext into plaintext.
type Encrypter ¶ added in v0.6.0
type Encrypter interface { // Encrypt encrypts a single plaintext value. Encrypt(ctx context.Context, value []byte) ([]byte, error) }
An Encrypter encrypts plaintext into ciphertext.
type EnvironmentLoader ¶
type EnvironmentLoader interface { // LoadEnvironment loads the definition for the environment with the given name. LoadEnvironment(ctx context.Context, name string) ([]byte, Decrypter, error) }
An EnvironmentLoader provides the environment evaluator the capability to load imported environment definitions.