build

package
v0.0.81 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package build implements tools and function to build mindpaks. The main builder is build.Packer that writes the bundles to archives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitOptions

type InitOptions struct {
	*mindpak.Metadata
	Path string
}

InitOptions are used when initializing a new bundle directory.

func (*InitOptions) Validate

func (opts *InitOptions) Validate() error

Validate checks the initializer options

type Packer

type Packer struct{}

Packer handles writing the bundles to archives on disk.

func NewPacker

func NewPacker() *Packer

NewPacker returns a new packer object with the default options

func (*Packer) InitBundle

func (_ *Packer) InitBundle(opts *InitOptions) (*mindpak.Bundle, error)

InitBundle creates a new bundle manifest in a directory with minder data in the expected structure.

func (*Packer) Write

func (_ *Packer) Write(bundle *mindpak.Bundle, w io.Writer) error

Write writes a bundle archive to writer w

func (*Packer) WriteToFile

func (p *Packer) WriteToFile(bundle *mindpak.Bundle, path string) error

WriteToFile writes the bundle to a file on disk.

Jump to

Keyboard shortcuts

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