api: google.golang.org/api/storage/v1beta1 Index | Files

package storage

import "google.golang.org/api/storage/v1beta1"

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, see https://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)))

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

Index

Package Files

storage-gen.go

Constants

const (
    // Manage your data and permissions in Google Cloud Storage
    DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"

    // View your data in Google Cloud Storage
    DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"

    // Manage your data in Google Cloud Storage
    DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
)

OAuth2 scopes used by this API.

type Bucket Uses

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.
    Id  string `json:"id,omitempty"`

    // Kind: The kind of item this is. For buckets, this is always
    // storage#bucket.
    Kind string `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.
    Location string `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.
    ProjectId uint64 `json:"projectId,omitempty,string"`

    // SelfLink: The URI of this bucket.
    SelfLink string `json:"selfLink,omitempty"`

    // TimeCreated: Creation time of the bucket in RFC 3339 format.
    TimeCreated string `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 Uses

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

type BucketAccessControl Uses

type BucketAccessControl struct {
    // Bucket: The name of the bucket.
    Bucket string `json:"bucket,omitempty"`

    // Domain: The domain associated with the entity, if any.
    Domain string `json:"domain,omitempty"`

    // Email: The email address associated with the entity, if any.
    Email string `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.
    Entity string `json:"entity,omitempty"`

    // EntityId: The ID for the entity, if any.
    EntityId string `json:"entityId,omitempty"`

    // Id: The ID of the access-control entry.
    Id  string `json:"id,omitempty"`

    // Kind: The kind of item this is. For bucket access control entries,
    // this is always storage#bucketAccessControl.
    Kind string `json:"kind,omitempty"`

    // Role: The access permission for the entity. Can be READER, WRITER, or
    // OWNER.
    Role string `json:"role,omitempty"`

    // SelfLink: The link to this access-control entry.
    SelfLink string `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 Uses

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

type BucketAccessControls Uses

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.
    Kind string `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 Uses

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

type BucketAccessControlsDeleteCall Uses

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

func (*BucketAccessControlsDeleteCall) Context Uses

func (c *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall

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

func (*BucketAccessControlsDeleteCall) Do Uses

func (c *BucketAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error

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

func (*BucketAccessControlsDeleteCall) Fields Uses

func (c *BucketAccessControlsDeleteCall) Fields(s ...googleapi.Field) *BucketAccessControlsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsDeleteCall) Header Uses

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

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

type BucketAccessControlsGetCall Uses

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

func (*BucketAccessControlsGetCall) Context Uses

func (c *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall

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

func (*BucketAccessControlsGetCall) Do Uses

func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error)

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

func (*BucketAccessControlsGetCall) Fields Uses

func (c *BucketAccessControlsGetCall) Fields(s ...googleapi.Field) *BucketAccessControlsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsGetCall) Header Uses

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

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

func (*BucketAccessControlsGetCall) IfNoneMatch Uses

func (c *BucketAccessControlsGetCall) IfNoneMatch(entityTag string) *BucketAccessControlsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type BucketAccessControlsInsertCall Uses

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

func (*BucketAccessControlsInsertCall) Context Uses

func (c *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall

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

func (*BucketAccessControlsInsertCall) Do Uses

func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error)

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

func (*BucketAccessControlsInsertCall) Fields Uses

func (c *BucketAccessControlsInsertCall) Fields(s ...googleapi.Field) *BucketAccessControlsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsInsertCall) Header Uses

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

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

type BucketAccessControlsListCall Uses

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

func (*BucketAccessControlsListCall) Context Uses

func (c *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall

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

func (*BucketAccessControlsListCall) Do Uses

func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*BucketAccessControls, error)

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

func (*BucketAccessControlsListCall) Fields Uses

func (c *BucketAccessControlsListCall) Fields(s ...googleapi.Field) *BucketAccessControlsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsListCall) Header Uses

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

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

func (*BucketAccessControlsListCall) IfNoneMatch Uses

func (c *BucketAccessControlsListCall) IfNoneMatch(entityTag string) *BucketAccessControlsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type BucketAccessControlsPatchCall Uses

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

func (*BucketAccessControlsPatchCall) Context Uses

func (c *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall

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

func (*BucketAccessControlsPatchCall) Do Uses

func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error)

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

func (*BucketAccessControlsPatchCall) Fields Uses

func (c *BucketAccessControlsPatchCall) Fields(s ...googleapi.Field) *BucketAccessControlsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsPatchCall) Header Uses

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

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

type BucketAccessControlsService Uses

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

func NewBucketAccessControlsService Uses

func NewBucketAccessControlsService(s *Service) *BucketAccessControlsService

func (*BucketAccessControlsService) Delete Uses

func (r *BucketAccessControlsService) Delete(bucket string, entity string) *BucketAccessControlsDeleteCall

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

func (*BucketAccessControlsService) Get Uses

func (r *BucketAccessControlsService) Get(bucket string, entity string) *BucketAccessControlsGetCall

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

func (*BucketAccessControlsService) Insert Uses

func (r *BucketAccessControlsService) Insert(bucket string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsInsertCall

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

func (*BucketAccessControlsService) List Uses

func (r *BucketAccessControlsService) List(bucket string) *BucketAccessControlsListCall

List: Retrieves ACL entries on the specified bucket.

func (*BucketAccessControlsService) Patch Uses

func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsPatchCall

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

func (*BucketAccessControlsService) Update Uses

func (r *BucketAccessControlsService) Update(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsUpdateCall

Update: Updates an ACL entry on the specified bucket.

type BucketAccessControlsUpdateCall Uses

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

func (*BucketAccessControlsUpdateCall) Context Uses

func (c *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall

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

func (*BucketAccessControlsUpdateCall) Do Uses

func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error)

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

func (*BucketAccessControlsUpdateCall) Fields Uses

func (c *BucketAccessControlsUpdateCall) Fields(s ...googleapi.Field) *BucketAccessControlsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketAccessControlsUpdateCall) Header Uses

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

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

type BucketOwner Uses

type BucketOwner struct {
    // Entity: The entity, in the form group-groupId.
    Entity string `json:"entity,omitempty"`

    // EntityId: The ID for the entity.
    EntityId string `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 project team's owner group.

func (*BucketOwner) MarshalJSON Uses

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

type BucketWebsite Uses

type BucketWebsite struct {
    // MainPageSuffix: Behaves as the bucket's directory index where missing
    // objects are treated as potential directories.
    MainPageSuffix string `json:"mainPageSuffix,omitempty"`

    // NotFoundPage: The custom object to return when a requested resource
    // is not found.
    NotFoundPage string `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 Uses

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

type Buckets Uses

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.
    Kind string `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.
    NextPageToken string `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 Uses

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

type BucketsDeleteCall Uses

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

func (*BucketsDeleteCall) Context Uses

func (c *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall

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

func (*BucketsDeleteCall) Do Uses

func (c *BucketsDeleteCall) Do(opts ...googleapi.CallOption) error

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

func (*BucketsDeleteCall) Fields Uses

func (c *BucketsDeleteCall) Fields(s ...googleapi.Field) *BucketsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsDeleteCall) Header Uses

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

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

type BucketsGetCall Uses

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

func (*BucketsGetCall) Context Uses

func (c *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall

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

func (*BucketsGetCall) Do Uses

func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.get" call. Exactly one of *Bucket or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsGetCall) Fields Uses

func (c *BucketsGetCall) Fields(s ...googleapi.Field) *BucketsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsGetCall) Header Uses

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

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

func (*BucketsGetCall) IfNoneMatch Uses

func (c *BucketsGetCall) IfNoneMatch(entityTag string) *BucketsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*BucketsGetCall) Projection Uses

func (c *BucketsGetCall) Projection(projection string) *BucketsGetCall

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

Possible values:

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

type BucketsInsertCall Uses

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

func (*BucketsInsertCall) Context Uses

func (c *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall

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

func (*BucketsInsertCall) Do Uses

func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.insert" call. Exactly one of *Bucket or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsInsertCall) Fields Uses

func (c *BucketsInsertCall) Fields(s ...googleapi.Field) *BucketsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsInsertCall) Header Uses

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

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

func (*BucketsInsertCall) Projection Uses

func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to no_acl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.

Possible values:

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

type BucketsListCall Uses

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

func (*BucketsListCall) Context Uses

func (c *BucketsListCall) Context(ctx context.Context) *BucketsListCall

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

func (*BucketsListCall) Do Uses

func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error)

Do executes the "storage.buckets.list" call. Exactly one of *Buckets or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsListCall) Fields Uses

func (c *BucketsListCall) Fields(s ...googleapi.Field) *BucketsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsListCall) Header Uses

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

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

func (*BucketsListCall) IfNoneMatch Uses

func (c *BucketsListCall) IfNoneMatch(entityTag string) *BucketsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*BucketsListCall) MaxResults Uses

func (c *BucketsListCall) MaxResults(maxResults int64) *BucketsListCall

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

func (*BucketsListCall) PageToken Uses

func (c *BucketsListCall) PageToken(pageToken string) *BucketsListCall

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

func (*BucketsListCall) Pages Uses

func (c *BucketsListCall) Pages(ctx context.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 Uses

func (c *BucketsListCall) Projection(projection string) *BucketsListCall

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

Possible values:

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

type BucketsPatchCall Uses

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

func (*BucketsPatchCall) Context Uses

func (c *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall

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

func (*BucketsPatchCall) Do Uses

func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.patch" call. Exactly one of *Bucket or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsPatchCall) Fields Uses

func (c *BucketsPatchCall) Fields(s ...googleapi.Field) *BucketsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsPatchCall) Header Uses

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

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

func (*BucketsPatchCall) Projection Uses

func (c *BucketsPatchCall) Projection(projection string) *BucketsPatchCall

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

Possible values:

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

type BucketsService Uses

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

func NewBucketsService Uses

func NewBucketsService(s *Service) *BucketsService

func (*BucketsService) Delete Uses

func (r *BucketsService) Delete(bucket string) *BucketsDeleteCall

Delete: Deletes an empty bucket.

func (*BucketsService) Get Uses

func (r *BucketsService) Get(bucket string) *BucketsGetCall

Get: Returns metadata for the specified bucket.

func (*BucketsService) Insert Uses

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

Insert: Creates a new bucket.

func (*BucketsService) List Uses

func (r *BucketsService) List(projectId uint64) *BucketsListCall

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

func (*BucketsService) Patch Uses

func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall

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

func (*BucketsService) Update Uses

func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCall

Update: Updates a bucket.

type BucketsUpdateCall Uses

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

func (*BucketsUpdateCall) Context Uses

func (c *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall

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

func (*BucketsUpdateCall) Do Uses

func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.update" call. Exactly one of *Bucket or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsUpdateCall) Fields Uses

func (c *BucketsUpdateCall) Fields(s ...googleapi.Field) *BucketsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BucketsUpdateCall) Header Uses

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

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

func (*BucketsUpdateCall) Projection Uses

func (c *BucketsUpdateCall) Projection(projection string) *BucketsUpdateCall

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

Possible values:

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

type Object Uses

type Object struct {
    // Acl: Access controls on the object.
    Acl []*ObjectAccessControl `json:"acl,omitempty"`

    // Bucket: The bucket containing this object.
    Bucket string `json:"bucket,omitempty"`

    // CacheControl: Cache-Control directive for the object data.
    CacheControl string `json:"cacheControl,omitempty"`

    // ContentDisposition: Content-Disposition of the object data.
    ContentDisposition string `json:"contentDisposition,omitempty"`

    // ContentEncoding: Content-Encoding of the object data.
    ContentEncoding string `json:"contentEncoding,omitempty"`

    // ContentLanguage: Content-Language of the object data.
    ContentLanguage string `json:"contentLanguage,omitempty"`

    // Id: The ID of the object.
    Id  string `json:"id,omitempty"`

    // Kind: The kind of item this is. For objects, this is always
    // storage#object.
    Kind string `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.
    Name string `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.
    SelfLink string `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 Uses

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

type ObjectAccessControl Uses

type ObjectAccessControl struct {
    // Bucket: The name of the bucket.
    Bucket string `json:"bucket,omitempty"`

    // Domain: The domain associated with the entity, if any.
    Domain string `json:"domain,omitempty"`

    // Email: The email address associated with the entity, if any.
    Email string `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.
    Entity string `json:"entity,omitempty"`

    // EntityId: The ID for the entity, if any.
    EntityId string `json:"entityId,omitempty"`

    // Id: The ID of the access-control entry.
    Id  string `json:"id,omitempty"`

    // Kind: The kind of item this is. For object access control entries,
    // this is always storage#objectAccessControl.
    Kind string `json:"kind,omitempty"`

    // Object: The name of the object.
    Object string `json:"object,omitempty"`

    // Role: The access permission for the entity. Can be READER or OWNER.
    Role string `json:"role,omitempty"`

    // SelfLink: The link to this access-control entry.
    SelfLink string `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 Uses

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

type ObjectAccessControls Uses

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.
    Kind string `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 Uses

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

type ObjectAccessControlsDeleteCall Uses

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

func (*ObjectAccessControlsDeleteCall) Context Uses

func (c *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall

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

func (*ObjectAccessControlsDeleteCall) Do Uses

func (c *ObjectAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error

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

func (*ObjectAccessControlsDeleteCall) Fields Uses

func (c *ObjectAccessControlsDeleteCall) Fields(s ...googleapi.Field) *ObjectAccessControlsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsDeleteCall) Header Uses

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

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

type ObjectAccessControlsGetCall Uses

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

func (*ObjectAccessControlsGetCall) Context Uses

func (c *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall

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

func (*ObjectAccessControlsGetCall) Do Uses

func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error)

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

func (*ObjectAccessControlsGetCall) Fields Uses

func (c *ObjectAccessControlsGetCall) Fields(s ...googleapi.Field) *ObjectAccessControlsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsGetCall) Header Uses

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

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

func (*ObjectAccessControlsGetCall) IfNoneMatch Uses

func (c *ObjectAccessControlsGetCall) IfNoneMatch(entityTag string) *ObjectAccessControlsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type ObjectAccessControlsInsertCall Uses

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

func (*ObjectAccessControlsInsertCall) Context Uses

func (c *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall

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

func (*ObjectAccessControlsInsertCall) Do Uses

func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error)

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

func (*ObjectAccessControlsInsertCall) Fields Uses

func (c *ObjectAccessControlsInsertCall) Fields(s ...googleapi.Field) *ObjectAccessControlsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsInsertCall) Header Uses

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

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

type ObjectAccessControlsListCall Uses

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

func (*ObjectAccessControlsListCall) Context Uses

func (c *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall

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

func (*ObjectAccessControlsListCall) Do Uses

func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControls, error)

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

func (*ObjectAccessControlsListCall) Fields Uses

func (c *ObjectAccessControlsListCall) Fields(s ...googleapi.Field) *ObjectAccessControlsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsListCall) Header Uses

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

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

func (*ObjectAccessControlsListCall) IfNoneMatch Uses

func (c *ObjectAccessControlsListCall) IfNoneMatch(entityTag string) *ObjectAccessControlsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type ObjectAccessControlsPatchCall Uses

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

func (*ObjectAccessControlsPatchCall) Context Uses

func (c *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall

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

func (*ObjectAccessControlsPatchCall) Do Uses

func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error)

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

func (*ObjectAccessControlsPatchCall) Fields Uses

func (c *ObjectAccessControlsPatchCall) Fields(s ...googleapi.Field) *ObjectAccessControlsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsPatchCall) Header Uses

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

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

type ObjectAccessControlsService Uses

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

func NewObjectAccessControlsService Uses

func NewObjectAccessControlsService(s *Service) *ObjectAccessControlsService

func (*ObjectAccessControlsService) Delete Uses

func (r *ObjectAccessControlsService) Delete(bucket string, object string, entity string) *ObjectAccessControlsDeleteCall

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

func (*ObjectAccessControlsService) Get Uses

func (r *ObjectAccessControlsService) Get(bucket string, object string, entity string) *ObjectAccessControlsGetCall

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

func (*ObjectAccessControlsService) Insert Uses

func (r *ObjectAccessControlsService) Insert(bucket string, object string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsInsertCall

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

func (*ObjectAccessControlsService) List Uses

func (r *ObjectAccessControlsService) List(bucket string, object string) *ObjectAccessControlsListCall

List: Retrieves ACL entries on the specified object.

func (*ObjectAccessControlsService) Patch Uses

func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall

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

func (*ObjectAccessControlsService) Update Uses

func (r *ObjectAccessControlsService) Update(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsUpdateCall

Update: Updates an ACL entry on the specified object.

type ObjectAccessControlsUpdateCall Uses

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

func (*ObjectAccessControlsUpdateCall) Context Uses

func (c *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall

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

func (*ObjectAccessControlsUpdateCall) Do Uses

func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error)

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

func (*ObjectAccessControlsUpdateCall) Fields Uses

func (c *ObjectAccessControlsUpdateCall) Fields(s ...googleapi.Field) *ObjectAccessControlsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectAccessControlsUpdateCall) Header Uses

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

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

type ObjectMedia Uses

type ObjectMedia struct {
    // Algorithm: Hash algorithm used. Currently only MD5 is supported.
    // Required if a hash is provided.
    Algorithm string `json:"algorithm,omitempty"`

    // ContentType: Content-Type of the object data.
    ContentType string `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.
    Data string `json:"data,omitempty"`

    // Hash: Hash of the data. Required if a hash algorithm is provided.
    Hash string `json:"hash,omitempty"`

    // Length: Content-Length of the data in bytes.
    Length uint64 `json:"length,omitempty,string"`

    // Link: Media download link.
    Link string `json:"link,omitempty"`

    // TimeCreated: Creation time of the data in RFC 3339 format.
    TimeCreated string `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 when uploading raw media or multipart/related with an auxiliary media part.

func (*ObjectMedia) MarshalJSON Uses

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

type ObjectOwner Uses

type ObjectOwner struct {
    // Entity: The entity, in the form user-userId.
    Entity string `json:"entity,omitempty"`

    // EntityId: The ID for the entity.
    EntityId string `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 the uploader of the object.

func (*ObjectOwner) MarshalJSON Uses

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

type Objects Uses

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.
    Kind string `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.
    NextPageToken string `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 Uses

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

type ObjectsDeleteCall Uses

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

func (*ObjectsDeleteCall) Context Uses

func (c *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall

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

func (*ObjectsDeleteCall) Do Uses

func (c *ObjectsDeleteCall) Do(opts ...googleapi.CallOption) error

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

func (*ObjectsDeleteCall) Fields Uses

func (c *ObjectsDeleteCall) Fields(s ...googleapi.Field) *ObjectsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsDeleteCall) Header Uses

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

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

type ObjectsGetCall Uses

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

func (*ObjectsGetCall) Context Uses

func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall

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

func (*ObjectsGetCall) Do Uses

func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error)

Do executes the "storage.objects.get" call. Exactly one of *Object or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*ObjectsGetCall) Download Uses

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

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

func (*ObjectsGetCall) Fields Uses

func (c *ObjectsGetCall) Fields(s ...googleapi.Field) *ObjectsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsGetCall) Header Uses

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

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

func (*ObjectsGetCall) IfNoneMatch Uses

func (c *ObjectsGetCall) IfNoneMatch(entityTag string) *ObjectsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ObjectsGetCall) Projection Uses

func (c *ObjectsGetCall) Projection(projection string) *ObjectsGetCall

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

Possible values:

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

type ObjectsInsertCall Uses

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

func (*ObjectsInsertCall) Context Uses

func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.

func (*ObjectsInsertCall) Do Uses

func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error)

Do executes the "storage.objects.insert" call. Exactly one of *Object or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*ObjectsInsertCall) Fields Uses

func (c *ObjectsInsertCall) Fields(s ...googleapi.Field) *ObjectsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsInsertCall) Header Uses

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

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

func (*ObjectsInsertCall) Media Uses

func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ObjectsInsertCall

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

func (*ObjectsInsertCall) Name Uses

func (c *ObjectsInsertCall) Name(name string) *ObjectsInsertCall

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

func (*ObjectsInsertCall) ProgressUpdater Uses

func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall

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

func (*ObjectsInsertCall) Projection Uses

func (c *ObjectsInsertCall) Projection(projection string) *ObjectsInsertCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl property, when it defaults to full.

Possible values:

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

func (*ObjectsInsertCall) ResumableMedia Uses

func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall

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

Deprecated: use Media instead.

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

type ObjectsListCall Uses

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

func (*ObjectsListCall) Context Uses

func (c *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall

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

func (*ObjectsListCall) Delimiter Uses

func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall

Delimiter sets the optional parameter "delimiter": Returns results in a 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. Duplicate prefixes are omitted.

func (*ObjectsListCall) Do Uses

func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error)

Do executes the "storage.objects.list" call. Exactly one of *Objects or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*ObjectsListCall) Fields Uses

func (c *ObjectsListCall) Fields(s ...googleapi.Field) *ObjectsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsListCall) Header Uses

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

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

func (*ObjectsListCall) IfNoneMatch Uses

func (c *ObjectsListCall) IfNoneMatch(entityTag string) *ObjectsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ObjectsListCall) MaxResults Uses

func (c *ObjectsListCall) MaxResults(maxResults int64) *ObjectsListCall

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

func (*ObjectsListCall) PageToken Uses

func (c *ObjectsListCall) PageToken(pageToken string) *ObjectsListCall

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

func (*ObjectsListCall) Pages Uses

func (c *ObjectsListCall) Pages(ctx context.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 Uses

func (c *ObjectsListCall) Prefix(prefix string) *ObjectsListCall

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

func (*ObjectsListCall) Projection Uses

func (c *ObjectsListCall) Projection(projection string) *ObjectsListCall

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

Possible values:

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

type ObjectsPatchCall Uses

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

func (*ObjectsPatchCall) Context Uses

func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall

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

func (*ObjectsPatchCall) Do Uses

func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error)

Do executes the "storage.objects.patch" call. Exactly one of *Object or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*ObjectsPatchCall) Fields Uses

func (c *ObjectsPatchCall) Fields(s ...googleapi.Field) *ObjectsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsPatchCall) Header Uses

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

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

func (*ObjectsPatchCall) Projection Uses

func (c *ObjectsPatchCall) Projection(projection string) *ObjectsPatchCall

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

Possible values:

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

type ObjectsService Uses

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

func NewObjectsService Uses

func NewObjectsService(s *Service) *ObjectsService

func (*ObjectsService) Delete Uses

func (r *ObjectsService) Delete(bucket string, object string) *ObjectsDeleteCall

Delete: Deletes data blobs and associated metadata.

func (*ObjectsService) Get Uses

func (r *ObjectsService) Get(bucket string, object string) *ObjectsGetCall

Get: Retrieves objects or their associated metadata.

func (*ObjectsService) Insert Uses

func (r *ObjectsService) Insert(bucket string, object *Object) *ObjectsInsertCall

Insert: Stores new data blobs and associated metadata.

func (*ObjectsService) List Uses

func (r *ObjectsService) List(bucket string) *ObjectsListCall

List: Retrieves a list of objects matching the criteria.

func (*ObjectsService) Patch Uses

func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall

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

func (*ObjectsService) Update Uses

func (r *ObjectsService) Update(bucket string, object string, object2 *Object) *ObjectsUpdateCall

Update: Updates a data blob's associated metadata.

type ObjectsUpdateCall Uses

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

func (*ObjectsUpdateCall) Context Uses

func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall

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

func (*ObjectsUpdateCall) Do Uses

func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error)

Do executes the "storage.objects.update" call. Exactly one of *Object or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.

func (*ObjectsUpdateCall) Download Uses

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

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

func (*ObjectsUpdateCall) Fields Uses

func (c *ObjectsUpdateCall) Fields(s ...googleapi.Field) *ObjectsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ObjectsUpdateCall) Header Uses

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

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

func (*ObjectsUpdateCall) Projection Uses

func (c *ObjectsUpdateCall) Projection(projection string) *ObjectsUpdateCall

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

Possible values:

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

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    BucketAccessControls *BucketAccessControlsService

    Buckets *BucketsService

    ObjectAccessControls *ObjectAccessControlsService

    Objects *ObjectsService
    // contains filtered or unexported fields
}

func New Uses

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.

func NewService Uses

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

NewService creates a new Service.

Package storage imports 14 packages (graph). Updated 2019-09-18. Refresh now. Tools for package owners.