Documentation
¶
Index ¶
- Variables
- func NewOutputFormatValue(p *ctf.ArchiveFormat, def ctf.ArchiveFormat) pflag.Value
- func OutputFormatVar(fs *pflag.FlagSet, p *ctf.ArchiveFormat, name string, value ctf.ArchiveFormat, ...)
- func OutputFormatVarP(fs *pflag.FlagSet, p *ctf.ArchiveFormat, name, shorthand string, ...)
- func Parse(fs vfs.FileSystem, path string) (*ctf.ComponentArchive, ctf.ArchiveFormat, error)
- func ValidateOutputFormat(value ctf.ArchiveFormat, ignoreEmpty bool) error
- func Write(fs vfs.FileSystem, path string, ca *ctf.ComponentArchive, ...) error
- type BuilderOptions
- type OutputFormatValue
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 ¶
func Parse(fs vfs.FileSystem, path string) (*ctf.ComponentArchive, ctf.ArchiveFormat, error)
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 ¶
func (o *BuilderOptions) Build(fs vfs.FileSystem) (*ctf.ComponentArchive, error)
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
Click to show internal directories.
Click to hide internal directories.