client

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 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 AliBlobstore

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

func New

func New(storageClient StorageClient) (AliBlobstore, error)

func (*AliBlobstore) Copy

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

func (*AliBlobstore) Delete

func (client *AliBlobstore) Delete(object string) error

func (*AliBlobstore) DeleteRecursive

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

func (*AliBlobstore) EnsureStorageExists

func (client *AliBlobstore) EnsureStorageExists() error

func (*AliBlobstore) Exists

func (client *AliBlobstore) Exists(object string) (bool, error)

func (*AliBlobstore) Get

func (client *AliBlobstore) Get(sourceObject string, dest string) error

func (*AliBlobstore) List

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

func (*AliBlobstore) Properties

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

func (*AliBlobstore) Put

func (client *AliBlobstore) Put(sourceFilePath string, destinationObject string) error

func (*AliBlobstore) Sign

func (client *AliBlobstore) Sign(object 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(sourceObject string, destinationObject string) error

func (DefaultStorageClient) Delete

func (dsc DefaultStorageClient) Delete(object string) error

func (DefaultStorageClient) DeleteRecursive

func (dsc DefaultStorageClient) DeleteRecursive(prefix string) error

func (DefaultStorageClient) Download

func (dsc DefaultStorageClient) Download(sourceObject string, destinationFilePath string) error

func (DefaultStorageClient) EnsureBucketExists

func (dsc DefaultStorageClient) EnsureBucketExists() error

func (DefaultStorageClient) Exists

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

func (DefaultStorageClient) List

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

func (DefaultStorageClient) Properties

func (dsc DefaultStorageClient) Properties(object string) error

func (DefaultStorageClient) SignedUrlGet

func (dsc DefaultStorageClient) SignedUrlGet(object string, expiredInSec int64) (string, error)

func (DefaultStorageClient) SignedUrlPut

func (dsc DefaultStorageClient) SignedUrlPut(object string, expiredInSec int64) (string, error)

func (DefaultStorageClient) Upload

func (dsc DefaultStorageClient) Upload(sourceFilePath string, sourceFileMD5 string, destinationObject string) error

type StorageClient

type StorageClient interface {
	Upload(
		sourceFilePath string,
		sourceFileMD5 string,
		destinationObject string,
	) error

	Download(
		sourceObject string,
		destinationFilePath string,
	) error

	Copy(
		srcBlob string,
		destBlob string,
	) error

	Delete(
		object string,
	) error

	DeleteRecursive(
		objects string,
	) error

	Exists(
		object string,
	) (bool, error)

	SignedUrlPut(
		object string,
		expiredInSec int64,
	) (string, error)

	SignedUrlGet(
		object string,
		expiredInSec int64,
	) (string, error)

	List(
		prefix string,
	) ([]string, error)

	Properties(
		object string,
	) error

	EnsureBucketExists() error
}

func NewStorageClient

func NewStorageClient(storageConfig config.AliStorageConfig) (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