features

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TarLayerMediaType = "application/vnd.devcontainers.layer.v1+tar"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Type        string   `json:"type"` // "boolean" or "string"
	Proposals   []string `json:"proposals"`
	Enum        []string `json:"enum"`
	Default     any      `json:"default"` // boolean or string
	Description string   `json:"description"`
}

type Spec

type Spec struct {
	ID               string            `json:"id"`
	Version          string            `json:"version"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	DocumentationURL string            `json:"documentationURL"`
	LicenseURL       string            `json:"licenseURL"`
	Keywords         []string          `json:"keywords"`
	Options          map[string]Option `json:"options"`
	ContainerEnv     map[string]string `json:"containerEnv"`

	InstallScriptPath string `json:"-"`
}

func Extract

func Extract(fs billy.Filesystem, directory, reference string) (*Spec, error)

Extract unpacks the feature from the image and returns the parsed specification.

func (*Spec) Compile

func (s *Spec) Compile(options map[string]any) (string, error)

Extract unpacks the feature from the image and returns a set of lines that should be appended to a Dockerfile to install the feature.

Jump to

Keyboard shortcuts

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