Documentation ¶
Index ¶
- type ACLEntity
- type ACLHandle
- type ACLRole
- type ACLRule
- type BucketAttrs
- type BucketAttrsToUpdate
- type BucketHandle
- type BucketIterator
- type Client
- type Composer
- type Conditions
- type Copier
- type Notification
- type ObjectAttrs
- type ObjectAttrsToUpdate
- type ObjectHandle
- type ObjectIterator
- type Query
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketAttrs ¶
type BucketAttrs = storage.BucketAttrs
type BucketAttrsToUpdate ¶
type BucketAttrsToUpdate = storage.BucketAttrsToUpdate
type BucketHandle ¶
type BucketHandle interface { Create(context.Context, string, *BucketAttrs) error Delete(context.Context) error DefaultObjectACL() ACLHandle Object(string) ObjectHandle Attrs(context.Context) (*BucketAttrs, error) Update(context.Context, BucketAttrsToUpdate) (*BucketAttrs, error) If(storage.BucketConditions) BucketHandle Objects(context.Context, *Query) ObjectIterator ACL() ACLHandle IAM() *iam.Handle UserProject(projectID string) BucketHandle Notifications(context.Context) (map[string]*Notification, error) AddNotification(context.Context, *Notification) (*Notification, error) DeleteNotification(context.Context, string) error LockRetentionPolicy(context.Context) error }
type BucketIterator ¶
type Client ¶
type Client interface { Bucket(name string) BucketHandle Buckets(ctx context.Context, projectID string) BucketIterator Close() error }
func NewClient ¶
NewClient creates a new Google Cloud Storage client. The default scope is ScopeFullControl. To use a different scope, like ScopeReadOnly, use option.WithScopes.
Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.
You may configure the client by passing in options from the google.golang.org/api/option package. You may also use options defined in this package, such as [WithJSONReads].
type Composer ¶
type Composer interface { ObjectAttrs() *ObjectAttrs Run(context.Context) (*ObjectAttrs, error) }
type Conditions ¶
type Conditions = storage.Conditions
type Copier ¶
type Copier interface { ObjectAttrs() *ObjectAttrs SetRewriteToken(string) SetProgressFunc(func(uint64, uint64)) SetDestinationKMSKeyName(string) Run(context.Context) (*ObjectAttrs, error) }
type Notification ¶
type Notification = storage.Notification
type ObjectAttrs ¶
type ObjectAttrs = storage.ObjectAttrs
type ObjectAttrsToUpdate ¶
type ObjectAttrsToUpdate = storage.ObjectAttrsToUpdate
type ObjectHandle ¶
type ObjectHandle interface { ACL() ACLHandle Generation(int64) ObjectHandle If(Conditions) ObjectHandle Key([]byte) ObjectHandle ReadCompressed(bool) ObjectHandle Attrs(context.Context) (*ObjectAttrs, error) Update(context.Context, ObjectAttrsToUpdate) (*ObjectAttrs, error) NewReader(context.Context) (Reader, error) NewRangeReader(context.Context, int64, int64) (Reader, error) NewWriter(context.Context) Writer Delete(context.Context) error CopierFrom(ObjectHandle) Copier ComposerFrom(...ObjectHandle) Composer }
type ObjectIterator ¶
type ObjectIterator interface { Next() (*storage.ObjectAttrs, error) PageInfo() *iterator.PageInfo }
type Writer ¶
type Writer interface { io.WriteCloser ObjectAttrs() *ObjectAttrs SetChunkSize(int) SetProgressFunc(func(int64)) SetCRC32C(uint32) CloseWithError(err error) error Attrs() *storage.ObjectAttrs }
Click to show internal directories.
Click to hide internal directories.