hcl

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Annotations map[string]string `hcl:"annotations,optional"`
	Labels      map[string]string `hcl:"labels,optional"`
	Packages    []Package         `hcl:"package,block"`
}

Config is the configuration structure for bundle DSL.

func Parse

func Parse(r io.Reader, filename, format string) (*Config, error)

Parse parses the configuration from the given reader. The reader will be read to completion (EOF) before returning so ensure that the reader does not block forever.

format is either "hcl" or "json".

func ParseFile

func ParseFile(filename string) (*Config, error)

ParseFile parses the given file for a configuration. The syntax of the file is determined based on the filename extension: "hcl" for HCL, "json" for JSON, other is an error.

type Package

type Package struct {
	Path        string            `hcl:"path,label"`
	Description string            `hcl:"description"`
	Annotations map[string]string `hcl:"annotations,optional"`
	Labels      map[string]string `hcl:"labels,optional"`
	Secrets     map[string]string `hcl:"secrets"`
}

Jump to

Keyboard shortcuts

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