Documentation ¶
Overview ¶
Package archive provides the logic for Gatecheck Bundles
Index ¶
- Constants
- func TarGzipBundle(dst io.Writer, bundle *Bundle) (int64, error)
- func UntarGzipBundle(src io.Reader, bundle *Bundle) error
- type Bundle
- func (b *Bundle) Add(content []byte, label string, tags []string)
- func (b *Bundle) AddFrom(r io.Reader, label string, properties map[string]string) error
- func (b *Bundle) Content() string
- func (b *Bundle) Delete(label string)deprecated
- func (b *Bundle) FileBytes(fileLabel string) []byte
- func (b *Bundle) FileSize(fileLabel string) int
- func (b *Bundle) Manifest() Manifest
- func (b *Bundle) Remove(label string)
- func (b *Bundle) WriteFileTo(w io.Writer, fileLabel string) (int64, error)
- type BundleDecoderdeprecated
- func NewBundleDecoder() *BundleDecoderdeprecated
- type BundleEncoder
- type Manifest
Constants ¶
const BundleVersion = "1"
BundleVersion the version support by this archive format
const DefaultBundleFilename = "gatecheck-bundle.tar.gz"
DefaultBundleFilename the bundle name to be used as a default
const FileType = "Gatecheck Bundle"
FileType in plain text
const ManifestFilename = "gatecheck-manifest.json"
ManifestFilename the file name to be used as a default
Variables ¶
This section is empty.
Functions ¶
func TarGzipBundle ¶ added in v0.4.0
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle uses tar and gzip to collect reports and files into a single file
type BundleDecoder
deprecated
BundleDecoder is used to decode bundle objects from a reader
Deprecated: Use TarGzipBundle function instead
func NewBundleDecoder
deprecated
func NewBundleDecoder() *BundleDecoder
NewBundleDecoder ...
Deprecated: Use TarGzipBundle function instead
func (*BundleDecoder) Decode
deprecated
func (d *BundleDecoder) Decode() (any, error)
Decode will gunzip and untar the bundle into an object, follows generic decoder pattern
Deprecated: Use TarGzipBundle function instead
func (*BundleDecoder) DecodeFrom
deprecated
func (d *BundleDecoder) DecodeFrom(r io.Reader) (any, error)
DecodeFrom a bundle object
Deprecated: Use TarGzipBundle function instead
func (*BundleDecoder) FileType
deprecated
func (d *BundleDecoder) FileType() string
FileType in plain text
Deprecated: Use TarGzipBundle function instead
type BundleEncoder ¶
type BundleEncoder struct {
// contains filtered or unexported fields
}
BundleEncoder is used to write bundles to io.Writer
func NewBundleEncoder
deprecated
func NewBundleEncoder(w io.Writer) *BundleEncoder
NewBundleEncoder ...
Deprecated: Use TarGzipBundle function instead
func (*BundleEncoder) Encode
deprecated
func (b *BundleEncoder) Encode(bundle *Bundle) error
Encode to the internal writer
Deprecated: Use TarGzipBundle function instead