artifact

package
v0.0.0-...-a3532f1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	SaveToWriter(w io.Writer) error
	LoadFromReader(r io.ReadCloser) error
	ExtractToDirectory(dir string) error
	AddFile(virtualPath string, filePath string, content []byte) error
	ListFiles() ([]string, error)
	GetName() string
}

func New

func New(artifactName string) Artifact

func NewFromTarGz

func NewFromTarGz(tarGzFilePath string) (Artifact, error)

func NewWithPaths

func NewWithPaths(artifactName string, paths []string) (Artifact, error)

type TarGzArtifact

type TarGzArtifact struct {
	// contains filtered or unexported fields
}

func (*TarGzArtifact) AddFile

func (a *TarGzArtifact) AddFile(virtualPath string, filePath string, content []byte) error

AddFile adds a file to the artifact

func (*TarGzArtifact) ExtractToDirectory

func (a *TarGzArtifact) ExtractToDirectory(outputDir string) error

func (*TarGzArtifact) GetName

func (a *TarGzArtifact) GetName() string

func (*TarGzArtifact) ListFiles

func (a *TarGzArtifact) ListFiles() ([]string, error)

func (*TarGzArtifact) LoadFromReader

func (a *TarGzArtifact) LoadFromReader(reader io.ReadCloser) error

func (*TarGzArtifact) SaveToWriter

func (a *TarGzArtifact) SaveToWriter(writer io.Writer) error

Jump to

Keyboard shortcuts

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