Movatterモバイル変換


[0]ホーム

URL:


storage

package
v0.257.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:14Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package storage provides access to the Cloud Storage JSON API.

This package is DEPRECATED. Use package cloud.google.com/go/storage instead.

For product documentation, see:https://developers.google.com/storage/docs/json_api/

Creating a client

Usage example:

import "google.golang.org/api/storage/v1beta1"...ctx := context.Background()storageService, err := storage.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

storageService, err := storage.NewService(ctx, option.WithScopes(storage.DevstorageReadWriteScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

storageService, err := storage.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)storageService, err := storage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seehttps://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (// Manage your data and permissions in Google Cloud StorageDevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"// View your data in Google Cloud StorageDevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"// Manage your data in Google Cloud StorageDevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeBucket

type Bucket struct {// Acl: Access controls on the bucket.Acl []*BucketAccessControl `json:"acl,omitempty"`// DefaultObjectAcl: Default access controls to apply to new objects// when no ACL is provided.DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"`// Id: The name of the bucket.Idstring `json:"id,omitempty"`// Kind: The kind of item this is. For buckets, this is always// storage#bucket.Kindstring `json:"kind,omitempty"`// Location: The location of the bucket. Object data for objects in the// bucket resides in physical storage in this location. Can be US or EU.// Defaults to US.Locationstring `json:"location,omitempty"`// Owner: The owner of the bucket. This will always be the project// team's owner group.Owner *BucketOwner `json:"owner,omitempty"`// ProjectId: The project the bucket belongs to.ProjectIduint64 `json:"projectId,omitempty,string"`// SelfLink: The URI of this bucket.SelfLinkstring `json:"selfLink,omitempty"`// TimeCreated: Creation time of the bucket inRFC 3339 format.TimeCreatedstring `json:"timeCreated,omitempty"`// Website: The bucket's website configuration.Website *BucketWebsite `json:"website,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Acl") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Acl") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Bucket: A bucket.

func (*Bucket)MarshalJSON

func (s *Bucket) MarshalJSON() ([]byte,error)

typeBucketAccessControl

type BucketAccessControl struct {// Bucket: The name of the bucket.Bucketstring `json:"bucket,omitempty"`// Domain: The domain associated with the entity, if any.Domainstring `json:"domain,omitempty"`// Email: The email address associated with the entity, if any.Emailstring `json:"email,omitempty"`// Entity: The entity holding the permission, in one of the following// forms:// - user-userId// - user-email// - group-groupId// - group-email// - domain-domain// - allUsers// - allAuthenticatedUsers Examples:// - The user liz@example.com would be user-liz@example.com.// - The group example@googlegroups.com would be// group-example@googlegroups.com.// - To refer to all members of the Google Apps for Business domain// example.com, the entity would be domain-example.com.Entitystring `json:"entity,omitempty"`// EntityId: The ID for the entity, if any.EntityIdstring `json:"entityId,omitempty"`// Id: The ID of the access-control entry.Idstring `json:"id,omitempty"`// Kind: The kind of item this is. For bucket access control entries,// this is always storage#bucketAccessControl.Kindstring `json:"kind,omitempty"`// Role: The access permission for the entity. Can be READER, WRITER, or// OWNER.Rolestring `json:"role,omitempty"`// SelfLink: The link to this access-control entry.SelfLinkstring `json:"selfLink,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Bucket") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Bucket") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

BucketAccessControl: An access-control entry.

func (*BucketAccessControl)MarshalJSON

func (s *BucketAccessControl) MarshalJSON() ([]byte,error)

typeBucketAccessControls

type BucketAccessControls struct {// Items: The list of items.Items []*BucketAccessControl `json:"items,omitempty"`// Kind: The kind of item this is. For lists of bucket access control// entries, this is always storage#bucketAccessControls.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

BucketAccessControls: An access-control list.

func (*BucketAccessControls)MarshalJSON

func (s *BucketAccessControls) MarshalJSON() ([]byte,error)

typeBucketAccessControlsDeleteCall

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

func (*BucketAccessControlsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsDeleteCall)Do

Do executes the "storage.bucketAccessControls.delete" call.

func (*BucketAccessControlsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsDeleteCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeBucketAccessControlsGetCall

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

func (*BucketAccessControlsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsGetCall)Do

Do executes the "storage.bucketAccessControls.get" call.Exactly one of *BucketAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*BucketAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*BucketAccessControlsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketAccessControlsGetCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeBucketAccessControlsInsertCall

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

func (*BucketAccessControlsInsertCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsInsertCall)Do

Do executes the "storage.bucketAccessControls.insert" call.Exactly one of *BucketAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*BucketAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*BucketAccessControlsInsertCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsInsertCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeBucketAccessControlsListCall

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

func (*BucketAccessControlsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsListCall)Do

Do executes the "storage.bucketAccessControls.list" call.Exactly one of *BucketAccessControls or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*BucketAccessControls.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*BucketAccessControlsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsListCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketAccessControlsListCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeBucketAccessControlsPatchCall

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

func (*BucketAccessControlsPatchCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsPatchCall)Do

Do executes the "storage.bucketAccessControls.patch" call.Exactly one of *BucketAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*BucketAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*BucketAccessControlsPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsPatchCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeBucketAccessControlsService

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

funcNewBucketAccessControlsService

func NewBucketAccessControlsService(s *Service) *BucketAccessControlsService

func (*BucketAccessControlsService)Delete

Delete: Deletes the ACL entry for the specified entity on thespecified bucket.

func (*BucketAccessControlsService)Get

Get: Returns the ACL entry for the specified entity on the specifiedbucket.

func (*BucketAccessControlsService)Insert

Insert: Creates a new ACL entry on the specified bucket.

func (*BucketAccessControlsService)List

List: Retrieves ACL entries on the specified bucket.

func (*BucketAccessControlsService)Patch

Patch: Updates an ACL entry on the specified bucket. This methodsupports patch semantics.

func (*BucketAccessControlsService)Update

Update: Updates an ACL entry on the specified bucket.

typeBucketAccessControlsUpdateCall

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

func (*BucketAccessControlsUpdateCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketAccessControlsUpdateCall)Do

Do executes the "storage.bucketAccessControls.update" call.Exactly one of *BucketAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*BucketAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*BucketAccessControlsUpdateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketAccessControlsUpdateCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeBucketOwner

type BucketOwner struct {// Entity: The entity, in the form group-groupId.Entitystring `json:"entity,omitempty"`// EntityId: The ID for the entity.EntityIdstring `json:"entityId,omitempty"`// ForceSendFields is a list of field names (e.g. "Entity") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Entity") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

BucketOwner: The owner of the bucket. This will always be the projectteam's owner group.

func (*BucketOwner)MarshalJSON

func (s *BucketOwner) MarshalJSON() ([]byte,error)

typeBucketWebsite

type BucketWebsite struct {// MainPageSuffix: Behaves as the bucket's directory index where missing// objects are treated as potential directories.MainPageSuffixstring `json:"mainPageSuffix,omitempty"`// NotFoundPage: The custom object to return when a requested resource// is not found.NotFoundPagestring `json:"notFoundPage,omitempty"`// ForceSendFields is a list of field names (e.g. "MainPageSuffix") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "MainPageSuffix") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}

BucketWebsite: The bucket's website configuration.

func (*BucketWebsite)MarshalJSON

func (s *BucketWebsite) MarshalJSON() ([]byte,error)

typeBuckets

type Buckets struct {// Items: The list of items.Items []*Bucket `json:"items,omitempty"`// Kind: The kind of item this is. For lists of buckets, this is always// storage#buckets.Kindstring `json:"kind,omitempty"`// NextPageToken: The continuation token, used to page through large// result sets. Provide this value in a subsequent request to return the// next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Buckets: A list of buckets.

func (*Buckets)MarshalJSON

func (s *Buckets) MarshalJSON() ([]byte,error)

typeBucketsDeleteCall

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

func (*BucketsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsDeleteCall)Do

Do executes the "storage.buckets.delete" call.

func (*BucketsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsDeleteCall)Header

func (c *BucketsDeleteCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeBucketsGetCall

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

func (*BucketsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsGetCall)Do

Do executes the "storage.buckets.get" call.Exactly one of *Bucket or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Bucket.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*BucketsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsGetCall)Header

func (c *BucketsGetCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketsGetCall)IfNoneMatch

func (c *BucketsGetCall) IfNoneMatch(entityTagstring) *BucketsGetCall

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*BucketsGetCall)Projection

func (c *BucketsGetCall) Projection(projectionstring) *BucketsGetCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl.

Possible values:

"full" - Include all properties."no_acl" - Omit acl and defaultObjectAcl properties.

typeBucketsInsertCall

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

func (*BucketsInsertCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsInsertCall)Do

Do executes the "storage.buckets.insert" call.Exactly one of *Bucket or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Bucket.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*BucketsInsertCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsInsertCall)Header

func (c *BucketsInsertCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketsInsertCall)Projection

func (c *BucketsInsertCall) Projection(projectionstring) *BucketsInsertCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl, unless the bucket resourcespecifies acl or defaultObjectAcl properties, when it defaults tofull.

Possible values:

"full" - Include all properties."no_acl" - Omit acl and defaultObjectAcl properties.

typeBucketsListCall

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

func (*BucketsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsListCall)Do

Do executes the "storage.buckets.list" call.Exactly one of *Buckets or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Buckets.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*BucketsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsListCall)Header

func (c *BucketsListCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketsListCall)IfNoneMatch

func (c *BucketsListCall) IfNoneMatch(entityTagstring) *BucketsListCall

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*BucketsListCall)MaxResults

func (c *BucketsListCall) MaxResults(maxResultsint64) *BucketsListCall

MaxResults sets the optional parameter "max-results": Maximum numberof buckets to return.

func (*BucketsListCall)PageToken

func (c *BucketsListCall) PageToken(pageTokenstring) *BucketsListCall

PageToken sets the optional parameter "pageToken": Apreviously-returned page token representing part of the larger set ofresults to view.

func (*BucketsListCall)Pages

func (c *BucketsListCall) Pages(ctxcontext.Context, f func(*Buckets)error)error

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

func (*BucketsListCall)Projection

func (c *BucketsListCall) Projection(projectionstring) *BucketsListCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl.

Possible values:

"full" - Include all properties."no_acl" - Omit acl and defaultObjectAcl properties.

typeBucketsPatchCall

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

func (*BucketsPatchCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsPatchCall)Do

Do executes the "storage.buckets.patch" call.Exactly one of *Bucket or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Bucket.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*BucketsPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsPatchCall)Header

func (c *BucketsPatchCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketsPatchCall)Projection

func (c *BucketsPatchCall) Projection(projectionstring) *BucketsPatchCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to full.

Possible values:

"full" - Include all properties."no_acl" - Omit acl and defaultObjectAcl properties.

typeBucketsService

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

funcNewBucketsService

func NewBucketsService(s *Service) *BucketsService

func (*BucketsService)Delete

func (r *BucketsService) Delete(bucketstring) *BucketsDeleteCall

Delete: Deletes an empty bucket.

func (*BucketsService)Get

func (r *BucketsService) Get(bucketstring) *BucketsGetCall

Get: Returns metadata for the specified bucket.

func (*BucketsService)Insert

func (r *BucketsService) Insert(bucket *Bucket) *BucketsInsertCall

Insert: Creates a new bucket.

func (*BucketsService)List

func (r *BucketsService) List(projectIduint64) *BucketsListCall

List: Retrieves a list of buckets for a given project.

func (*BucketsService)Patch

func (r *BucketsService) Patch(bucketstring, bucket2 *Bucket) *BucketsPatchCall

Patch: Updates a bucket. This method supports patch semantics.

func (*BucketsService)Update

func (r *BucketsService) Update(bucketstring, bucket2 *Bucket) *BucketsUpdateCall

Update: Updates a bucket.

typeBucketsUpdateCall

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

func (*BucketsUpdateCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*BucketsUpdateCall)Do

Do executes the "storage.buckets.update" call.Exactly one of *Bucket or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Bucket.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*BucketsUpdateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*BucketsUpdateCall)Header

func (c *BucketsUpdateCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*BucketsUpdateCall)Projection

func (c *BucketsUpdateCall) Projection(projectionstring) *BucketsUpdateCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to full.

Possible values:

"full" - Include all properties."no_acl" - Omit acl and defaultObjectAcl properties.

typeObject

type Object struct {// Acl: Access controls on the object.Acl []*ObjectAccessControl `json:"acl,omitempty"`// Bucket: The bucket containing this object.Bucketstring `json:"bucket,omitempty"`// CacheControl: Cache-Control directive for the object data.CacheControlstring `json:"cacheControl,omitempty"`// ContentDisposition: Content-Disposition of the object data.ContentDispositionstring `json:"contentDisposition,omitempty"`// ContentEncoding: Content-Encoding of the object data.ContentEncodingstring `json:"contentEncoding,omitempty"`// ContentLanguage: Content-Language of the object data.ContentLanguagestring `json:"contentLanguage,omitempty"`// Id: The ID of the object.Idstring `json:"id,omitempty"`// Kind: The kind of item this is. For objects, this is always// storage#object.Kindstring `json:"kind,omitempty"`// Media: Object media data. Provided on your behalf when uploading raw// media or multipart/related with an auxiliary media part.Media *ObjectMedia `json:"media,omitempty"`// Metadata: User-provided metadata, in key/value pairs.Metadata map[string]string `json:"metadata,omitempty"`// Name: The name of this object. Required if not specified by URL// parameter.Namestring `json:"name,omitempty"`// Owner: The owner of the object. This will always be the uploader of// the object.Owner *ObjectOwner `json:"owner,omitempty"`// SelfLink: The link to this object.SelfLinkstring `json:"selfLink,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Acl") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Acl") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Object: An object.

func (*Object)MarshalJSON

func (s *Object) MarshalJSON() ([]byte,error)

typeObjectAccessControl

type ObjectAccessControl struct {// Bucket: The name of the bucket.Bucketstring `json:"bucket,omitempty"`// Domain: The domain associated with the entity, if any.Domainstring `json:"domain,omitempty"`// Email: The email address associated with the entity, if any.Emailstring `json:"email,omitempty"`// Entity: The entity holding the permission, in one of the following// forms:// - user-userId// - user-email// - group-groupId// - group-email// - domain-domain// - allUsers// - allAuthenticatedUsers Examples:// - The user liz@example.com would be user-liz@example.com.// - The group example@googlegroups.com would be// group-example@googlegroups.com.// - To refer to all members of the Google Apps for Business domain// example.com, the entity would be domain-example.com.Entitystring `json:"entity,omitempty"`// EntityId: The ID for the entity, if any.EntityIdstring `json:"entityId,omitempty"`// Id: The ID of the access-control entry.Idstring `json:"id,omitempty"`// Kind: The kind of item this is. For object access control entries,// this is always storage#objectAccessControl.Kindstring `json:"kind,omitempty"`// Object: The name of the object.Objectstring `json:"object,omitempty"`// Role: The access permission for the entity. Can be READER or OWNER.Rolestring `json:"role,omitempty"`// SelfLink: The link to this access-control entry.SelfLinkstring `json:"selfLink,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Bucket") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Bucket") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ObjectAccessControl: An access-control entry.

func (*ObjectAccessControl)MarshalJSON

func (s *ObjectAccessControl) MarshalJSON() ([]byte,error)

typeObjectAccessControls

type ObjectAccessControls struct {// Items: The list of items.Items []*ObjectAccessControl `json:"items,omitempty"`// Kind: The kind of item this is. For lists of object access control// entries, this is always storage#objectAccessControls.Kindstring `json:"kind,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ObjectAccessControls: An access-control list.

func (*ObjectAccessControls)MarshalJSON

func (s *ObjectAccessControls) MarshalJSON() ([]byte,error)

typeObjectAccessControlsDeleteCall

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

func (*ObjectAccessControlsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsDeleteCall)Do

Do executes the "storage.objectAccessControls.delete" call.

func (*ObjectAccessControlsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsDeleteCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeObjectAccessControlsGetCall

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

func (*ObjectAccessControlsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsGetCall)Do

Do executes the "storage.objectAccessControls.get" call.Exactly one of *ObjectAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ObjectAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ObjectAccessControlsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectAccessControlsGetCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeObjectAccessControlsInsertCall

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

func (*ObjectAccessControlsInsertCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsInsertCall)Do

Do executes the "storage.objectAccessControls.insert" call.Exactly one of *ObjectAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ObjectAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ObjectAccessControlsInsertCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsInsertCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeObjectAccessControlsListCall

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

func (*ObjectAccessControlsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsListCall)Do

Do executes the "storage.objectAccessControls.list" call.Exactly one of *ObjectAccessControls or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ObjectAccessControls.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ObjectAccessControlsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsListCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectAccessControlsListCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeObjectAccessControlsPatchCall

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

func (*ObjectAccessControlsPatchCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsPatchCall)Do

Do executes the "storage.objectAccessControls.patch" call.Exactly one of *ObjectAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ObjectAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ObjectAccessControlsPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsPatchCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeObjectAccessControlsService

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

funcNewObjectAccessControlsService

func NewObjectAccessControlsService(s *Service) *ObjectAccessControlsService

func (*ObjectAccessControlsService)Delete

Delete: Deletes the ACL entry for the specified entity on thespecified object.

func (*ObjectAccessControlsService)Get

Get: Returns the ACL entry for the specified entity on the specifiedobject.

func (*ObjectAccessControlsService)Insert

Insert: Creates a new ACL entry on the specified object.

func (*ObjectAccessControlsService)List

List: Retrieves ACL entries on the specified object.

func (*ObjectAccessControlsService)Patch

func (r *ObjectAccessControlsService) Patch(bucketstring, objectstring, entitystring, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall

Patch: Updates an ACL entry on the specified object. This methodsupports patch semantics.

func (*ObjectAccessControlsService)Update

func (r *ObjectAccessControlsService) Update(bucketstring, objectstring, entitystring, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsUpdateCall

Update: Updates an ACL entry on the specified object.

typeObjectAccessControlsUpdateCall

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

func (*ObjectAccessControlsUpdateCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectAccessControlsUpdateCall)Do

Do executes the "storage.objectAccessControls.update" call.Exactly one of *ObjectAccessControl or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ObjectAccessControl.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ObjectAccessControlsUpdateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectAccessControlsUpdateCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeObjectMedia

type ObjectMedia struct {// Algorithm: Hash algorithm used. Currently only MD5 is supported.// Required if a hash is provided.Algorithmstring `json:"algorithm,omitempty"`// ContentType: Content-Type of the object data.ContentTypestring `json:"contentType,omitempty"`// Data: URL-safe Base64-encoded data. This property can be used to// insert objects under 64KB in size, and will only be returned in// response to the get method for objects so created. When this resource// is returned in response to the list method, this property is omitted.Datastring `json:"data,omitempty"`// Hash: Hash of the data. Required if a hash algorithm is provided.Hashstring `json:"hash,omitempty"`// Length: Content-Length of the data in bytes.Lengthuint64 `json:"length,omitempty,string"`// Link: Media download link.Linkstring `json:"link,omitempty"`// TimeCreated: Creation time of the data inRFC 3339 format.TimeCreatedstring `json:"timeCreated,omitempty"`// ForceSendFields is a list of field names (e.g. "Algorithm") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Algorithm") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ObjectMedia: Object media data. Provided on your behalf whenuploading raw media or multipart/related with an auxiliary mediapart.

func (*ObjectMedia)MarshalJSON

func (s *ObjectMedia) MarshalJSON() ([]byte,error)

typeObjectOwner

type ObjectOwner struct {// Entity: The entity, in the form user-userId.Entitystring `json:"entity,omitempty"`// EntityId: The ID for the entity.EntityIdstring `json:"entityId,omitempty"`// ForceSendFields is a list of field names (e.g. "Entity") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Entity") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ObjectOwner: The owner of the object. This will always be theuploader of the object.

func (*ObjectOwner)MarshalJSON

func (s *ObjectOwner) MarshalJSON() ([]byte,error)

typeObjects

type Objects struct {// Items: The list of items.Items []*Object `json:"items,omitempty"`// Kind: The kind of item this is. For lists of objects, this is always// storage#objects.Kindstring `json:"kind,omitempty"`// NextPageToken: The continuation token, used to page through large// result sets. Provide this value in a subsequent request to return the// next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// Prefixes: The list of prefixes of objects matching-but-not-listed up// to and including the requested delimiter.Prefixes []string `json:"prefixes,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Items") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Items") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Objects: A list of objects.

func (*Objects)MarshalJSON

func (s *Objects) MarshalJSON() ([]byte,error)

typeObjectsDeleteCall

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

func (*ObjectsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectsDeleteCall)Do

Do executes the "storage.objects.delete" call.

func (*ObjectsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsDeleteCall)Header

func (c *ObjectsDeleteCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeObjectsGetCall

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

func (*ObjectsGetCall)Context

Context sets the context to be used in this call's Do and Downloadmethods. Any pending HTTP request will be aborted if the providedcontext is canceled.

func (*ObjectsGetCall)Do

Do executes the "storage.objects.get" call.Exactly one of *Object or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Object.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ObjectsGetCall)Download

func (c *ObjectsGetCall) Download(opts ...googleapi.CallOption) (*http.Response,error)

Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.

func (*ObjectsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsGetCall)Header

func (c *ObjectsGetCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectsGetCall)IfNoneMatch

func (c *ObjectsGetCall) IfNoneMatch(entityTagstring) *ObjectsGetCall

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ObjectsGetCall)Projection

func (c *ObjectsGetCall) Projection(projectionstring) *ObjectsGetCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl.

Possible values:

"full" - Include all properties."no_acl" - Omit the acl property.

typeObjectsInsertCall

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

func (*ObjectsInsertCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.This context will supersede any context previously provided to theResumableMedia method.

func (*ObjectsInsertCall)Do

Do executes the "storage.objects.insert" call.Exactly one of *Object or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Object.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ObjectsInsertCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsInsertCall)Header

func (c *ObjectsInsertCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectsInsertCall)Media

Media specifies the media to upload in one or more chunks. The chunksize may be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in theupload request will be determined by sniffing the contents of r,unless a MediaOption generated by googleapi.ContentType issupplied.At most one of Media and ResumableMedia may be set.

func (*ObjectsInsertCall)Name

Name sets the optional parameter "name": Name of the object. Requiredwhen the object metadata is not otherwise provided. Overrides theobject metadata's name value, if any.

func (*ObjectsInsertCall)ProgressUpdater

ProgressUpdater provides a callback function that will be calledafter every chunk. It should be a low-latency function in order tonot slow down the upload operation. This should only be called whenusing ResumableMedia (as opposed to Media).

func (*ObjectsInsertCall)Projection

func (c *ObjectsInsertCall) Projection(projectionstring) *ObjectsInsertCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl, unless the object resourcespecifies the acl property, when it defaults to full.

Possible values:

"full" - Include all properties."no_acl" - Omit the acl property.

func (*ObjectsInsertCall)ResumableMediadeprecated

func (c *ObjectsInsertCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *ObjectsInsertCall

ResumableMedia specifies the media to upload in chunks and can becanceled with ctx.

Deprecated: use Media instead.

At most one of Media and ResumableMedia may be set. mediaTypeidentifies the MIME media type of the upload, such as "image/png". IfmediaType is "", it will be auto-detected. The provided ctx willsupersede any context previously provided to the Context method.

typeObjectsListCall

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

func (*ObjectsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectsListCall)Delimiter

func (c *ObjectsListCall) Delimiter(delimiterstring) *ObjectsListCall

Delimiter sets the optional parameter "delimiter": Returns results ina directory-like mode. items will contain only objects whose names,aside from the prefix, do not contain delimiter. Objects whose names,aside from the prefix, contain delimiter will have their name,truncated after the delimiter, returned in prefixes. Duplicateprefixes are omitted.

func (*ObjectsListCall)Do

Do executes the "storage.objects.list" call.Exactly one of *Objects or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Objects.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ObjectsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsListCall)Header

func (c *ObjectsListCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectsListCall)IfNoneMatch

func (c *ObjectsListCall) IfNoneMatch(entityTagstring) *ObjectsListCall

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ObjectsListCall)MaxResults

func (c *ObjectsListCall) MaxResults(maxResultsint64) *ObjectsListCall

MaxResults sets the optional parameter "max-results": Maximum numberof items plus prefixes to return. As duplicate prefixes are omitted,fewer total results may be returned than requested.

func (*ObjectsListCall)PageToken

func (c *ObjectsListCall) PageToken(pageTokenstring) *ObjectsListCall

PageToken sets the optional parameter "pageToken": Apreviously-returned page token representing part of the larger set ofresults to view.

func (*ObjectsListCall)Pages

func (c *ObjectsListCall) Pages(ctxcontext.Context, f func(*Objects)error)error

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

func (*ObjectsListCall)Prefix

func (c *ObjectsListCall) Prefix(prefixstring) *ObjectsListCall

Prefix sets the optional parameter "prefix": Filter results toobjects whose names begin with this prefix.

func (*ObjectsListCall)Projection

func (c *ObjectsListCall) Projection(projectionstring) *ObjectsListCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to no_acl.

Possible values:

"full" - Include all properties."no_acl" - Omit the acl property.

typeObjectsPatchCall

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

func (*ObjectsPatchCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ObjectsPatchCall)Do

Do executes the "storage.objects.patch" call.Exactly one of *Object or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Object.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ObjectsPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsPatchCall)Header

func (c *ObjectsPatchCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectsPatchCall)Projection

func (c *ObjectsPatchCall) Projection(projectionstring) *ObjectsPatchCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to full.

Possible values:

"full" - Include all properties."no_acl" - Omit the acl property.

typeObjectsService

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

funcNewObjectsService

func NewObjectsService(s *Service) *ObjectsService

func (*ObjectsService)Delete

func (r *ObjectsService) Delete(bucketstring, objectstring) *ObjectsDeleteCall

Delete: Deletes data blobs and associated metadata.

func (*ObjectsService)Get

func (r *ObjectsService) Get(bucketstring, objectstring) *ObjectsGetCall

Get: Retrieves objects or their associated metadata.

func (*ObjectsService)Insert

func (r *ObjectsService) Insert(bucketstring, object *Object) *ObjectsInsertCall

Insert: Stores new data blobs and associated metadata.

func (*ObjectsService)List

func (r *ObjectsService) List(bucketstring) *ObjectsListCall

List: Retrieves a list of objects matching the criteria.

func (*ObjectsService)Patch

func (r *ObjectsService) Patch(bucketstring, objectstring, object2 *Object) *ObjectsPatchCall

Patch: Updates a data blob's associated metadata. This methodsupports patch semantics.

func (*ObjectsService)Update

func (r *ObjectsService) Update(bucketstring, objectstring, object2 *Object) *ObjectsUpdateCall

Update: Updates a data blob's associated metadata.

typeObjectsUpdateCall

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

func (*ObjectsUpdateCall)Context

Context sets the context to be used in this call's Do and Downloadmethods. Any pending HTTP request will be aborted if the providedcontext is canceled.

func (*ObjectsUpdateCall)Do

Do executes the "storage.objects.update" call.Exactly one of *Object or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Object.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ObjectsUpdateCall)Download

func (c *ObjectsUpdateCall) Download(opts ...googleapi.CallOption) (*http.Response,error)

Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.

func (*ObjectsUpdateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ObjectsUpdateCall)Header

func (c *ObjectsUpdateCall) Header()http.Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ObjectsUpdateCall)Projection

func (c *ObjectsUpdateCall) Projection(projectionstring) *ObjectsUpdateCall

Projection sets the optional parameter "projection": Set ofproperties to return. Defaults to full.

Possible values:

"full" - Include all properties."no_acl" - Omit the acl property.

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentBucketAccessControls *BucketAccessControlsServiceBuckets *BucketsServiceObjectAccessControls *ObjectAccessControlsServiceObjects *ObjectsService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewServiceadded inv0.3.0

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp