Documentation ¶
Index ¶
- Constants
- Variables
- func BuildBundle(reader base.Reader, opt ...v1.ManifestOption) (base.Bundle, error)
- func Checksum(raw []byte) string
- func NewDirReader(path string) base.Reader
- func NewFSReader(path string, fsys fs.FS) base.Reader
- func NewTarGzReader(path string, r io.Reader) (base.Reader, error)
- func NewTarGzWriter(w io.Writer) base.Writer
- func ReadBundle(reader base.Reader) (base.Bundle, error)
- type Bundle
- type DirReader
- type FSReader
- type FileProducer
- type Manifest
- type Reader
- type TarGzReader
- type TarGzWriter
- type Writer
Constants ¶
View Source
const ( ARCHIVE base.SourceType = "archive" DIRECTORY base.SourceType = "directory" )
Variables ¶
View Source
var ErrManifestNotRegular = errors.New("manifest.json not a regular file")
View Source
var ErrMissingManifest = errors.New("missing manifest.json")
View Source
var ErrUnableToReadManifest = errors.New("unable to read manifest.json")
View Source
var ErrUnrecognizedBundleFormatVersion = errors.New("unrecognized bundle format version")
Functions ¶
func BuildBundle ¶
func NewDirReader ¶
Types ¶
type DirReader ¶
type DirReader struct {
// contains filtered or unexported fields
}
func (*DirReader) Info ¶
func (r *DirReader) Info() base.SourceInfo
type FSReader ¶
type FSReader struct {
// contains filtered or unexported fields
}
func (*FSReader) Info ¶
func (r *FSReader) Info() base.SourceInfo
type FileProducer ¶
func (*FileProducer) Info ¶
func (p *FileProducer) Info() base.SourceInfo
func (*FileProducer) Produce ¶
func (p *FileProducer) Produce(consumer base.FileConsumer) error
type TarGzReader ¶
type TarGzReader struct {
// contains filtered or unexported fields
}
func (*TarGzReader) Info ¶
func (r *TarGzReader) Info() base.SourceInfo
func (*TarGzReader) WalkFiles ¶
func (r *TarGzReader) WalkFiles(handler base.WalkFilesFunc) error
type TarGzWriter ¶
type TarGzWriter struct {
// contains filtered or unexported fields
}
func (*TarGzWriter) Write ¶
func (w *TarGzWriter) Write(b Bundle) error
Click to show internal directories.
Click to hide internal directories.