blobstorage

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_BS_URL_EXPIRY_TIME = 15 // 15 minutes

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobInfo

type BlobInfo struct {
	Name         string
	FileURL      string
	LastModified time.Time
}

type BlobInterface

type BlobInterface interface {
	GetBlobClient() *azblob.Client
	ListBlobs(ctx context.Context, containerName string) ([]*BlobInfo, error)
	UploadBlobBuffer(ctx context.Context, blobName, containerName string, data []byte) error
	UploadBlobStream(ctx context.Context, blobName, containerName string, data io.Reader) error
	UploadFile(ctx context.Context, blobName, containerName string, blobSize int) error
	DownloadBlob(ctx context.Context, blobInfo BlobInfo, containerName string) (*azblob.DownloadStreamResponse, error)
	DownloadFile(ctx context.Context, blobInfo BlobInfo, containerName string) error
	WriteToFile(blobName string, response azblob.DownloadStreamResponse) error
	GetSasUrl(blobName, containerName string) (string, error)
}

func New

func New(conf *config.Config) BlobInterface

Jump to

Keyboard shortcuts

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