cratefile

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 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 Archive

type Archive struct {
	Name        string   `hcl:"name,label"`
	RootPath    string   `hcl:"root"`
	IncludeGlob []string `hcl:"includes"`
	ExcludeGlob []string `hcl:"excludes,optional"`
}

Archive is a file collection which will be compressed as a tar.gz to be added to the crate.

type Config

type Config struct {
	Container Container `hcl:"container,block"`
	Archives  []Archive `hcl:"archive,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 Container

type Container struct {
	Name       string   `hcl:"name,label"`
	Path       string   `hcl:"path"`
	Identities []string `hcl:"identities,optional"`
}

Container is the pointer to the secret container.

Jump to

Keyboard shortcuts

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