manifest

package
v0.0.0-...-b94449b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package manifest contains functions to save and load manifests.

Manifests are pre-"compiled" collections of scripts, templates, and files that can be read and written to and from disk, and can also be compiled and executed on a host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(m *Manifest, destDir string) (string, error)

func SaveDir

func SaveDir(dir string, m *Manifest) error

Types

type Manifest

type Manifest struct {
	Metadata   *Metadata            `json:"metadata,omitempty"`
	Main       string               `json:"main,omitempty"`
	MainScript []byte               `json:"main_script,omitempty"`
	Plans      map[string]*Manifest `json:"plans,omitempty"`
	Files      map[string][]byte    `json:"files,omitempty"`
	Templates  map[string][]byte    `json:"templates,omitempty"`
	Vars       map[string][]byte    `json:"vars,omitempty"`
	Secrets    map[string][]byte    `json:"secrets,omitempty"`
}

func LoadArchive

func LoadArchive(r io.Reader) (*Manifest, error)

func LoadDir

func LoadDir(dir string) (*Manifest, error)

func LoadFS

func LoadFS(mfs fs.FS) (*Manifest, error)

func LoadFile

func LoadFile(name string) (*Manifest, error)

func (*Manifest) Validate

func (m *Manifest) Validate() error

type Metadata

type Metadata struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

Jump to

Keyboard shortcuts

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