azure

package
v0.12.8 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidContainerName = errors.New("invalid container name")
)

Functions

This section is empty.

Types

type BlobService

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

func NewBlobService

func NewBlobService(accountName, accountKey string) (*BlobService, error)

func (*BlobService) DeleteByUrl

func (b *BlobService) DeleteByUrl(ctx context.Context, fullUrl string) error

func (*BlobService) EnsureContainer

func (b *BlobService) EnsureContainer(ctx context.Context, container string) (*azblob.ContainerURL, error)

EnsureContainer always attempts to create the container and will not return any error if it already exists. Otherwise it will create the container and cache it. Either way, it will be cached because it is a time-wise expensive op.

If you only want to upload a file to a container, see UploadInContainer() below.

func (*BlobService) GetNewServiceURL

func (b *BlobService) GetNewServiceURL() azblob.ServiceURL

func (*BlobService) IsFileExists

func (b *BlobService) IsFileExists(fullUrl string) (bool, error)

func (*BlobService) UploadInContainer

func (b *BlobService) UploadInContainer(ctx context.Context, container, filename, contentType string, data io.ReadSeeker) (*url.URL, error)

Jump to

Keyboard shortcuts

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