gcs

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLHandle

type ACLHandle interface {
	// Delete ...
	Delete(context.Context, storage.ACLEntity) error
	// Set ...
	Set(context.Context, storage.ACLEntity, storage.ACLRole) error
	// List ...
	List(context.Context) ([]storage.ACLRule, error)
	// contains filtered or unexported methods
}

ACLHandle ...

type BucketHandle

type BucketHandle interface {
	// Create ...
	Create(context.Context, string, *storage.BucketAttrs) error
	// Delete ...
	Delete(context.Context) error
	// DefaultObjectACL ...
	DefaultObjectACL() ACLHandle
	// Object ...
	Object(string) ObjectHandle
	// Attrs ...
	Attrs(context.Context) (*storage.BucketAttrs, error)
	// Update ...
	Update(context.Context, storage.BucketAttrsToUpdate) (*storage.BucketAttrs, error)
	// If ...
	If(storage.BucketConditions) BucketHandle
	// Objects ...
	Objects(context.Context, *storage.Query) ObjectIterator
	// ACL ...
	ACL() ACLHandle
	// IAM ...
	IAM() *iam.Handle
	// UserProject ...
	UserProject(projectID string) BucketHandle
	// Notifications ...
	Notifications(context.Context) (map[string]*storage.Notification, error)
	// AddNotification ...
	AddNotification(context.Context, *storage.Notification) (*storage.Notification, error)
	// DeleteNotification ...
	DeleteNotification(context.Context, string) error
	// LockRetentionPolicy ...
	LockRetentionPolicy(context.Context) error
	// contains filtered or unexported methods
}

BucketHandle ...

type BucketIterator

type BucketIterator interface {
	// SetPrefix ...
	SetPrefix(string)
	// Next ...
	Next() (*storage.BucketAttrs, error)
	// PageInfo ...
	PageInfo() *iterator.PageInfo
	// contains filtered or unexported methods
}

BucketIterator ...

type Client

type Client interface {
	// Bucket ...
	Bucket(name string) BucketHandle
	// Buckets ...
	Buckets(ctx context.Context, projectID string) BucketIterator
	// Close ...
	Close() error
	// contains filtered or unexported methods
}

Client is storage clint interface for google cloud storage SDK

func AdaptClient

func AdaptClient(c *storage.Client) Client

AdaptClient adapts a storage.Client so that it satisfies the Client interface.

type Composer

type Composer interface {
	// ObjectAttrs ...
	ObjectAttrs() *storage.ObjectAttrs
	// Run ...
	Run(context.Context) (*storage.ObjectAttrs, error)
	// contains filtered or unexported methods
}

Composer ...

type Copier

type Copier interface {
	// ObjectAttrs ...
	ObjectAttrs() *storage.ObjectAttrs
	// SetRewriteToken ...
	SetRewriteToken(string)
	// SetProgressFunc ...
	SetProgressFunc(func(uint64, uint64))
	// SetDestinationKMSKeyName ...
	SetDestinationKMSKeyName(string)
	// Run ...
	Run(context.Context) (*storage.ObjectAttrs, error)
	// contains filtered or unexported methods
}

Copier ...

type ObjectHandle

type ObjectHandle interface {
	// ACL ...
	ACL() ACLHandle
	// Generation ...
	Generation(int64) ObjectHandle
	// If ...
	If(storage.Conditions) ObjectHandle
	// Key ...
	Key([]byte) ObjectHandle
	// ReadCompressed ...
	ReadCompressed(bool) ObjectHandle
	// Attrs ...
	Attrs(context.Context) (*storage.ObjectAttrs, error)
	// Update ...
	Update(context.Context, storage.ObjectAttrsToUpdate) (*storage.ObjectAttrs, error)
	// NewReader ...
	NewReader(context.Context) (Reader, error)
	// NewRangeReader ...
	NewRangeReader(context.Context, int64, int64) (Reader, error)
	// NewWriter ...
	NewWriter(context.Context) Writer
	// Delete ...
	Delete(context.Context) error
	// CopierFrom ...
	CopierFrom(ObjectHandle) Copier
	// ComoserFrom ...
	ComposerFrom(...ObjectHandle) Composer
	// contains filtered or unexported methods
}

ObjectHandle ...

type ObjectIterator

type ObjectIterator interface {
	// Next ...
	Next() (*storage.ObjectAttrs, error)
	// PageInfo ...
	PageInfo() *iterator.PageInfo
	// contains filtered or unexported methods
}

ObjectIterator ...

type Reader

type Reader interface {
	io.ReadCloser
	// Size ...
	Size() int64
	// Remain ...
	Remain() int64
	// ContentType ...
	ContentType() string
	// ContentEncoding ...
	ContentEncoding() string
	// CacheControl ...
	CacheControl() string
	// contains filtered or unexported methods
}

Reader ...

type Writer

type Writer interface {
	io.WriteCloser
	// ObjectAttrs ...
	ObjectAttrs() *storage.ObjectAttrs
	// SetChunkSize ...
	SetChunkSize(int)
	// SetProgressFunc ...
	SetProgressFunc(func(int64))
	// SetCRC32C ...
	SetCRC32C(uint32) // Sets both CRC32C and SendCRC32C.
	// CloseWithError ...
	CloseWithError(err error) error
	// Attrs ...
	Attrs() *storage.ObjectAttrs
	// contains filtered or unexported methods
}

Writer ...

Jump to

Keyboard shortcuts

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