client

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzBlobstore

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

func New

func New(storageClient StorageClient) (AzBlobstore, error)

func (*AzBlobstore) Copy

func (client *AzBlobstore) Copy(srcBlob string, dstBlob string) error

func (*AzBlobstore) Delete

func (client *AzBlobstore) Delete(dest string) error

func (*AzBlobstore) DeleteRecursive

func (client *AzBlobstore) DeleteRecursive(prefix string) error

func (*AzBlobstore) EnsureStorageExists

func (client *AzBlobstore) EnsureStorageExists() error

func (*AzBlobstore) Exists

func (client *AzBlobstore) Exists(dest string) (bool, error)

func (*AzBlobstore) Get

func (client *AzBlobstore) Get(source string, dest string) error

func (*AzBlobstore) List

func (client *AzBlobstore) List(prefix string) ([]string, error)

func (*AzBlobstore) Properties

func (client *AzBlobstore) Properties(dest string) error

func (*AzBlobstore) Put

func (client *AzBlobstore) Put(sourceFilePath string, dest string) error

func (*AzBlobstore) Sign

func (client *AzBlobstore) Sign(dest string, action string, expiration time.Duration) (string, error)

type BlobProperties

type BlobProperties struct {
	ETag          string    `json:"etag,omitempty"`
	LastModified  time.Time `json:"last_modified,omitempty"`
	ContentLength int64     `json:"content_length,omitempty"`
}

type DefaultStorageClient

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

func (DefaultStorageClient) Copy

func (dsc DefaultStorageClient) Copy(
	srcBlob string,
	destBlob string,
) error

func (DefaultStorageClient) Delete

func (dsc DefaultStorageClient) Delete(
	dest string,
) error

func (DefaultStorageClient) DeleteRecursive

func (dsc DefaultStorageClient) DeleteRecursive(
	prefix string,
) error

func (DefaultStorageClient) Download

func (dsc DefaultStorageClient) Download(
	source string,
	dest *os.File,
) error

func (DefaultStorageClient) EnsureContainerExists

func (dsc DefaultStorageClient) EnsureContainerExists() error

func (DefaultStorageClient) Exists

func (dsc DefaultStorageClient) Exists(
	dest string,
) (bool, error)

func (DefaultStorageClient) List

func (dsc DefaultStorageClient) List(
	prefix string,
) ([]string, error)

func (DefaultStorageClient) Properties

func (dsc DefaultStorageClient) Properties(
	dest string,
) error

func (DefaultStorageClient) SignedUrl

func (dsc DefaultStorageClient) SignedUrl(
	requestType string,
	dest string,
	expiration time.Duration,
) (string, error)

func (DefaultStorageClient) Upload

func (dsc DefaultStorageClient) Upload(
	source io.ReadSeekCloser,
	dest string,
) ([]byte, error)

func (DefaultStorageClient) UploadStream

func (dsc DefaultStorageClient) UploadStream(
	source io.ReadSeekCloser,
	dest string,
) error

type StorageClient

type StorageClient interface {
	Upload(
		source io.ReadSeekCloser,
		dest string,
	) ([]byte, error)

	UploadStream(
		source io.ReadSeekCloser,
		dest string,
	) error

	Download(
		source string,
		dest *os.File,
	) error

	Copy(
		srcBlob string,
		destBlob string,
	) error

	Delete(
		dest string,
	) error

	DeleteRecursive(
		dest string,
	) error

	Exists(
		dest string,
	) (bool, error)

	SignedUrl(
		requestType string,
		dest string,
		expiration time.Duration,
	) (string, error)

	List(
		prefix string,
	) ([]string, error)
	Properties(
		dest string,
	) error
	EnsureContainerExists() error
}

func NewStorageClient

func NewStorageClient(storageConfig config.AZStorageConfig) (StorageClient, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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