artefacts

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtefactManager

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

func (*ArtefactManager) DownloadAllJobArtefacts added in v1.8.0

func (m *ArtefactManager) DownloadAllJobArtefacts(ctx context.Context, jobName string, outputDirectory string) error

func (*ArtefactManager) DownloadAllJobArtefactsWithTree added in v1.10.0

func (m *ArtefactManager) DownloadAllJobArtefactsWithTree(ctx context.Context, jobName string, maintainTreeStructure bool, outputDirectory string) (err error)

func (*ArtefactManager) DownloadJobArtefact

func (m *ArtefactManager) DownloadJobArtefact(ctx context.Context, jobName string, outputDirectory string, artefactManager *client.ArtefactManagerItem) (err error)
func (m *ArtefactManager) DownloadJobArtefactFromLink(ctx context.Context, jobName string, outputDirectory string, artefactManagerItemLink *client.HalLinkData) error

func (*ArtefactManager) DownloadJobArtefactFromLinkWithTree added in v1.10.0

func (m *ArtefactManager) DownloadJobArtefactFromLinkWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, outputDirectory string, artefactManagerItemLink *client.HalLinkData) (err error)

func (*ArtefactManager) DownloadJobArtefactWithTree added in v1.10.0

func (m *ArtefactManager) DownloadJobArtefactWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, outputDirectory string, artefactManager *client.ArtefactManagerItem) (err error)

func (*ArtefactManager) ListJobArtefacts added in v1.8.0

func (m *ArtefactManager) ListJobArtefacts(ctx context.Context, jobName string) (pagination.IPaginatorAndPageFetcher, error)

type FollowLinkToArtefactManagersPageFunc added in v1.8.0

type FollowLinkToArtefactManagersPageFunc = func(ctx context.Context, link *client.HalLinkData) (*client.ArtefactManagerCollection, *http.Response, error)

FollowLinkToArtefactManagersPageFunc is a function able to follow a link to an artefact manager page.

type GetArtefactContentFunc added in v1.8.0

type GetArtefactContentFunc = func(ctx context.Context, job, artefactID string) (*os.File, *http.Response, error)

GetArtefactContentFunc is a function able to return the content of any artefact managers.

type GetArtefactManagerFunc added in v1.8.0

type GetArtefactManagerFunc = func(ctx context.Context, job, artefact string) (*client.ArtefactManagerItem, *http.Response, error)

GetArtefactManagerFunc is a function which retrieves information about an artefact manager.

type GetArtefactManagersFirstPageFunc added in v1.8.0

type GetArtefactManagersFirstPageFunc = func(ctx context.Context, job string) (*client.ArtefactManagerCollection, *http.Response, error)

GetArtefactManagersFirstPageFunc defines the function which can retrieve the first page of artefact managers.

type IArtefactManager

type IArtefactManager interface {
	// DownloadJobArtefactFromLink downloads a specific artefact into the output directory from a particular link. The artefact will be placed at the root of the output directory.
	DownloadJobArtefactFromLink(ctx context.Context, jobName string, outputDirectory string, artefactManagerItemLink *client.HalLinkData) error
	// DownloadJobArtefactFromLinkWithTree downloads a specific artefact into the output directory from a particular link.
	// maintainTreeLocation specifies whether the artefact will be placed in a tree structure or if it will be flat.
	DownloadJobArtefactFromLinkWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, outputDirectory string, artefactManagerItemLink *client.HalLinkData) error
	// DownloadJobArtefact downloads a specific artefact into the output directory. The artefact will be placed at the root of the output directory.
	DownloadJobArtefact(ctx context.Context, jobName string, outputDirectory string, artefactManager *client.ArtefactManagerItem) error
	// DownloadJobArtefactWithTree downloads a specific artefact into the output directory.
	// maintainTreeLocation specifies whether the artefact will be placed in a tree structure or if it will be flat.
	DownloadJobArtefactWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, outputDirectory string, artefactManager *client.ArtefactManagerItem) error
	// ListJobArtefacts lists all artefact managers associated with a particular job.
	ListJobArtefacts(ctx context.Context, jobName string) (pagination.IPaginatorAndPageFetcher, error)
	// DownloadAllJobArtefacts downloads all the artefacts produced for a particular job and puts them in an output directory as a flat list.
	DownloadAllJobArtefacts(ctx context.Context, jobName string, outputDirectory string) error
	// DownloadAllJobArtefactsWithTree downloads all the artefacts produced for a particular job and puts them in an output directory.
	// maintainTreeStructure specifies whether to keep the tree structure of the artefacts or not in the output directory.
	DownloadAllJobArtefactsWithTree(ctx context.Context, jobName string, maintainTreeStructure bool, outputDirectory string) error
}

func NewArtefactManager

func NewArtefactManager(getArtefactManagersFirstPage GetArtefactManagersFirstPageFunc, getArtefactsManagersPage FollowLinkToArtefactManagersPageFunc, getArtefactManager GetArtefactManagerFunc, getOutputArtefact GetArtefactContentFunc) IArtefactManager

NewArtefactManager returns an artefact manager.

Jump to

Keyboard shortcuts

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