zipartifacts

package
v8.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusNotZip = 10 + iota
	StatusEntryNotFound
)

These are exit codes used by subprocesses in cmd/gitlab-zip-xxx

View Source
const MetadataHeader = "GitLab Build Artifacts Metadata 0.0.2\n"
View Source
const MetadataHeaderPrefix = "\x00\x00\x00&" // length of string below, encoded properly

Variables

View Source
var ErrArchiveNotFound = errors.New("archive not found")

ErrArchiveNotFound will be used when the file can't be found

View Source
var ErrNotAZip = errors.New("not a zip")

ErrNotAZip will be used when the file is not a zip archive

Functions

func DecodeFileEntry

func DecodeFileEntry(entry string) (string, error)

func GenerateZipMetadata

func GenerateZipMetadata(w io.Writer, archive *zip.Reader) error

func OpenArchive

func OpenArchive(ctx context.Context, archivePath string) (*zip.Reader, error)

OpenArchive will open a zip.Reader from a local path or a remote object store URL in case of remote url it will make use of ranged requestes to support seeking. If the path do not exists error will be ErrArchiveNotFound, if the file isn't a zip archive error will be ErrNotAZip

Types

This section is empty.

Jump to

Keyboard shortcuts

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