azureblob

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlobService

func GetBlobService(config *Config) (azblob.ServiceURL, error)

Types

type Client

type Client struct {
	Config *Config
	// contains filtered or unexported fields
}

Client azure blob storage

func New

func New(config *Config) *Client

func (Client) Delete

func (client Client) Delete(path string) error

func (Client) DeleteBlob

func (client Client) DeleteBlob(blobName *string) error

func (Client) DownloadBlob

func (client Client) DownloadBlob(blobName *string) (*azblob.DownloadResponse, error)

func (Client) Get

func (client Client) Get(path string) (file *os.File, err error)

func (Client) GetEndpoint

func (client Client) GetEndpoint() string

func (Client) GetListBlob

func (client Client) GetListBlob() ([][]azblob.BlobItemInternal, error)

func (Client) GetStream

func (client Client) GetStream(path string) (io.ReadCloser, error)

func (Client) GetURL

func (client Client) GetURL(path string) (string, error)

func (Client) List

func (client Client) List(path string) ([]*oss.Object, error)

func (Client) Put

func (client Client) Put(urlPath string, reader io.Reader) (*oss.Object, error)

func (Client) ToRelativePath

func (client Client) ToRelativePath(urlPath string) string

ToRelativePath process path to relative path

func (Client) UploadBlob

func (client Client) UploadBlob(blobName *string, blobType *string, data io.ReadSeeker) (azblob.BlockBlobURL, error)

type Config

type Config struct {
	AccessId  string //Account Name
	AccessKey string //Access Keys
	Region    string
	Bucket    string //Container Name
	Endpoint  string //endpoint
}

Jump to

Keyboard shortcuts

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