azure

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBuffers = 1

	BlobEndpointDefaultDomain = "blob.core.windows.net"
	BlobEndpointChinaDomain   = "blob.core.chinacloudapi.cn"
	BlobEndpointUSGovDomain   = "blob.core.usgovcloudapi.net"
	BlobEndpointTestDomain    = "azurite.test"
)
View Source
const DirectoryBlobMetadataKey = "hdi_isfolder"
View Source
const UDCCacheExpiry = time.Hour
View Source
const UDCCacheWorkaroundDivider = 2

Variables

View Source
var ErrAzureInvalidURL = errors.New("invalid Azure storage URL")
View Source
var ErrEmptyBuffer = errors.New("BufferManager returned a 0 size buffer, this is a bug in the manager")
View Source
var (
	ErrInvalidDomain = errors.New("invalid Azure Domain")
)

Functions

func BuildAzureServiceClient added in v0.91.0

func BuildAzureServiceClient(params params.Azure) (*service.Client, error)

func ExtractStorageAccount added in v0.91.0

func ExtractStorageAccount(storageAccount *url.URL) (string, error)

func ParseURL added in v1.19.0

func ParseURL(uri *url.URL) (accountName string, domain string, err error)

ParseURL - parses url and extracts account name and domain. If either are not found returns an error

Types

type Adapter

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

func NewAdapter

func NewAdapter(ctx context.Context, params params.Azure) (*Adapter, error)

func (*Adapter) AbortMultiPartUpload

func (a *Adapter) AbortMultiPartUpload(_ context.Context, _ block.ObjectPointer, _ string) error

func (*Adapter) BlockstoreType

func (a *Adapter) BlockstoreType() string

func (*Adapter) CompleteMultiPartUpload

func (a *Adapter) CompleteMultiPartUpload(ctx context.Context, obj block.ObjectPointer, _ string, multipartList *block.MultipartUploadCompletion) (*block.CompleteMultiPartUploadResponse, error)

func (*Adapter) Copy

func (a *Adapter) Copy(ctx context.Context, sourceObj, destinationObj block.ObjectPointer) error

func (*Adapter) Download

func (a *Adapter) Download(ctx context.Context, obj block.ObjectPointer, offset, count int64) (io.ReadCloser, error)

func (*Adapter) Exists

func (a *Adapter) Exists(ctx context.Context, obj block.ObjectPointer) (bool, error)

func (*Adapter) Get

func (*Adapter) GetPreSignedURL added in v0.90.0

func (a *Adapter) GetPreSignedURL(ctx context.Context, obj block.ObjectPointer, mode block.PreSignMode) (string, time.Time, error)

func (*Adapter) GetPresignUploadPartURL added in v1.7.0

func (a *Adapter) GetPresignUploadPartURL(_ context.Context, _ block.ObjectPointer, _ string, _ int) (string, error)

func (*Adapter) GetProperties

func (a *Adapter) GetProperties(ctx context.Context, obj block.ObjectPointer) (block.Properties, error)

func (*Adapter) GetRange

func (a *Adapter) GetRange(ctx context.Context, obj block.ObjectPointer, startPosition int64, endPosition int64) (io.ReadCloser, error)

func (*Adapter) GetStorageNamespaceInfo

func (a *Adapter) GetStorageNamespaceInfo() block.StorageNamespaceInfo

func (*Adapter) GetWalker added in v0.97.0

func (a *Adapter) GetWalker(uri *url.URL) (block.Walker, error)

func (*Adapter) ListParts added in v1.19.0

func (*Adapter) Put

func (a *Adapter) Put(ctx context.Context, obj block.ObjectPointer, sizeBytes int64, reader io.Reader, opts block.PutOpts) error

func (*Adapter) Remove

func (a *Adapter) Remove(ctx context.Context, obj block.ObjectPointer) error

func (*Adapter) ResolveNamespace added in v0.97.0

func (a *Adapter) ResolveNamespace(storageNamespace, key string, identifierType block.IdentifierType) (block.QualifiedKey, error)

func (*Adapter) RuntimeStats added in v0.41.1

func (a *Adapter) RuntimeStats() map[string]string

func (*Adapter) UploadCopyPart

func (a *Adapter) UploadCopyPart(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, _ string, _ int) (*block.UploadPartResponse, error)

func (*Adapter) UploadCopyPartRange

func (a *Adapter) UploadCopyPartRange(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, _ string, _ int, startPosition, endPosition int64) (*block.UploadPartResponse, error)

func (*Adapter) UploadPart

func (a *Adapter) UploadPart(ctx context.Context, obj block.ObjectPointer, _ int64, reader io.Reader, _ string, _ int) (*block.UploadPartResponse, error)

type BlobURLInfo

type BlobURLInfo struct {
	StorageAccountName string
	ContainerURL       string
	ContainerName      string
	BlobURL            string
	Host               string
}

func ResolveBlobURLInfoFromURL added in v0.90.0

func ResolveBlobURLInfoFromURL(pathURL *url.URL) (BlobURLInfo, error)

type ClientCache added in v0.92.0

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

func NewCache added in v0.91.0

func NewCache(p params.Azure) (*ClientCache, error)

func (*ClientCache) NewContainerClient added in v0.92.0

func (c *ClientCache) NewContainerClient(storageAccount, containerName string) (*container.Client, error)

func (*ClientCache) NewServiceClient added in v0.92.0

func (c *ClientCache) NewServiceClient(storageAccount string) (*service.Client, error)

func (*ClientCache) NewUDC added in v0.92.0

func (c *ClientCache) NewUDC(ctx context.Context, storageAccount string, expiry *time.Time) (*service.UserDelegationCredential, error)

type DataLakeWalker added in v0.97.5

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

func NewAzureDataLakeWalker added in v0.97.5

func NewAzureDataLakeWalker(svc *service.Client, skipOutOfOrder bool) (*DataLakeWalker, error)

func (*DataLakeWalker) GetSkippedEntries added in v0.98.0

func (a *DataLakeWalker) GetSkippedEntries() []block.ObjectStoreEntry

func (*DataLakeWalker) Marker added in v0.97.5

func (a *DataLakeWalker) Marker() block.Mark

func (*DataLakeWalker) Walk added in v0.97.5

func (a *DataLakeWalker) Walk(ctx context.Context, storageURI *url.URL, op block.WalkOptions, walkFn func(e block.ObjectStoreEntry) error) error

type MultipartBlockWriter

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

func NewMultipartBlockWriter

func NewMultipartBlockWriter(reader *block.HashingReader, containerURL container.Client, objName string) *MultipartBlockWriter

func (*MultipartBlockWriter) CommitBlockList

func (*MultipartBlockWriter) StageBlock

func (*MultipartBlockWriter) Upload added in v0.90.0

type PrefixURLInfo

type PrefixURLInfo struct {
	StorageAccountName string
	ContainerURL       string
	ContainerName      string
	Prefix             string
}

Jump to

Keyboard shortcuts

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