artifact

package
v3.57.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAzureBlobPath

func IsAzureBlobPath(loc string) bool

IsAzureBlobPath reports if the location is an Azure Blob Storage path.

func NewAzureBlobClient

func NewAzureBlobClient(l logger.Logger, storageAccountName string) (*service.Client, error)

NewAzureBlobClient creates a new Azure Blob Storage client.

Types

type AzureBlobDownloader

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

AzureBlobDownloader downloads files from Azure Blob storage.

func NewAzureBlobDownloader

func NewAzureBlobDownloader(l logger.Logger, c AzureBlobDownloaderConfig) *AzureBlobDownloader

NewAzureBlobDownloader creates a new AzureBlobDownloader.

func (*AzureBlobDownloader) Start

func (d *AzureBlobDownloader) Start(ctx context.Context) error

Start starts the download.

type AzureBlobDownloaderConfig

type AzureBlobDownloaderConfig struct {
	Path        string
	Repository  string
	Destination string
	Retries     int
	DebugHTTP   bool
}

AzureBlobUploaderConfig configures AzureBlobDownloader.

type AzureBlobLocation

type AzureBlobLocation struct {
	StorageAccountName string
	ContainerName      string
	BlobPath           string
}

AzureBlobLocation specifies the location of a blob in Azure Blob Storage.

func ParseAzureBlobLocation

func ParseAzureBlobLocation(loc string) (*AzureBlobLocation, error)

ParseAzureBlobLocation parses a URL into an Azure Blob Storage location.

func (*AzureBlobLocation) String

func (l *AzureBlobLocation) String() string

String returns the location as a URL string.

func (*AzureBlobLocation) URL

func (l *AzureBlobLocation) URL(blob string) string

URL returns an Azure Blob Storage URL for the blob.

type AzureBlobUploader

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

AzureBlobUploader uploads artifacts to Azure Blob Storage.

func NewAzureBlobUploader

func NewAzureBlobUploader(l logger.Logger, c AzureBlobUploaderConfig) (*AzureBlobUploader, error)

NewAzureBlobUploader creates a new AzureBlobUploader.

func (*AzureBlobUploader) URL

func (u *AzureBlobUploader) URL(artifact *api.Artifact) string

URL returns the full destination URL of an artifact.

func (*AzureBlobUploader) Upload

func (u *AzureBlobUploader) Upload(ctx context.Context, artifact *api.Artifact) error

Upload uploads an artifact file.

type AzureBlobUploaderConfig

type AzureBlobUploaderConfig struct {
	// The destination which includes the storage account name and the path.
	// For example, "https://my-storage-account.blob.core.windows.net/my-container/my-virtual-directory/artifacts-go-here/"
	Destination string
}

AzureBlobUploaderConfig configures AzureBlobUploader.

Jump to

Keyboard shortcuts

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