gs

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMultipartObjects = 10000
)
View Source
const MaxPartsInCompose = 32

Variables

View Source
var (
	ErrMismatchPartETag    = errors.New("mismatch part ETag")
	ErrMismatchPartName    = errors.New("mismatch part name")
	ErrMaxMultipartObjects = errors.New("maximum multipart object reached")
	ErrPartListMismatch    = errors.New("multipart part list mismatch")
	ErrMissingTargetAttrs  = errors.New("missing target attributes")
)

Functions

func ComposeAll

func ComposeAll(target string, parts []string, composeFunc ComposeFunc) (*storage.ObjectAttrs, error)

func WithDisablePreSigned added in v0.94.0

func WithDisablePreSigned(b bool) func(a *Adapter)

func WithDisablePreSignedUI added in v0.97.0

func WithDisablePreSignedUI(b bool) func(a *Adapter)

func WithPreSignedExpiry added in v0.92.0

func WithPreSignedExpiry(v time.Duration) func(a *Adapter)

func WithServerSideEncryptionCustomerSupplied added in v1.26.0

func WithServerSideEncryptionCustomerSupplied(value []byte) func(a *Adapter)

func WithServerSideEncryptionKmsKeyID added in v1.26.0

func WithServerSideEncryptionKmsKeyID(s string) func(a *Adapter)

Types

type Adapter

type Adapter struct {
	ServerSideEncryptionCustomerSupplied []byte
	ServerSideEncryptionKmsKeyID         string
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(client *storage.Client, opts ...AdapterOption) *Adapter

func (*Adapter) AbortMultiPartUpload

func (a *Adapter) AbortMultiPartUpload(ctx context.Context, obj block.ObjectPointer, uploadID string) error

func (*Adapter) BlockstoreMetadata added in v1.26.0

func (a *Adapter) BlockstoreMetadata(ctx context.Context) (*block.BlockstoreMetadata, error)

func (*Adapter) BlockstoreType

func (a *Adapter) BlockstoreType() string

func (*Adapter) Close

func (a *Adapter) Close() error

func (*Adapter) CompleteMultiPartUpload

func (a *Adapter) CompleteMultiPartUpload(ctx context.Context, obj block.ObjectPointer, uploadID string, multipartList *block.MultipartUploadCompletion) (*block.CompleteMultiPartUploadResponse, error)

func (*Adapter) Copy

func (a *Adapter) Copy(ctx context.Context, sourceObj, destinationObj block.ObjectPointer) error

func (*Adapter) Exists

func (a *Adapter) Exists(ctx context.Context, obj block.ObjectPointer) (bool, error)

func (*Adapter) Get

func (*Adapter) GetPreSignedURL added in v0.90.0

func (a *Adapter) GetPreSignedURL(ctx context.Context, obj block.ObjectPointer, mode block.PreSignMode) (string, time.Time, error)

func (*Adapter) GetPresignUploadPartURL added in v1.7.0

func (a *Adapter) GetPresignUploadPartURL(_ context.Context, _ block.ObjectPointer, _ string, _ int) (string, error)

func (*Adapter) GetProperties

func (a *Adapter) GetProperties(ctx context.Context, obj block.ObjectPointer) (block.Properties, error)

func (*Adapter) GetRange

func (a *Adapter) GetRange(ctx context.Context, obj block.ObjectPointer, startPosition int64, endPosition int64) (io.ReadCloser, error)

func (*Adapter) GetRegion added in v1.26.0

func (a *Adapter) GetRegion(_ context.Context, _ string) (string, error)

func (*Adapter) GetStorageNamespaceInfo

func (a *Adapter) GetStorageNamespaceInfo() block.StorageNamespaceInfo

func (*Adapter) GetWalker added in v0.97.0

func (a *Adapter) GetWalker(uri *url.URL) (block.Walker, error)

func (*Adapter) ListParts added in v1.19.0

func (*Adapter) Put

func (a *Adapter) Put(ctx context.Context, obj block.ObjectPointer, sizeBytes int64, reader io.Reader, _ block.PutOpts) error

func (*Adapter) Remove

func (a *Adapter) Remove(ctx context.Context, obj block.ObjectPointer) error

func (*Adapter) ResolveNamespace added in v0.97.0

func (a *Adapter) ResolveNamespace(storageNamespace, key string, identifierType block.IdentifierType) (block.QualifiedKey, error)

func (*Adapter) RuntimeStats added in v0.41.1

func (a *Adapter) RuntimeStats() map[string]string

func (*Adapter) UploadCopyPart

func (a *Adapter) UploadCopyPart(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, uploadID string, partNumber int) (*block.UploadPartResponse, error)

func (*Adapter) UploadCopyPartRange

func (a *Adapter) UploadCopyPartRange(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, uploadID string, partNumber int, startPosition, endPosition int64) (*block.UploadPartResponse, error)

func (*Adapter) UploadPart

func (a *Adapter) UploadPart(ctx context.Context, obj block.ObjectPointer, sizeBytes int64, reader io.Reader, uploadID string, partNumber int) (*block.UploadPartResponse, error)

type AdapterOption added in v1.26.0

type AdapterOption func(a *Adapter)

type ComposeFunc

type ComposeFunc func(target string, parts []string) (*storage.ObjectAttrs, error)

type GCSWalker added in v0.97.0

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

func NewGCSWalker added in v0.97.0

func NewGCSWalker(client *storage.Client) *GCSWalker

func (*GCSWalker) GetSkippedEntries added in v0.98.0

func (w *GCSWalker) GetSkippedEntries() []block.ObjectStoreEntry

func (*GCSWalker) Marker added in v0.97.0

func (w *GCSWalker) Marker() block.Mark

func (*GCSWalker) Walk added in v0.97.0

func (w *GCSWalker) Walk(ctx context.Context, storageURI *url.URL, op block.WalkOptions, walkFn func(e block.ObjectStoreEntry) error) error

Jump to

Keyboard shortcuts

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