features

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 16 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"`

	Directory string `json:"-"`
}

func Extract

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

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

func (*Spec) Compile

func (s *Spec) Compile(containerUser, remoteUser string, 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