componentarchive

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArchiveOutputFormatUsage = fmt.Sprintf("archive format of the component archive. Can be %q or %q",
	ctf.ArchiveFormatTar, ctf.ArchiveFormatTarGzip)
View Source
var DefaultOutputFormatUsage = fmt.Sprintf("output format of the component archive. Can be %q, %q or %q",
	ctf.ArchiveFormatFilesystem, ctf.ArchiveFormatTar, ctf.ArchiveFormatTarGzip)

DefaultOutputFormatUsage defines the default usage string for output format flag.

Functions

func NewOutputFormatValue

func NewOutputFormatValue(p *ctf.ArchiveFormat, def ctf.ArchiveFormat) pflag.Value

func OutputFormatVar

func OutputFormatVar(fs *pflag.FlagSet, p *ctf.ArchiveFormat, name string, value ctf.ArchiveFormat, usage string)

func OutputFormatVarP

func OutputFormatVarP(fs *pflag.FlagSet, p *ctf.ArchiveFormat, name, shorthand string, value ctf.ArchiveFormat, usage string)

func Parse

Parse parses a component archive from a given path. It automatically detects the archive format. Supported formats are fs, tar or tgz

func ValidateOutputFormat

func ValidateOutputFormat(value ctf.ArchiveFormat, ignoreEmpty bool) error

ValidateOutputFormat validates the outpu format

func Write

func Write(fs vfs.FileSystem, path string, ca *ctf.ComponentArchive, format ctf.ArchiveFormat) error

Write writes the given component archive to the filesystem with the format.

Types

type BuilderOptions

type BuilderOptions struct {
	ComponentArchivePath string

	Name                 string
	Version              string
	BaseUrl              string
	ComponentNameMapping string

	Overwrite bool
}

func (*BuilderOptions) AddFlags

func (o *BuilderOptions) AddFlags(fs *pflag.FlagSet)

func (*BuilderOptions) Build

Build creates a component archives with the given configuration

func (*BuilderOptions) Default

func (o *BuilderOptions) Default()

Default applies defaults to the builder options

func (*BuilderOptions) Validate

func (o *BuilderOptions) Validate() error

Validate validates the component archive builder options.

type OutputFormatValue

type OutputFormatValue ctf.ArchiveFormat

func (*OutputFormatValue) Set

func (f *OutputFormatValue) Set(s string) error

func (*OutputFormatValue) String

func (f *OutputFormatValue) String() string

func (*OutputFormatValue) Type

func (f *OutputFormatValue) Type() string

Jump to

Keyboard shortcuts

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