package googleapi

Import Path
	google.golang.org/api/googleapi (on go.dev)

Dependency Relation
	imports 11 packages, and imported by 5 packages

Involved Source Files Package googleapi contains the common code shared by all Google API libraries. types.go
Package-Level Type Names (total 23, in which 17 are exported)
/* sort exporteds by: | */
A CallOption is an optional argument to an API call. It should be treated as an opaque value by users of Google APIs. A CallOption is something that configures an API call in a way that is not specific to that API; for instance, controlling the quota user for an API call is common across many APIs, and is thus a CallOption. ( T) Get() (key, value string) func QuotaUser(u string) CallOption func Trace(traceToken string) CallOption func UserIP(ip string) CallOption func google.golang.org/api/internal/gensupport.SetOptions(u gensupport.URLParams, opts ...CallOption) func google.golang.org/api/storage/v1.(*BucketAccessControlsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*BucketAccessControlsGetCall).Do(opts ...CallOption) (*storage.BucketAccessControl, error) func google.golang.org/api/storage/v1.(*BucketAccessControlsInsertCall).Do(opts ...CallOption) (*storage.BucketAccessControl, error) func google.golang.org/api/storage/v1.(*BucketAccessControlsListCall).Do(opts ...CallOption) (*storage.BucketAccessControls, error) func google.golang.org/api/storage/v1.(*BucketAccessControlsPatchCall).Do(opts ...CallOption) (*storage.BucketAccessControl, error) func google.golang.org/api/storage/v1.(*BucketAccessControlsUpdateCall).Do(opts ...CallOption) (*storage.BucketAccessControl, error) func google.golang.org/api/storage/v1.(*BucketsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*BucketsGetCall).Do(opts ...CallOption) (*storage.Bucket, error) func google.golang.org/api/storage/v1.(*BucketsGetIamPolicyCall).Do(opts ...CallOption) (*storage.Policy, error) func google.golang.org/api/storage/v1.(*BucketsInsertCall).Do(opts ...CallOption) (*storage.Bucket, error) func google.golang.org/api/storage/v1.(*BucketsListCall).Do(opts ...CallOption) (*storage.Buckets, error) func google.golang.org/api/storage/v1.(*BucketsLockRetentionPolicyCall).Do(opts ...CallOption) (*storage.Bucket, error) func google.golang.org/api/storage/v1.(*BucketsPatchCall).Do(opts ...CallOption) (*storage.Bucket, error) func google.golang.org/api/storage/v1.(*BucketsSetIamPolicyCall).Do(opts ...CallOption) (*storage.Policy, error) func google.golang.org/api/storage/v1.(*BucketsTestIamPermissionsCall).Do(opts ...CallOption) (*storage.TestIamPermissionsResponse, error) func google.golang.org/api/storage/v1.(*BucketsUpdateCall).Do(opts ...CallOption) (*storage.Bucket, error) func google.golang.org/api/storage/v1.(*ChannelsStopCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsGetCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsInsertCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsListCall).Do(opts ...CallOption) (*storage.ObjectAccessControls, error) func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsPatchCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsUpdateCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*NotificationsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*NotificationsGetCall).Do(opts ...CallOption) (*storage.Notification, error) func google.golang.org/api/storage/v1.(*NotificationsInsertCall).Do(opts ...CallOption) (*storage.Notification, error) func google.golang.org/api/storage/v1.(*NotificationsListCall).Do(opts ...CallOption) (*storage.Notifications, error) func google.golang.org/api/storage/v1.(*ObjectAccessControlsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*ObjectAccessControlsGetCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*ObjectAccessControlsInsertCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*ObjectAccessControlsListCall).Do(opts ...CallOption) (*storage.ObjectAccessControls, error) func google.golang.org/api/storage/v1.(*ObjectAccessControlsPatchCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*ObjectAccessControlsUpdateCall).Do(opts ...CallOption) (*storage.ObjectAccessControl, error) func google.golang.org/api/storage/v1.(*ObjectsComposeCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsCopyCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*ObjectsGetCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsGetCall).Download(opts ...CallOption) (*http.Response, error) func google.golang.org/api/storage/v1.(*ObjectsGetIamPolicyCall).Do(opts ...CallOption) (*storage.Policy, error) func google.golang.org/api/storage/v1.(*ObjectsInsertCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsListCall).Do(opts ...CallOption) (*storage.Objects, error) func google.golang.org/api/storage/v1.(*ObjectsPatchCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsRewriteCall).Do(opts ...CallOption) (*storage.RewriteResponse, error) func google.golang.org/api/storage/v1.(*ObjectsSetIamPolicyCall).Do(opts ...CallOption) (*storage.Policy, error) func google.golang.org/api/storage/v1.(*ObjectsTestIamPermissionsCall).Do(opts ...CallOption) (*storage.TestIamPermissionsResponse, error) func google.golang.org/api/storage/v1.(*ObjectsUpdateCall).Do(opts ...CallOption) (*storage.Object, error) func google.golang.org/api/storage/v1.(*ObjectsWatchAllCall).Do(opts ...CallOption) (*storage.Channel, error) func google.golang.org/api/storage/v1.(*ProjectsHmacKeysCreateCall).Do(opts ...CallOption) (*storage.HmacKey, error) func google.golang.org/api/storage/v1.(*ProjectsHmacKeysDeleteCall).Do(opts ...CallOption) error func google.golang.org/api/storage/v1.(*ProjectsHmacKeysGetCall).Do(opts ...CallOption) (*storage.HmacKeyMetadata, error) func google.golang.org/api/storage/v1.(*ProjectsHmacKeysListCall).Do(opts ...CallOption) (*storage.HmacKeysMetadata, error) func google.golang.org/api/storage/v1.(*ProjectsHmacKeysUpdateCall).Do(opts ...CallOption) (*storage.HmacKeyMetadata, error) func google.golang.org/api/storage/v1.(*ProjectsServiceAccountGetCall).Do(opts ...CallOption) (*storage.ServiceAccount, error)
ContentTyper is an interface for Readers which know (or would like to override) their Content-Type. If a media body doesn't implement ContentTyper, the type is sniffed from the content using http.DetectContentType. ( T) ContentType() string *cloud.google.com/go/storage.Reader
Error contains an error response from the server. Body is the raw response returned by the server. It is often but not always JSON, depending on how the request fails. Code is the HTTP response status code and will always be populated. Details provide more context to an error. Errors []ErrorItem Header contains the response header fields from the server. Message is the server response message and is only populated when explicitly referenced by the JSON server response. (*T) Error() string *T : error
ErrorItem is a detailed error code & message from the Google API frontend. Message is the human-readable description of the error. Reason is the typed error code. For example: "some_example".
A Field names a field to be retrieved with a partial response. https://cloud.google.com/storage/docs/json_api/v1/how-tos/performance Partial responses can dramatically reduce the amount of data that must be sent to your application. In order to request partial responses, you can specify the full list of fields that your application needs by adding the Fields option to your request. Field strings use camelCase with leading lower-case characters to identify fields within the response. For example, if your response has a "NextPageToken" and a slice of "Items" with "Id" fields, you could request just those fields like this: svc.Events.List().Fields("nextPageToken", "items/id").Do() or if you were also interested in each Item's "Updated" field, you can combine them like this: svc.Events.List().Fields("nextPageToken", "items(id,updated)").Do() Another way to find field names is through the Google API explorer: https://developers.google.com/apis-explorer/#p/ func CombineFields(s []Field) string func google.golang.org/api/storage/v1.(*BucketAccessControlsDeleteCall).Fields(s ...Field) *storage.BucketAccessControlsDeleteCall func google.golang.org/api/storage/v1.(*BucketAccessControlsGetCall).Fields(s ...Field) *storage.BucketAccessControlsGetCall func google.golang.org/api/storage/v1.(*BucketAccessControlsInsertCall).Fields(s ...Field) *storage.BucketAccessControlsInsertCall func google.golang.org/api/storage/v1.(*BucketAccessControlsListCall).Fields(s ...Field) *storage.BucketAccessControlsListCall func google.golang.org/api/storage/v1.(*BucketAccessControlsPatchCall).Fields(s ...Field) *storage.BucketAccessControlsPatchCall func google.golang.org/api/storage/v1.(*BucketAccessControlsUpdateCall).Fields(s ...Field) *storage.BucketAccessControlsUpdateCall func google.golang.org/api/storage/v1.(*BucketsDeleteCall).Fields(s ...Field) *storage.BucketsDeleteCall func google.golang.org/api/storage/v1.(*BucketsGetCall).Fields(s ...Field) *storage.BucketsGetCall func google.golang.org/api/storage/v1.(*BucketsGetIamPolicyCall).Fields(s ...Field) *storage.BucketsGetIamPolicyCall func google.golang.org/api/storage/v1.(*BucketsInsertCall).Fields(s ...Field) *storage.BucketsInsertCall func google.golang.org/api/storage/v1.(*BucketsListCall).Fields(s ...Field) *storage.BucketsListCall func google.golang.org/api/storage/v1.(*BucketsLockRetentionPolicyCall).Fields(s ...Field) *storage.BucketsLockRetentionPolicyCall func google.golang.org/api/storage/v1.(*BucketsPatchCall).Fields(s ...Field) *storage.BucketsPatchCall func google.golang.org/api/storage/v1.(*BucketsSetIamPolicyCall).Fields(s ...Field) *storage.BucketsSetIamPolicyCall func google.golang.org/api/storage/v1.(*BucketsTestIamPermissionsCall).Fields(s ...Field) *storage.BucketsTestIamPermissionsCall func google.golang.org/api/storage/v1.(*BucketsUpdateCall).Fields(s ...Field) *storage.BucketsUpdateCall func google.golang.org/api/storage/v1.(*ChannelsStopCall).Fields(s ...Field) *storage.ChannelsStopCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsDeleteCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsDeleteCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsGetCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsGetCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsInsertCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsInsertCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsListCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsListCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsPatchCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsPatchCall func google.golang.org/api/storage/v1.(*DefaultObjectAccessControlsUpdateCall).Fields(s ...Field) *storage.DefaultObjectAccessControlsUpdateCall func google.golang.org/api/storage/v1.(*NotificationsDeleteCall).Fields(s ...Field) *storage.NotificationsDeleteCall func google.golang.org/api/storage/v1.(*NotificationsGetCall).Fields(s ...Field) *storage.NotificationsGetCall func google.golang.org/api/storage/v1.(*NotificationsInsertCall).Fields(s ...Field) *storage.NotificationsInsertCall func google.golang.org/api/storage/v1.(*NotificationsListCall).Fields(s ...Field) *storage.NotificationsListCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsDeleteCall).Fields(s ...Field) *storage.ObjectAccessControlsDeleteCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsGetCall).Fields(s ...Field) *storage.ObjectAccessControlsGetCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsInsertCall).Fields(s ...Field) *storage.ObjectAccessControlsInsertCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsListCall).Fields(s ...Field) *storage.ObjectAccessControlsListCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsPatchCall).Fields(s ...Field) *storage.ObjectAccessControlsPatchCall func google.golang.org/api/storage/v1.(*ObjectAccessControlsUpdateCall).Fields(s ...Field) *storage.ObjectAccessControlsUpdateCall func google.golang.org/api/storage/v1.(*ObjectsComposeCall).Fields(s ...Field) *storage.ObjectsComposeCall func google.golang.org/api/storage/v1.(*ObjectsCopyCall).Fields(s ...Field) *storage.ObjectsCopyCall func google.golang.org/api/storage/v1.(*ObjectsDeleteCall).Fields(s ...Field) *storage.ObjectsDeleteCall func google.golang.org/api/storage/v1.(*ObjectsGetCall).Fields(s ...Field) *storage.ObjectsGetCall func google.golang.org/api/storage/v1.(*ObjectsGetIamPolicyCall).Fields(s ...Field) *storage.ObjectsGetIamPolicyCall func google.golang.org/api/storage/v1.(*ObjectsInsertCall).Fields(s ...Field) *storage.ObjectsInsertCall func google.golang.org/api/storage/v1.(*ObjectsListCall).Fields(s ...Field) *storage.ObjectsListCall func google.golang.org/api/storage/v1.(*ObjectsPatchCall).Fields(s ...Field) *storage.ObjectsPatchCall func google.golang.org/api/storage/v1.(*ObjectsRewriteCall).Fields(s ...Field) *storage.ObjectsRewriteCall func google.golang.org/api/storage/v1.(*ObjectsSetIamPolicyCall).Fields(s ...Field) *storage.ObjectsSetIamPolicyCall func google.golang.org/api/storage/v1.(*ObjectsTestIamPermissionsCall).Fields(s ...Field) *storage.ObjectsTestIamPermissionsCall func google.golang.org/api/storage/v1.(*ObjectsUpdateCall).Fields(s ...Field) *storage.ObjectsUpdateCall func google.golang.org/api/storage/v1.(*ObjectsWatchAllCall).Fields(s ...Field) *storage.ObjectsWatchAllCall func google.golang.org/api/storage/v1.(*ProjectsHmacKeysCreateCall).Fields(s ...Field) *storage.ProjectsHmacKeysCreateCall func google.golang.org/api/storage/v1.(*ProjectsHmacKeysDeleteCall).Fields(s ...Field) *storage.ProjectsHmacKeysDeleteCall func google.golang.org/api/storage/v1.(*ProjectsHmacKeysGetCall).Fields(s ...Field) *storage.ProjectsHmacKeysGetCall func google.golang.org/api/storage/v1.(*ProjectsHmacKeysListCall).Fields(s ...Field) *storage.ProjectsHmacKeysListCall func google.golang.org/api/storage/v1.(*ProjectsHmacKeysUpdateCall).Fields(s ...Field) *storage.ProjectsHmacKeysUpdateCall func google.golang.org/api/storage/v1.(*ProjectsServiceAccountGetCall).Fields(s ...Field) *storage.ProjectsServiceAccountGetCall
Float64s is a slice of float64s that marshal as quoted strings in JSON. ( T) MarshalJSON() ([]byte, error) (*T) UnmarshalJSON(raw []byte) error T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
Int32s is a slice of int32s that marshal as quoted strings in JSON. ( T) MarshalJSON() ([]byte, error) (*T) UnmarshalJSON(raw []byte) error T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
Int64s is a slice of int64s that marshal as quoted strings in JSON. ( T) MarshalJSON() ([]byte, error) (*T) UnmarshalJSON(raw []byte) error T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
MarshalStyle defines whether to marshal JSON with a {"data": ...} wrapper. ( T) JSONReader(v interface{}) (io.Reader, error) var WithDataWrapper var WithoutDataWrapper
MediaOption defines the interface for setting media options. func ChunkSize(size int) MediaOption func ContentType(ctype string) MediaOption func ProcessMediaOptions(opts []MediaOption) *MediaOptions func google.golang.org/api/internal/gensupport.NewInfoFromMedia(r io.Reader, options []MediaOption) *gensupport.MediaInfo func google.golang.org/api/storage/v1.(*ObjectsInsertCall).Media(r io.Reader, options ...MediaOption) *storage.ObjectsInsertCall
MediaOptions stores options for customizing media upload. It is not used by developers directly. ChunkSize int ContentType string ForceEmptyContentType bool func ProcessMediaOptions(opts []MediaOption) *MediaOptions
ProgressUpdater is a function that is called upon every progress update of a resumable upload. This is the only part of a resumable upload (from googleapi) that is usable by the developer. The remaining usable pieces of resumable uploads is exposed in each auto-generated API. func google.golang.org/api/internal/gensupport.(*MediaInfo).SetProgressUpdater(pu ProgressUpdater) func google.golang.org/api/storage/v1.(*ObjectsInsertCall).ProgressUpdater(pu ProgressUpdater) *storage.ObjectsInsertCall
RawMessage is a raw encoded JSON value. It is identical to json.RawMessage, except it does not suffer from https://golang.org/issue/14493. MarshalJSON returns m. UnmarshalJSON sets *m to a copy of data. T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
ServerResponse is embedded in each Do response and provides the HTTP status code and header sent by the server. HTTPStatusCode is the server's response status code. When using a resource method's Do call, this will always be in the 2xx range. Header contains the response header fields from the server.
A SizeReaderAt is a ReaderAt with a Size method. An io.SectionReader implements SizeReaderAt. ( T) ReadAt(p []byte, off int64) (n int, err error) ( T) Size() int64 *bytes.Reader *io.SectionReader *strings.Reader T : io.ReaderAt
Uint32s is a slice of uint32s that marshal as quoted strings in JSON. ( T) MarshalJSON() ([]byte, error) (*T) UnmarshalJSON(raw []byte) error T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
Uint64s is a slice of uint64s that marshal as quoted strings in JSON. ( T) MarshalJSON() ([]byte, error) (*T) UnmarshalJSON(raw []byte) error T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
Package-Level Functions (total 23, in which 22 are exported)
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
CheckMediaResponse returns an error (of type *Error) if the response status code is not 2xx. Unlike CheckResponse it does not assume the body is a JSON error document. It is the caller's responsibility to close res.Body.
CheckResponse returns an error (of type *Error) if the response status code is not 2xx.
ChunkSize returns a MediaOption which sets the chunk size for media uploads. size will be rounded up to the nearest multiple of 256K. Media which contains fewer than size bytes will be uploaded in a single request. Media which contains size bytes or more will be uploaded in separate chunks. If size is zero, media will be uploaded in a single request.
CloseBody is used to close res.Body. Prior to calling Close, it also tries to Read a small amount to see an EOF. Not seeing an EOF can prevent HTTP Transports from reusing connections.
CombineFields combines fields into a single string.
ContentType returns a MediaOption which sets the Content-Type header for media uploads. If ctype is empty, the Content-Type header will be omitted.
ConvertVariant uses the JSON encoder/decoder to fill in the struct 'dst' with the fields found in variant 'v'. This is used to support "variant" APIs that can return one of a number of different types. It reports whether the conversion was successful.
Expand subsitutes any {encoded} strings in the URL passed in using the map supplied. This calls SetOpaque to avoid encoding of the parameters in the URL path.
Float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
IsNotModified reports whether err is the result of the server replying with http.StatusNotModified. Such error values are sometimes returned by "Do" methods on calls when If-None-Match is used.
ProcessMediaOptions stores options from opts in a MediaOptions. It is not used by developers directly.
QuotaUser returns a CallOption that will set the quota user for a call. The quota user can be used by server-side applications to control accounting. It can be an arbitrary string up to 40 characters, and will override UserIP if both are provided.
ResolveRelative resolves relatives such as "http://www.golang.org/" and "topics/myproject/mytopic" into a single string, such as "http://www.golang.org/topics/myproject/mytopic". It strips all parent references (e.g. ../..) as well as anything after the host (e.g. /bar/gaz gets stripped out of foo.com/bar/gaz). ResolveRelative panics if either basestr or relstr is not able to be parsed.
String is a helper routine that allocates a new string value to store v and returns a pointer to it.
Trace returns a CallOption that enables diagnostic tracing for a call. traceToken is an ID supplied by Google support.
Uint32 is a helper routine that allocates a new uint32 value to store v and returns a pointer to it.
Uint64 is a helper routine that allocates a new uint64 value to store v and returns a pointer to it.
UserIP returns a CallOption that will set the "userIp" parameter of a call. This should be the IP address of the originating request.
VariantType returns the type name of the given variant. If the map doesn't contain the named key or the value is not a []interface{}, "" is returned. This is used to support "variant" APIs that can return one of a number of different types.
Package-Level Variables (total 2, both are exported)
WithDataWrapper marshals JSON with a {"data": ...} wrapper.
WithoutDataWrapper marshals JSON without a {"data": ...} wrapper.
Package-Level Constants (total 4, all are exported)
DefaultUploadChunkSize is the default chunk size to use for resumable uploads if not specified by the user.
MinUploadChunkSize is the minimum chunk size that can be used for resumable uploads. All user-specified chunk sizes must be multiple of this value.
UserAgent is the header string used to identify this package.
Version defines the gax version being used. This is typically sent in an HTTP header to services.