client

package
v0.0.87 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 14 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) Delete

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

func (*AzBlobstore) Exists

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

func (*AzBlobstore) Get

func (client *AzBlobstore) Get(source string, dest *os.File) 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 DefaultStorageClient

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

func (DefaultStorageClient) Delete

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

func (DefaultStorageClient) Download

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

func (DefaultStorageClient) Exists

func (dsc DefaultStorageClient) Exists(
	dest string,
) (bool, 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)

type StorageClient

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

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

	Delete(
		dest string,
	) error

	Exists(
		dest string,
	) (bool, error)

	SignedUrl(
		requestType string,
		dest string,
		expiration time.Duration,
	) (string, 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