Documentation
¶
Index ¶
- type ArtefactManager
- func (m *ArtefactManager[M, D, L, C]) DownloadAllJobArtefacts(ctx context.Context, jobName string, outputDirectory string) error
- func (m *ArtefactManager[M, D, L, C]) DownloadAllJobArtefactsWithTree(ctx context.Context, jobName string, maintainTreeStructure bool, ...) (err error)
- func (m *ArtefactManager[M, D, L, C]) DownloadJobArtefact(ctx context.Context, jobName string, outputDirectory string, artefactManager M) (err error)
- func (m *ArtefactManager[M, D, L, C]) DownloadJobArtefactFromLink(ctx context.Context, jobName string, outputDirectory string, ...) error
- func (m *ArtefactManager[M, D, L, C]) DownloadJobArtefactFromLinkWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, ...) (err error)
- func (m *ArtefactManager[M, D, L, C]) DownloadJobArtefactWithTree(ctx context.Context, jobName string, maintainTreeLocation bool, ...) (err error)
- func (m *ArtefactManager[M, D, L, C]) ListJobArtefacts(ctx context.Context, jobName string) (pagination.IPaginatorAndPageFetcher, error)
- type FollowLinkToArtefactManagersPageFunc
- type GetArtefactContentFunc
- type GetArtefactManagerFunc
- type GetArtefactManagersFirstPageFunc
- type IArtefactManager
- type ICollection
- type ILinkData
- type ILinks
- type IManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtefactManager ¶
type ArtefactManager[ M IManager, D ILinkData, L ILinks[D], C ICollection[D, L], ] struct { // contains filtered or unexported fields }
func (*ArtefactManager[M, D, L, C]) DownloadAllJobArtefacts ¶ added in v1.8.0
func (*ArtefactManager[M, D, L, C]) DownloadAllJobArtefactsWithTree ¶ added in v1.10.0
func (*ArtefactManager[M, D, L, C]) DownloadJobArtefact ¶
func (*ArtefactManager[M, D, L, C]) DownloadJobArtefactFromLink ¶ added in v1.8.0
func (*ArtefactManager[M, D, L, C]) DownloadJobArtefactFromLinkWithTree ¶ added in v1.10.0
func (*ArtefactManager[M, D, L, C]) DownloadJobArtefactWithTree ¶ added in v1.10.0
func (*ArtefactManager[M, D, L, C]) ListJobArtefacts ¶ added in v1.8.0
func (m *ArtefactManager[M, D, L, C]) ListJobArtefacts(ctx context.Context, jobName string) (pagination.IPaginatorAndPageFetcher, error)
type FollowLinkToArtefactManagersPageFunc ¶ added in v1.8.0
type FollowLinkToArtefactManagersPageFunc[D ILinkData, L ILinks[D], C ICollection[D, L]] = func(ctx context.Context, link D) (C, *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[M IManager] = func(ctx context.Context, job, artefact string) (M, *http.Response, error)
GetArtefactManagerFunc is a function which retrieves information about an artefact manager.
type GetArtefactManagersFirstPageFunc ¶ added in v1.8.0
type GetArtefactManagersFirstPageFunc[D ILinkData, L ILinks[D], C ICollection[D, L]] = func(ctx context.Context, job string) (C, *http.Response, error)
GetArtefactManagersFirstPageFunc defines the function which can retrieve the first page of artefact managers.
type IArtefactManager ¶
type IArtefactManager[ M IManager, D ILinkData, ] 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 D) 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 D) 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 M) 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 M) 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[ M IManager, D ILinkData, L ILinks[D], C ICollection[D, L], ]( getArtefactManagersFirstPage GetArtefactManagersFirstPageFunc[D, L, C], getArtefactsManagersPage FollowLinkToArtefactManagersPageFunc[D, L, C], getArtefactManager GetArtefactManagerFunc[M], getOutputArtefact GetArtefactContentFunc) IArtefactManager[M, D]
NewArtefactManager returns an artefact manager.
type ICollection ¶ added in v1.14.0
type ICollection[D ILinkData, L ILinks[D]] interface { comparable pagination.IStaticPage GetLinksOk() (L, bool) }
type ILinkData ¶ added in v1.14.0
type ILinkData interface { comparable GetName() string GetHref() string }
type ILinks ¶ added in v1.14.0
type ILinks[D ILinkData] interface { comparable GetNextP() D HasNext() bool }
Click to show internal directories.
Click to hide internal directories.