Documentation ¶
Overview ¶
Package datastore provides access to the Cloud Datastore API.
This package is DEPRECATED. Use package cloud.google.com/go/datastore instead.
For product documentation, see: https://cloud.google.com/datastore/
Creating a client ¶
Usage example:
import "google.golang.org/api/datastore/v1" ... ctx := context.Background() datastoreService, err := datastore.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:
datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.DatastoreScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
datastoreService, err := datastore.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, ...) datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type AllocateIdsRequest
- type AllocateIdsResponse
- type ArrayValue
- type BeginTransactionRequest
- type BeginTransactionResponse
- type CommitRequest
- type CommitResponse
- type CompositeFilter
- type Empty
- type Entity
- type EntityResult
- type Filter
- type GoogleDatastoreAdminV1CommonMetadata
- type GoogleDatastoreAdminV1EntityFilter
- type GoogleDatastoreAdminV1ExportEntitiesMetadata
- type GoogleDatastoreAdminV1ExportEntitiesRequest
- type GoogleDatastoreAdminV1ExportEntitiesResponse
- type GoogleDatastoreAdminV1ImportEntitiesMetadata
- type GoogleDatastoreAdminV1ImportEntitiesRequest
- type GoogleDatastoreAdminV1Index
- type GoogleDatastoreAdminV1IndexOperationMetadata
- type GoogleDatastoreAdminV1IndexedProperty
- type GoogleDatastoreAdminV1ListIndexesResponse
- type GoogleDatastoreAdminV1Progress
- type GoogleDatastoreAdminV1beta1CommonMetadata
- type GoogleDatastoreAdminV1beta1EntityFilter
- type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
- type GoogleDatastoreAdminV1beta1ExportEntitiesResponse
- type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
- type GoogleDatastoreAdminV1beta1Progress
- type GoogleLongrunningListOperationsResponse
- type GoogleLongrunningOperation
- type GqlQuery
- type GqlQueryParameter
- type Key
- type KindExpression
- type LatLng
- type LookupRequest
- type LookupResponse
- type Mutation
- type MutationResult
- type PartitionId
- type PathElement
- type Projection
- type ProjectsAllocateIdsCall
- func (c *ProjectsAllocateIdsCall) Context(ctx context.Context) *ProjectsAllocateIdsCall
- func (c *ProjectsAllocateIdsCall) Do(opts ...googleapi.CallOption) (*AllocateIdsResponse, error)
- func (c *ProjectsAllocateIdsCall) Fields(s ...googleapi.Field) *ProjectsAllocateIdsCall
- func (c *ProjectsAllocateIdsCall) Header() http.Header
- type ProjectsBeginTransactionCall
- func (c *ProjectsBeginTransactionCall) Context(ctx context.Context) *ProjectsBeginTransactionCall
- func (c *ProjectsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error)
- func (c *ProjectsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsBeginTransactionCall
- func (c *ProjectsBeginTransactionCall) Header() http.Header
- type ProjectsCommitCall
- type ProjectsExportCall
- func (c *ProjectsExportCall) Context(ctx context.Context) *ProjectsExportCall
- func (c *ProjectsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
- func (c *ProjectsExportCall) Fields(s ...googleapi.Field) *ProjectsExportCall
- func (c *ProjectsExportCall) Header() http.Header
- type ProjectsImportCall
- func (c *ProjectsImportCall) Context(ctx context.Context) *ProjectsImportCall
- func (c *ProjectsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
- func (c *ProjectsImportCall) Fields(s ...googleapi.Field) *ProjectsImportCall
- func (c *ProjectsImportCall) Header() http.Header
- type ProjectsIndexesGetCall
- func (c *ProjectsIndexesGetCall) Context(ctx context.Context) *ProjectsIndexesGetCall
- func (c *ProjectsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1Index, error)
- func (c *ProjectsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsIndexesGetCall
- func (c *ProjectsIndexesGetCall) Header() http.Header
- func (c *ProjectsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsIndexesGetCall
- type ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) Context(ctx context.Context) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1ListIndexesResponse, error)
- func (c *ProjectsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) Filter(filter string) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) Header() http.Header
- func (c *ProjectsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) PageSize(pageSize int64) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) PageToken(pageToken string) *ProjectsIndexesListCall
- func (c *ProjectsIndexesListCall) Pages(ctx context.Context, f func(*GoogleDatastoreAdminV1ListIndexesResponse) error) error
- type ProjectsIndexesService
- type ProjectsLookupCall
- type ProjectsOperationsCancelCall
- func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall
- func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall
- func (c *ProjectsOperationsCancelCall) Header() http.Header
- type ProjectsOperationsDeleteCall
- func (c *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall
- func (c *ProjectsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall
- func (c *ProjectsOperationsDeleteCall) Header() http.Header
- type ProjectsOperationsGetCall
- func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall
- func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
- func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall
- func (c *ProjectsOperationsGetCall) Header() http.Header
- func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall
- type ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error)
- func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) Header() http.Header
- func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall
- func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error
- type ProjectsOperationsService
- func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall
- func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall
- func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall
- func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall
- type ProjectsReserveIdsCall
- func (c *ProjectsReserveIdsCall) Context(ctx context.Context) *ProjectsReserveIdsCall
- func (c *ProjectsReserveIdsCall) Do(opts ...googleapi.CallOption) (*ReserveIdsResponse, error)
- func (c *ProjectsReserveIdsCall) Fields(s ...googleapi.Field) *ProjectsReserveIdsCall
- func (c *ProjectsReserveIdsCall) Header() http.Header
- type ProjectsRollbackCall
- func (c *ProjectsRollbackCall) Context(ctx context.Context) *ProjectsRollbackCall
- func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackResponse, error)
- func (c *ProjectsRollbackCall) Fields(s ...googleapi.Field) *ProjectsRollbackCall
- func (c *ProjectsRollbackCall) Header() http.Header
- type ProjectsRunQueryCall
- func (c *ProjectsRunQueryCall) Context(ctx context.Context) *ProjectsRunQueryCall
- func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error)
- func (c *ProjectsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsRunQueryCall
- func (c *ProjectsRunQueryCall) Header() http.Header
- type ProjectsService
- func (r *ProjectsService) AllocateIds(projectId string, allocateidsrequest *AllocateIdsRequest) *ProjectsAllocateIdsCall
- func (r *ProjectsService) BeginTransaction(projectId string, begintransactionrequest *BeginTransactionRequest) *ProjectsBeginTransactionCall
- func (r *ProjectsService) Commit(projectId string, commitrequest *CommitRequest) *ProjectsCommitCall
- func (r *ProjectsService) Export(projectId string, ...) *ProjectsExportCall
- func (r *ProjectsService) Import(projectId string, ...) *ProjectsImportCall
- func (r *ProjectsService) Lookup(projectId string, lookuprequest *LookupRequest) *ProjectsLookupCall
- func (r *ProjectsService) ReserveIds(projectId string, reserveidsrequest *ReserveIdsRequest) *ProjectsReserveIdsCall
- func (r *ProjectsService) Rollback(projectId string, rollbackrequest *RollbackRequest) *ProjectsRollbackCall
- func (r *ProjectsService) RunQuery(projectId string, runqueryrequest *RunQueryRequest) *ProjectsRunQueryCall
- type PropertyFilter
- type PropertyOrder
- type PropertyReference
- type Query
- type QueryResultBatch
- type ReadOnly
- type ReadOptions
- type ReadWrite
- type ReserveIdsRequest
- type ReserveIdsResponse
- type RollbackRequest
- type RollbackResponse
- type RunQueryRequest
- type RunQueryResponse
- type Service
- type Status
- type TransactionOptions
- type Value
Constants ¶
const ( // View and manage your data across Google Cloud Platform services CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" // View and manage your Google Cloud Datastore data DatastoreScope = "https://www.googleapis.com/auth/datastore" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocateIdsRequest ¶
type AllocateIdsRequest struct { // Keys: A list of keys with incomplete key paths for which to allocate // IDs. // No key may be reserved/read-only. Keys []*Key `json:"keys,omitempty"` // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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:"-"` }
AllocateIdsRequest: The request for Datastore.AllocateIds.
func (*AllocateIdsRequest) MarshalJSON ¶
func (s *AllocateIdsRequest) MarshalJSON() ([]byte, error)
type AllocateIdsResponse ¶
type AllocateIdsResponse struct { // Keys: The keys specified in the request (in the same order), each // with // its key path completed with a newly allocated ID. Keys []*Key `json:"keys,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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:"-"` }
AllocateIdsResponse: The response for Datastore.AllocateIds.
func (*AllocateIdsResponse) MarshalJSON ¶
func (s *AllocateIdsResponse) MarshalJSON() ([]byte, error)
type ArrayValue ¶
type ArrayValue struct { // Values: Values in the array. // The order of values in an array is preserved as long as all values // have // identical settings for 'exclude_from_indexes'. Values []*Value `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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:"-"` }
ArrayValue: An array value.
func (*ArrayValue) MarshalJSON ¶
func (s *ArrayValue) MarshalJSON() ([]byte, error)
type BeginTransactionRequest ¶
type BeginTransactionRequest struct { // TransactionOptions: Options for a new transaction. TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"` // ForceSendFields is a list of field names (e.g. "TransactionOptions") // 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. "TransactionOptions") 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:"-"` }
BeginTransactionRequest: The request for Datastore.BeginTransaction.
func (*BeginTransactionRequest) MarshalJSON ¶
func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error)
type BeginTransactionResponse ¶
type BeginTransactionResponse struct { // Transaction: The transaction identifier (always present). Transaction string `json:"transaction,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Transaction") 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. "Transaction") 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:"-"` }
BeginTransactionResponse: The response for Datastore.BeginTransaction.
func (*BeginTransactionResponse) MarshalJSON ¶
func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error)
type CommitRequest ¶
type CommitRequest struct { // Mode: The type of commit to perform. Defaults to `TRANSACTIONAL`. // // Possible values: // "MODE_UNSPECIFIED" - Unspecified. This value must not be used. // "TRANSACTIONAL" - Transactional: The mutations are either all // applied, or none are applied. // Learn about // transactions // [here](https://cloud.google.com/datastore/docs/concepts/t // ransactions). // "NON_TRANSACTIONAL" - Non-transactional: The mutations may not // apply as all or none. Mode string `json:"mode,omitempty"` // Mutations: The mutations to perform. // // When mode is `TRANSACTIONAL`, mutations affecting a single entity // are // applied in order. The following sequences of mutations affecting a // single // entity are not permitted in a single `Commit` request: // // - `insert` followed by `insert` // - `update` followed by `insert` // - `upsert` followed by `insert` // - `delete` followed by `update` // // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a // single // entity. Mutations []*Mutation `json:"mutations,omitempty"` // Transaction: The identifier of the transaction associated with the // commit. A // transaction identifier is returned by a call // to // Datastore.BeginTransaction. Transaction string `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "Mode") 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. "Mode") 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:"-"` }
CommitRequest: The request for Datastore.Commit.
func (*CommitRequest) MarshalJSON ¶
func (s *CommitRequest) MarshalJSON() ([]byte, error)
type CommitResponse ¶
type CommitResponse struct { // IndexUpdates: The number of index entries updated during the commit, // or zero if none were // updated. IndexUpdates int64 `json:"indexUpdates,omitempty"` // MutationResults: The result of performing the mutations. // The i-th mutation result corresponds to the i-th mutation in the // request. MutationResults []*MutationResult `json:"mutationResults,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "IndexUpdates") 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. "IndexUpdates") 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:"-"` }
CommitResponse: The response for Datastore.Commit.
func (*CommitResponse) MarshalJSON ¶
func (s *CommitResponse) MarshalJSON() ([]byte, error)
type CompositeFilter ¶
type CompositeFilter struct { // Filters: The list of filters to combine. // Must contain at least one filter. Filters []*Filter `json:"filters,omitempty"` // Op: The operator for combining multiple filters. // // Possible values: // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used. // "AND" - The results are required to satisfy each of the combined // filters. Op string `json:"op,omitempty"` // ForceSendFields is a list of field names (e.g. "Filters") 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. "Filters") 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:"-"` }
CompositeFilter: A filter that merges multiple other filters using the given operator.
func (*CompositeFilter) MarshalJSON ¶
func (s *CompositeFilter) MarshalJSON() ([]byte, error)
type Empty ¶
type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` }
Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo { rpc Bar(google.protobuf.Empty) returns
(google.protobuf.Empty);
}
The JSON representation for `Empty` is empty JSON object `{}`.
type Entity ¶
type Entity struct { // Key: The entity's key. // // An entity must have a key, unless otherwise documented (for // example, // an entity in `Value.entity_value` may have no key). // An entity's kind is its key path's last element's kind, // or null if it has no key. Key *Key `json:"key,omitempty"` // Properties: The entity's properties. // The map's keys are property names. // A property name matching regex `__.*__` is reserved. // A reserved property name is forbidden in certain documented // contexts. // The name must not contain more than 500 characters. // The name cannot be "". Properties map[string]Value `json:"properties,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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:"-"` }
Entity: A Datastore data object.
An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message.
func (*Entity) MarshalJSON ¶
type EntityResult ¶
type EntityResult struct { // Cursor: A cursor that points to the position after the result // entity. // Set only when the `EntityResult` is part of a `QueryResultBatch` // message. Cursor string `json:"cursor,omitempty"` // Entity: The resulting entity. Entity *Entity `json:"entity,omitempty"` // Version: The version of the entity, a strictly positive number that // monotonically // increases with changes to the entity. // // This field is set for `FULL` entity // results. // // For missing entities in `LookupResponse`, this // is the version of the snapshot that was used to look up the entity, // and it // is always set except for eventually consistent reads. Version int64 `json:"version,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Cursor") 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. "Cursor") 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:"-"` }
EntityResult: The result of fetching an entity from Datastore.
func (*EntityResult) MarshalJSON ¶
func (s *EntityResult) MarshalJSON() ([]byte, error)
type Filter ¶
type Filter struct { // CompositeFilter: A composite filter. CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"` // PropertyFilter: A filter on a property. PropertyFilter *PropertyFilter `json:"propertyFilter,omitempty"` // ForceSendFields is a list of field names (e.g. "CompositeFilter") 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. "CompositeFilter") 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:"-"` }
Filter: A holder for any type of filter.
func (*Filter) MarshalJSON ¶
type GoogleDatastoreAdminV1CommonMetadata ¶
type GoogleDatastoreAdminV1CommonMetadata struct { // EndTime: The time the operation ended, either successfully or // otherwise. EndTime string `json:"endTime,omitempty"` // Labels: The client-assigned labels which were provided when the // operation was // created. May also include additional labels. Labels map[string]string `json:"labels,omitempty"` // OperationType: The type of the operation. Can be used as a filter // in // ListOperationsRequest. // // Possible values: // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. // "EXPORT_ENTITIES" - ExportEntities. // "IMPORT_ENTITIES" - ImportEntities. // "CREATE_INDEX" - CreateIndex. // "DELETE_INDEX" - DeleteIndex. OperationType string `json:"operationType,omitempty"` // StartTime: The time that work began on the operation. StartTime string `json:"startTime,omitempty"` // State: The current state of the Operation. // // Possible values: // "STATE_UNSPECIFIED" - Unspecified. // "INITIALIZING" - Request is being prepared for processing. // "PROCESSING" - Request is actively being processed. // "CANCELLING" - Request is in the process of being cancelled after // user called // google.longrunning.Operations.CancelOperation on the operation. // "FINALIZING" - Request has been processed and is in its // finalization stage. // "SUCCESSFUL" - Request has completed successfully. // "FAILED" - Request has finished being processed, but encountered an // error. // "CANCELLED" - Request has finished being cancelled after user // called // google.longrunning.Operations.CancelOperation. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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:"-"` }
GoogleDatastoreAdminV1CommonMetadata: Metadata common to all Datastore Admin operations.
func (*GoogleDatastoreAdminV1CommonMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1CommonMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1EntityFilter ¶
type GoogleDatastoreAdminV1EntityFilter struct { // Kinds: If empty, then this represents all kinds. Kinds []string `json:"kinds,omitempty"` // NamespaceIds: An empty list represents all namespaces. This is the // preferred // usage for projects that don't use namespaces. // // An empty string element represents the default namespace. This should // be // used if the project has data in non-default namespaces, but doesn't // want to // include them. // Each namespace in this list must be unique. NamespaceIds []string `json:"namespaceIds,omitempty"` // ForceSendFields is a list of field names (e.g. "Kinds") 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. "Kinds") 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:"-"` }
GoogleDatastoreAdminV1EntityFilter: Identifies a subset of entities in a project. This is specified as combinations of kinds and namespaces (either or both of which may be all, as described in the following examples). Example usage:
Entire project:
kinds=[], namespace_ids=[]
Kinds Foo and Bar in all namespaces:
kinds=['Foo', 'Bar'], namespace_ids=[]
Kinds Foo and Bar only in the default namespace:
kinds=['Foo', 'Bar'], namespace_ids=['']
Kinds Foo and Bar in both the default and Baz namespaces:
kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
The entire Baz namespace:
kinds=[], namespace_ids=['Baz']
func (*GoogleDatastoreAdminV1EntityFilter) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1EntityFilter) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ExportEntitiesMetadata ¶
type GoogleDatastoreAdminV1ExportEntitiesMetadata struct { // Common: Metadata common to all Datastore Admin operations. Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` // EntityFilter: Description of which entities are being exported. EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` // OutputUrlPrefix: Location for the export metadata and data files. // This will be the same // value as // the // google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix // // field. The final output location is provided // in // google.datastore.admin.v1.ExportEntitiesResponse.output_url. OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` // ProgressBytes: An estimate of the number of bytes processed. ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"` // ProgressEntities: An estimate of the number of entities processed. ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") 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:"-"` }
GoogleDatastoreAdminV1ExportEntitiesMetadata: Metadata for ExportEntities operations.
func (*GoogleDatastoreAdminV1ExportEntitiesMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ExportEntitiesMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ExportEntitiesRequest ¶
type GoogleDatastoreAdminV1ExportEntitiesRequest struct { // EntityFilter: Description of what data from the project is included // in the export. EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` // Labels: Client-assigned labels. Labels map[string]string `json:"labels,omitempty"` // OutputUrlPrefix: Location for the export metadata and data // files. // // The full resource URL of the external storage location. Currently, // only // Google Cloud Storage is supported. So output_url_prefix should be of // the // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is // the // name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional // Cloud // Storage namespace path (this is not a Cloud Datastore namespace). For // more // information about Cloud Storage namespace paths, see // [Object // name // considerations](https://cloud.google.com/storage/docs/naming#obje // ct-considerations). // // The resulting files will be nested deeper than the specified URL // prefix. // The final output URL will be provided in // the // google.datastore.admin.v1.ExportEntitiesResponse.output_url field. // That // value should be used for subsequent ImportEntities operations. // // By nesting the data files deeper, the same Cloud Storage bucket can // be used // in multiple ExportEntities operations without conflict. OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` // ForceSendFields is a list of field names (e.g. "EntityFilter") 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. "EntityFilter") 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:"-"` }
GoogleDatastoreAdminV1ExportEntitiesRequest: The request for google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
func (*GoogleDatastoreAdminV1ExportEntitiesRequest) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ExportEntitiesRequest) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ExportEntitiesResponse ¶
type GoogleDatastoreAdminV1ExportEntitiesResponse struct { // OutputUrl: Location of the output metadata file. This can be used to // begin an import // into Cloud Datastore (this project or another project). // See // google.datastore.admin.v1.ImportEntitiesRequest.input_url. // Only present if the operation completed successfully. OutputUrl string `json:"outputUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "OutputUrl") 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. "OutputUrl") 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:"-"` }
GoogleDatastoreAdminV1ExportEntitiesResponse: The response for google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
func (*GoogleDatastoreAdminV1ExportEntitiesResponse) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ExportEntitiesResponse) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ImportEntitiesMetadata ¶
type GoogleDatastoreAdminV1ImportEntitiesMetadata struct { // Common: Metadata common to all Datastore Admin operations. Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` // EntityFilter: Description of which entities are being imported. EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` // InputUrl: The location of the import metadata file. This will be the // same value as // the google.datastore.admin.v1.ExportEntitiesResponse.output_url // field. InputUrl string `json:"inputUrl,omitempty"` // ProgressBytes: An estimate of the number of bytes processed. ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"` // ProgressEntities: An estimate of the number of entities processed. ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") 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:"-"` }
GoogleDatastoreAdminV1ImportEntitiesMetadata: Metadata for ImportEntities operations.
func (*GoogleDatastoreAdminV1ImportEntitiesMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ImportEntitiesMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ImportEntitiesRequest ¶
type GoogleDatastoreAdminV1ImportEntitiesRequest struct { // EntityFilter: Optionally specify which kinds/namespaces are to be // imported. If provided, // the list must be a subset of the EntityFilter used in creating the // export, // otherwise a FAILED_PRECONDITION error will be returned. If no filter // is // specified then all entities from the export are imported. EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` // InputUrl: The full resource URL of the external storage location. // Currently, only // Google Cloud Storage is supported. So input_url should be of the // form: // `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE` // , where // `BUCKET_NAME` is the name of the Cloud Storage bucket, // `NAMESPACE_PATH` is // an optional Cloud Storage namespace path (this is not a Cloud // Datastore // namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file // written // by the ExportEntities operation. For more information about Cloud // Storage // namespace paths, see // [Object // name // considerations](https://cloud.google.com/storage/docs/naming#obje // ct-considerations). // // For more information, // see // google.datastore.admin.v1.ExportEntitiesResponse.output_url. InputUrl string `json:"inputUrl,omitempty"` // Labels: Client-assigned labels. Labels map[string]string `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "EntityFilter") 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. "EntityFilter") 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:"-"` }
GoogleDatastoreAdminV1ImportEntitiesRequest: The request for google.datastore.admin.v1.DatastoreAdmin.ImportEntities.
func (*GoogleDatastoreAdminV1ImportEntitiesRequest) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ImportEntitiesRequest) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1Index ¶
type GoogleDatastoreAdminV1Index struct { // Ancestor: The index's ancestor mode. Must not be // ANCESTOR_MODE_UNSPECIFIED. // Required. // // Possible values: // "ANCESTOR_MODE_UNSPECIFIED" - The ancestor mode is unspecified. // "NONE" - Do not include the entity's ancestors in the index. // "ALL_ANCESTORS" - Include all the entity's ancestors in the index. Ancestor string `json:"ancestor,omitempty"` // IndexId: The resource ID of the index. // Output only. IndexId string `json:"indexId,omitempty"` // Kind: The entity kind to which this index applies. // Required. Kind string `json:"kind,omitempty"` // ProjectId: Project ID. // Output only. ProjectId string `json:"projectId,omitempty"` // Properties: An ordered sequence of property names and their index // attributes. // Required. Properties []*GoogleDatastoreAdminV1IndexedProperty `json:"properties,omitempty"` // State: The state of the index. // Output only. // // Possible values: // "STATE_UNSPECIFIED" - The state is unspecified. // "CREATING" - The index is being created, and cannot be used by // queries. // There is an active long-running operation for the index. // The index is updated when writing an entity. // Some index data may exist. // "READY" - The index is ready to be used. // The index is updated when writing an entity. // The index is fully populated from all stored entities it applies to. // "DELETING" - The index is being deleted, and cannot be used by // queries. // There is an active long-running operation for the index. // The index is not updated when writing an entity. // Some index data may exist. // "ERROR" - The index was being created or deleted, but something // went wrong. // The index cannot by used by queries. // There is no active long-running operation for the index, // and the most recently finished long-running operation failed. // The index is not updated when writing an entity. // Some index data may exist. State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Ancestor") 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. "Ancestor") 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:"-"` }
GoogleDatastoreAdminV1Index: A minimal index definition.
func (*GoogleDatastoreAdminV1Index) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1Index) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1IndexOperationMetadata ¶
type GoogleDatastoreAdminV1IndexOperationMetadata struct { // Common: Metadata common to all Datastore Admin operations. Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` // IndexId: The index resource ID that this operation is acting on. IndexId string `json:"indexId,omitempty"` // ProgressEntities: An estimate of the number of entities processed. ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") 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:"-"` }
GoogleDatastoreAdminV1IndexOperationMetadata: Metadata for Index operations.
func (*GoogleDatastoreAdminV1IndexOperationMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1IndexedProperty ¶
type GoogleDatastoreAdminV1IndexedProperty struct { // Direction: The indexed property's direction. Must not be // DIRECTION_UNSPECIFIED. // Required. // // Possible values: // "DIRECTION_UNSPECIFIED" - The direction is unspecified. // "ASCENDING" - The property's values are indexed so as to support // sequencing in // ascending order and also query by <, >, <=, >=, and =. // "DESCENDING" - The property's values are indexed so as to support // sequencing in // descending order and also query by <, >, <=, >=, and =. Direction string `json:"direction,omitempty"` // Name: The property name to index. // Required. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Direction") 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. "Direction") 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:"-"` }
GoogleDatastoreAdminV1IndexedProperty: A property of an index.
func (*GoogleDatastoreAdminV1IndexedProperty) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1IndexedProperty) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1ListIndexesResponse ¶
type GoogleDatastoreAdminV1ListIndexesResponse struct { // Indexes: The indexes. Indexes []*GoogleDatastoreAdminV1Index `json:"indexes,omitempty"` // NextPageToken: The standard List next-page token. 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. "Indexes") 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. "Indexes") 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:"-"` }
GoogleDatastoreAdminV1ListIndexesResponse: The response for google.datastore.admin.v1.DatastoreAdmin.ListIndexes.
func (*GoogleDatastoreAdminV1ListIndexesResponse) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1ListIndexesResponse) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1Progress ¶
type GoogleDatastoreAdminV1Progress struct { // WorkCompleted: The amount of work that has been completed. Note that // this may be greater // than work_estimated. WorkCompleted int64 `json:"workCompleted,omitempty,string"` // WorkEstimated: An estimate of how much work needs to be performed. // May be zero if the // work estimate is unavailable. WorkEstimated int64 `json:"workEstimated,omitempty,string"` // ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") 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:"-"` }
GoogleDatastoreAdminV1Progress: Measures the progress of a particular metric.
func (*GoogleDatastoreAdminV1Progress) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1CommonMetadata ¶
type GoogleDatastoreAdminV1beta1CommonMetadata struct { // EndTime: The time the operation ended, either successfully or // otherwise. EndTime string `json:"endTime,omitempty"` // Labels: The client-assigned labels which were provided when the // operation was // created. May also include additional labels. Labels map[string]string `json:"labels,omitempty"` // OperationType: The type of the operation. Can be used as a filter // in // ListOperationsRequest. // // Possible values: // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. // "EXPORT_ENTITIES" - ExportEntities. // "IMPORT_ENTITIES" - ImportEntities. OperationType string `json:"operationType,omitempty"` // StartTime: The time that work began on the operation. StartTime string `json:"startTime,omitempty"` // State: The current state of the Operation. // // Possible values: // "STATE_UNSPECIFIED" - Unspecified. // "INITIALIZING" - Request is being prepared for processing. // "PROCESSING" - Request is actively being processed. // "CANCELLING" - Request is in the process of being cancelled after // user called // google.longrunning.Operations.CancelOperation on the operation. // "FINALIZING" - Request has been processed and is in its // finalization stage. // "SUCCESSFUL" - Request has completed successfully. // "FAILED" - Request has finished being processed, but encountered an // error. // "CANCELLED" - Request has finished being cancelled after user // called // google.longrunning.Operations.CancelOperation. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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:"-"` }
GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all Datastore Admin operations.
func (*GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1EntityFilter ¶
type GoogleDatastoreAdminV1beta1EntityFilter struct { // Kinds: If empty, then this represents all kinds. Kinds []string `json:"kinds,omitempty"` // NamespaceIds: An empty list represents all namespaces. This is the // preferred // usage for projects that don't use namespaces. // // An empty string element represents the default namespace. This should // be // used if the project has data in non-default namespaces, but doesn't // want to // include them. // Each namespace in this list must be unique. NamespaceIds []string `json:"namespaceIds,omitempty"` // ForceSendFields is a list of field names (e.g. "Kinds") 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. "Kinds") 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:"-"` }
GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of entities in a project. This is specified as combinations of kinds and namespaces (either or both of which may be all, as described in the following examples). Example usage:
Entire project:
kinds=[], namespace_ids=[]
Kinds Foo and Bar in all namespaces:
kinds=['Foo', 'Bar'], namespace_ids=[]
Kinds Foo and Bar only in the default namespace:
kinds=['Foo', 'Bar'], namespace_ids=['']
Kinds Foo and Bar in both the default and Baz namespaces:
kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
The entire Baz namespace:
kinds=[], namespace_ids=['Baz']
func (*GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata ¶
type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct { // Common: Metadata common to all Datastore Admin operations. Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` // EntityFilter: Description of which entities are being exported. EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` // OutputUrlPrefix: Location for the export metadata and data files. // This will be the same // value as // the // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_pr // efix // field. The final output location is provided // in // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` // ProgressBytes: An estimate of the number of bytes processed. ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` // ProgressEntities: An estimate of the number of entities processed. ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") 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:"-"` }
GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for ExportEntities operations.
func (*GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1ExportEntitiesResponse ¶
type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct { // OutputUrl: Location of the output metadata file. This can be used to // begin an import // into Cloud Datastore (this project or another project). // See // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. // On // ly present if the operation completed successfully. OutputUrl string `json:"outputUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "OutputUrl") 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. "OutputUrl") 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:"-"` }
GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response for google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
func (*GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata ¶
type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct { // Common: Metadata common to all Datastore Admin operations. Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` // EntityFilter: Description of which entities are being imported. EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` // InputUrl: The location of the import metadata file. This will be the // same value as // the // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url // field // . InputUrl string `json:"inputUrl,omitempty"` // ProgressBytes: An estimate of the number of bytes processed. ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` // ProgressEntities: An estimate of the number of entities processed. ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") 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. "Common") 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:"-"` }
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for ImportEntities operations.
func (*GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error)
type GoogleDatastoreAdminV1beta1Progress ¶
type GoogleDatastoreAdminV1beta1Progress struct { // WorkCompleted: The amount of work that has been completed. Note that // this may be greater // than work_estimated. WorkCompleted int64 `json:"workCompleted,omitempty,string"` // WorkEstimated: An estimate of how much work needs to be performed. // May be zero if the // work estimate is unavailable. WorkEstimated int64 `json:"workEstimated,omitempty,string"` // ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") 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:"-"` }
GoogleDatastoreAdminV1beta1Progress: Measures the progress of a particular metric.
func (*GoogleDatastoreAdminV1beta1Progress) MarshalJSON ¶
func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error)
type GoogleLongrunningListOperationsResponse ¶
type GoogleLongrunningListOperationsResponse struct { // NextPageToken: The standard List next-page token. NextPageToken string `json:"nextPageToken,omitempty"` // Operations: A list of operations that matches the specified filter in // the request. Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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:"-"` }
GoogleLongrunningListOperationsResponse: The response message for Operations.ListOperations.
func (*GoogleLongrunningListOperationsResponse) MarshalJSON ¶
func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error)
type GoogleLongrunningOperation ¶
type GoogleLongrunningOperation struct { // Done: If the value is `false`, it means the operation is still in // progress. // If `true`, the operation is completed, and either `error` or // `response` is // available. Done bool `json:"done,omitempty"` // Error: The error result of the operation in case of failure or // cancellation. Error *Status `json:"error,omitempty"` // Metadata: Service-specific metadata associated with the operation. // It typically // contains progress information and common metadata such as create // time. // Some services might not provide such metadata. Any method that // returns a // long-running operation should document the metadata type, if any. Metadata googleapi.RawMessage `json:"metadata,omitempty"` // Name: The server-assigned name, which is only unique within the same // service that // originally returns it. If you use the default HTTP mapping, // the // `name` should have the format of `operations/some/unique/name`. Name string `json:"name,omitempty"` // Response: The normal response of the operation in case of success. // If the original // method returns no data on success, such as `Delete`, the response // is // `google.protobuf.Empty`. If the original method is // standard // `Get`/`Create`/`Update`, the response should be the resource. For // other // methods, the response should have the type `XxxResponse`, where // `Xxx` // is the original method name. For example, if the original method // name // is `TakeSnapshot()`, the inferred response type // is // `TakeSnapshotResponse`. Response googleapi.RawMessage `json:"response,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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:"-"` }
GoogleLongrunningOperation: This resource represents a long-running operation that is the result of a network API call.
func (*GoogleLongrunningOperation) MarshalJSON ¶
func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error)
type GqlQuery ¶
type GqlQuery struct { // AllowLiterals: When false, the query string must not contain any // literals and instead must // bind all values. For example, // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, // while // `SELECT * FROM Kind WHERE a = @value` is. AllowLiterals bool `json:"allowLiterals,omitempty"` // NamedBindings: For each non-reserved named binding site in the query // string, there must be // a named parameter with that name, but not necessarily the // inverse. // // Key must match regex `A-Za-z_$*`, must not match regex // `__.*__`, and must not be "". NamedBindings map[string]GqlQueryParameter `json:"namedBindings,omitempty"` // PositionalBindings: Numbered binding site @1 references the first // numbered parameter, // effectively using 1-based indexing, rather than the usual 0. // // For each binding site numbered i in `query_string`, there must be an // i-th // numbered parameter. The inverse must also be true. PositionalBindings []*GqlQueryParameter `json:"positionalBindings,omitempty"` // QueryString: A string of the format // described // [here](https://cloud.google.com/datastore/docs/apis/gql/gql_ // reference). QueryString string `json:"queryString,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowLiterals") 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. "AllowLiterals") 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:"-"` }
GqlQuery: A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_refer ence).
func (*GqlQuery) MarshalJSON ¶
type GqlQueryParameter ¶
type GqlQueryParameter struct { // Cursor: A query cursor. Query cursors are returned in query // result batches. Cursor string `json:"cursor,omitempty"` // Value: A value parameter. Value *Value `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Cursor") 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. "Cursor") 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:"-"` }
GqlQueryParameter: A binding parameter for a GQL query.
func (*GqlQueryParameter) MarshalJSON ¶
func (s *GqlQueryParameter) MarshalJSON() ([]byte, error)
type Key ¶
type Key struct { // PartitionId: Entities are partitioned into subsets, currently // identified by a project // ID and namespace ID. // Queries are scoped to a single partition. PartitionId *PartitionId `json:"partitionId,omitempty"` // Path: The entity path. // An entity path consists of one or more elements composed of a kind // and a // string or numerical identifier, which identify entities. The // first // element identifies a _root entity_, the second element identifies // a _child_ of the root entity, the third element identifies a child of // the // second entity, and so forth. The entities identified by all prefixes // of // the path are called the element's _ancestors_. // // An entity path is always fully complete: *all* of the entity's // ancestors // are required to be in the path along with the entity identifier // itself. // The only exception is that in some documented cases, the identifier // in the // last path element (for the entity) itself may be omitted. For // example, // the last path element of the key of `Mutation.insert` may have // no // identifier. // // A path can never be empty, and a path can have at most 100 elements. Path []*PathElement `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "PartitionId") 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. "PartitionId") 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:"-"` }
Key: A unique identifier for an entity. If a key's partition ID or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.
func (*Key) MarshalJSON ¶
type KindExpression ¶
type KindExpression struct { // Name: The name of the kind. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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:"-"` }
KindExpression: A representation of a kind.
func (*KindExpression) MarshalJSON ¶
func (s *KindExpression) MarshalJSON() ([]byte, error)
type LatLng ¶
type LatLng struct { // Latitude: The latitude in degrees. It must be in the range [-90.0, // +90.0]. Latitude float64 `json:"latitude,omitempty"` // Longitude: The longitude in degrees. It must be in the range [-180.0, // +180.0]. Longitude float64 `json:"longitude,omitempty"` // ForceSendFields is a list of field names (e.g. "Latitude") 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. "Latitude") 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:"-"` }
LatLng: An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 st andard</a>. Values must be within normalized ranges.
func (*LatLng) MarshalJSON ¶
func (*LatLng) UnmarshalJSON ¶
type LookupRequest ¶
type LookupRequest struct { // Keys: Keys of entities to look up. Keys []*Key `json:"keys,omitempty"` // ReadOptions: The options for this lookup request. ReadOptions *ReadOptions `json:"readOptions,omitempty"` // ForceSendFields is a list of field names (e.g. "Keys") 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. "Keys") 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:"-"` }
LookupRequest: The request for Datastore.Lookup.
func (*LookupRequest) MarshalJSON ¶
func (s *LookupRequest) MarshalJSON() ([]byte, error)
type LookupResponse ¶
type LookupResponse struct { // Deferred: A list of keys that were not looked up due to resource // constraints. The // order of results in this field is undefined and has no relation to // the // order of the keys in the input. Deferred []*Key `json:"deferred,omitempty"` // Found: Entities found as `ResultType.FULL` entities. The order of // results in this // field is undefined and has no relation to the order of the keys in // the // input. Found []*EntityResult `json:"found,omitempty"` // Missing: Entities not found as `ResultType.KEY_ONLY` entities. The // order of results // in this field is undefined and has no relation to the order of the // keys // in the input. Missing []*EntityResult `json:"missing,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Deferred") 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. "Deferred") 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:"-"` }
LookupResponse: The response for Datastore.Lookup.
func (*LookupResponse) MarshalJSON ¶
func (s *LookupResponse) MarshalJSON() ([]byte, error)
type Mutation ¶
type Mutation struct { // BaseVersion: The version of the entity that this mutation is being // applied to. If this // does not match the current version on the server, the mutation // conflicts. BaseVersion int64 `json:"baseVersion,omitempty,string"` // Delete: The key of the entity to delete. The entity may or may not // already exist. // Must have a complete key path and must not be reserved/read-only. Delete *Key `json:"delete,omitempty"` // Insert: The entity to insert. The entity must not already exist. // The entity key's final path element may be incomplete. Insert *Entity `json:"insert,omitempty"` // Update: The entity to update. The entity must already exist. // Must have a complete key path. Update *Entity `json:"update,omitempty"` // Upsert: The entity to upsert. The entity may or may not already // exist. // The entity key's final path element may be incomplete. Upsert *Entity `json:"upsert,omitempty"` // ForceSendFields is a list of field names (e.g. "BaseVersion") 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. "BaseVersion") 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:"-"` }
Mutation: A mutation to apply to an entity.
func (*Mutation) MarshalJSON ¶
type MutationResult ¶
type MutationResult struct { // ConflictDetected: Whether a conflict was detected for this mutation. // Always false when a // conflict detection strategy field is not set in the mutation. ConflictDetected bool `json:"conflictDetected,omitempty"` // Key: The automatically allocated key. // Set only when the mutation allocated a key. Key *Key `json:"key,omitempty"` // Version: The version of the entity on the server after processing the // mutation. If // the mutation doesn't change anything on the server, then the version // will // be the version of the current entity or, if no entity is present, a // version // that is strictly greater than the version of any previous entity and // less // than the version of any possible future entity. Version int64 `json:"version,omitempty,string"` // ForceSendFields is a list of field names (e.g. "ConflictDetected") 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. "ConflictDetected") 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:"-"` }
MutationResult: The result of applying a mutation.
func (*MutationResult) MarshalJSON ¶
func (s *MutationResult) MarshalJSON() ([]byte, error)
type PartitionId ¶
type PartitionId struct { // NamespaceId: If not empty, the ID of the namespace to which the // entities belong. NamespaceId string `json:"namespaceId,omitempty"` // ProjectId: The ID of the project to which the entities belong. ProjectId string `json:"projectId,omitempty"` // ForceSendFields is a list of field names (e.g. "NamespaceId") 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. "NamespaceId") 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:"-"` }
PartitionId: A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty.
A partition ID contains several dimensions: project ID and namespace ID.
Partition dimensions:
- May be "". - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts.
Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state.
func (*PartitionId) MarshalJSON ¶
func (s *PartitionId) MarshalJSON() ([]byte, error)
type PathElement ¶
type PathElement struct { // Id: The auto-allocated ID of the entity. // Never equal to zero. Values less than zero are discouraged and may // not // be supported in the future. Id int64 `json:"id,omitempty,string"` // Kind: The kind of the entity. // A kind matching regex `__.*__` is reserved/read-only. // A kind must not contain more than 1500 bytes when UTF-8 // encoded. // Cannot be "". Kind string `json:"kind,omitempty"` // Name: The name of the entity. // A name matching regex `__.*__` is reserved/read-only. // A name must not be more than 1500 bytes when UTF-8 encoded. // Cannot be "". Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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:"-"` }
PathElement: A (kind, ID/name) pair used to construct a key path.
If either name or ID is set, the element is complete. If neither is set, the element is incomplete.
func (*PathElement) MarshalJSON ¶
func (s *PathElement) MarshalJSON() ([]byte, error)
type Projection ¶
type Projection struct { // Property: The property to project. Property *PropertyReference `json:"property,omitempty"` // ForceSendFields is a list of field names (e.g. "Property") 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. "Property") 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:"-"` }
Projection: A representation of a property in a projection.
func (*Projection) MarshalJSON ¶
func (s *Projection) MarshalJSON() ([]byte, error)
type ProjectsAllocateIdsCall ¶
type ProjectsAllocateIdsCall struct {
// contains filtered or unexported fields
}
func (*ProjectsAllocateIdsCall) Context ¶
func (c *ProjectsAllocateIdsCall) Context(ctx context.Context) *ProjectsAllocateIdsCall
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 (*ProjectsAllocateIdsCall) Do ¶
func (c *ProjectsAllocateIdsCall) Do(opts ...googleapi.CallOption) (*AllocateIdsResponse, error)
Do executes the "datastore.projects.allocateIds" call. Exactly one of *AllocateIdsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AllocateIdsResponse.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 (*ProjectsAllocateIdsCall) Fields ¶
func (c *ProjectsAllocateIdsCall) Fields(s ...googleapi.Field) *ProjectsAllocateIdsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsAllocateIdsCall) Header ¶
func (c *ProjectsAllocateIdsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsBeginTransactionCall ¶
type ProjectsBeginTransactionCall struct {
// contains filtered or unexported fields
}
func (*ProjectsBeginTransactionCall) Context ¶
func (c *ProjectsBeginTransactionCall) Context(ctx context.Context) *ProjectsBeginTransactionCall
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 (*ProjectsBeginTransactionCall) Do ¶
func (c *ProjectsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error)
Do executes the "datastore.projects.beginTransaction" call. Exactly one of *BeginTransactionResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BeginTransactionResponse.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 (*ProjectsBeginTransactionCall) Fields ¶
func (c *ProjectsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsBeginTransactionCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsBeginTransactionCall) Header ¶
func (c *ProjectsBeginTransactionCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsCommitCall ¶
type ProjectsCommitCall struct {
// contains filtered or unexported fields
}
func (*ProjectsCommitCall) Context ¶
func (c *ProjectsCommitCall) Context(ctx context.Context) *ProjectsCommitCall
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 (*ProjectsCommitCall) Do ¶
func (c *ProjectsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error)
Do executes the "datastore.projects.commit" call. Exactly one of *CommitResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CommitResponse.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 (*ProjectsCommitCall) Fields ¶
func (c *ProjectsCommitCall) Fields(s ...googleapi.Field) *ProjectsCommitCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsCommitCall) Header ¶
func (c *ProjectsCommitCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsExportCall ¶
type ProjectsExportCall struct {
// contains filtered or unexported fields
}
func (*ProjectsExportCall) Context ¶
func (c *ProjectsExportCall) Context(ctx context.Context) *ProjectsExportCall
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 (*ProjectsExportCall) Do ¶
func (c *ProjectsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
Do executes the "datastore.projects.export" call. Exactly one of *GoogleLongrunningOperation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.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 (*ProjectsExportCall) Fields ¶
func (c *ProjectsExportCall) Fields(s ...googleapi.Field) *ProjectsExportCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsExportCall) Header ¶
func (c *ProjectsExportCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsImportCall ¶
type ProjectsImportCall struct {
// contains filtered or unexported fields
}
func (*ProjectsImportCall) Context ¶
func (c *ProjectsImportCall) Context(ctx context.Context) *ProjectsImportCall
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 (*ProjectsImportCall) Do ¶
func (c *ProjectsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
Do executes the "datastore.projects.import" call. Exactly one of *GoogleLongrunningOperation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.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 (*ProjectsImportCall) Fields ¶
func (c *ProjectsImportCall) Fields(s ...googleapi.Field) *ProjectsImportCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsImportCall) Header ¶
func (c *ProjectsImportCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsIndexesGetCall ¶
type ProjectsIndexesGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsIndexesGetCall) Context ¶
func (c *ProjectsIndexesGetCall) Context(ctx context.Context) *ProjectsIndexesGetCall
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 (*ProjectsIndexesGetCall) Do ¶
func (c *ProjectsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1Index, error)
Do executes the "datastore.projects.indexes.get" call. Exactly one of *GoogleDatastoreAdminV1Index or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleDatastoreAdminV1Index.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 (*ProjectsIndexesGetCall) Fields ¶
func (c *ProjectsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsIndexesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsIndexesGetCall) Header ¶
func (c *ProjectsIndexesGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsIndexesGetCall) IfNoneMatch ¶
func (c *ProjectsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsIndexesGetCall
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 ProjectsIndexesListCall ¶
type ProjectsIndexesListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsIndexesListCall) Context ¶
func (c *ProjectsIndexesListCall) Context(ctx context.Context) *ProjectsIndexesListCall
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 (*ProjectsIndexesListCall) Do ¶
func (c *ProjectsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1ListIndexesResponse, error)
Do executes the "datastore.projects.indexes.list" call. Exactly one of *GoogleDatastoreAdminV1ListIndexesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleDatastoreAdminV1ListIndexesResponse.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 (*ProjectsIndexesListCall) Fields ¶
func (c *ProjectsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsIndexesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsIndexesListCall) Filter ¶
func (c *ProjectsIndexesListCall) Filter(filter string) *ProjectsIndexesListCall
Filter sets the optional parameter "filter":
func (*ProjectsIndexesListCall) Header ¶
func (c *ProjectsIndexesListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsIndexesListCall) IfNoneMatch ¶
func (c *ProjectsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsIndexesListCall
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 (*ProjectsIndexesListCall) PageSize ¶
func (c *ProjectsIndexesListCall) PageSize(pageSize int64) *ProjectsIndexesListCall
PageSize sets the optional parameter "pageSize": The maximum number of items to return. If zero, then all results will be returned.
func (*ProjectsIndexesListCall) PageToken ¶
func (c *ProjectsIndexesListCall) PageToken(pageToken string) *ProjectsIndexesListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*ProjectsIndexesListCall) Pages ¶
func (c *ProjectsIndexesListCall) Pages(ctx context.Context, f func(*GoogleDatastoreAdminV1ListIndexesResponse) 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.
type ProjectsIndexesService ¶
type ProjectsIndexesService struct {
// contains filtered or unexported fields
}
func NewProjectsIndexesService ¶
func NewProjectsIndexesService(s *Service) *ProjectsIndexesService
func (*ProjectsIndexesService) Get ¶
func (r *ProjectsIndexesService) Get(projectId string, indexId string) *ProjectsIndexesGetCall
Get: Gets an index.
func (*ProjectsIndexesService) List ¶
func (r *ProjectsIndexesService) List(projectId string) *ProjectsIndexesListCall
List: Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.
type ProjectsLookupCall ¶
type ProjectsLookupCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLookupCall) Context ¶
func (c *ProjectsLookupCall) Context(ctx context.Context) *ProjectsLookupCall
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 (*ProjectsLookupCall) Do ¶
func (c *ProjectsLookupCall) Do(opts ...googleapi.CallOption) (*LookupResponse, error)
Do executes the "datastore.projects.lookup" call. Exactly one of *LookupResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LookupResponse.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 (*ProjectsLookupCall) Fields ¶
func (c *ProjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLookupCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLookupCall) Header ¶
func (c *ProjectsLookupCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsOperationsCancelCall ¶
type ProjectsOperationsCancelCall struct {
// contains filtered or unexported fields
}
func (*ProjectsOperationsCancelCall) Context ¶
func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall
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 (*ProjectsOperationsCancelCall) Do ¶
func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "datastore.projects.operations.cancel" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsOperationsCancelCall) Fields ¶
func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsOperationsCancelCall) Header ¶
func (c *ProjectsOperationsCancelCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsOperationsDeleteCall ¶
type ProjectsOperationsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsOperationsDeleteCall) Context ¶
func (c *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall
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 (*ProjectsOperationsDeleteCall) Do ¶
func (c *ProjectsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "datastore.projects.operations.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsOperationsDeleteCall) Fields ¶
func (c *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsOperationsDeleteCall) Header ¶
func (c *ProjectsOperationsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsOperationsGetCall ¶
type ProjectsOperationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsOperationsGetCall) Context ¶
func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall
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 (*ProjectsOperationsGetCall) Do ¶
func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error)
Do executes the "datastore.projects.operations.get" call. Exactly one of *GoogleLongrunningOperation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.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 (*ProjectsOperationsGetCall) Fields ¶
func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsOperationsGetCall) Header ¶
func (c *ProjectsOperationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsOperationsGetCall) IfNoneMatch ¶
func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall
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 ProjectsOperationsListCall ¶
type ProjectsOperationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsOperationsListCall) Context ¶
func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall
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 (*ProjectsOperationsListCall) Do ¶
func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error)
Do executes the "datastore.projects.operations.list" call. Exactly one of *GoogleLongrunningListOperationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningListOperationsResponse.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 (*ProjectsOperationsListCall) Fields ¶
func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsOperationsListCall) Filter ¶
func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall
Filter sets the optional parameter "filter": The standard list filter.
func (*ProjectsOperationsListCall) Header ¶
func (c *ProjectsOperationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsOperationsListCall) IfNoneMatch ¶
func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall
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 (*ProjectsOperationsListCall) PageSize ¶
func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall
PageSize sets the optional parameter "pageSize": The standard list page size.
func (*ProjectsOperationsListCall) PageToken ¶
func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall
PageToken sets the optional parameter "pageToken": The standard list page token.
func (*ProjectsOperationsListCall) Pages ¶
func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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.
type ProjectsOperationsService ¶
type ProjectsOperationsService struct {
// contains filtered or unexported fields
}
func NewProjectsOperationsService ¶
func NewProjectsOperationsService(s *Service) *ProjectsOperationsService
func (*ProjectsOperationsService) Cancel ¶
func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall
Cancel: Starts asynchronous cancellation on a long-running operation.
The server
makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
func (*ProjectsOperationsService) Delete ¶
func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall
Delete: Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
func (*ProjectsOperationsService) Get ¶
func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall
Get: Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
func (*ProjectsOperationsService) List ¶
func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall
List: Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
type ProjectsReserveIdsCall ¶
type ProjectsReserveIdsCall struct {
// contains filtered or unexported fields
}
func (*ProjectsReserveIdsCall) Context ¶
func (c *ProjectsReserveIdsCall) Context(ctx context.Context) *ProjectsReserveIdsCall
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 (*ProjectsReserveIdsCall) Do ¶
func (c *ProjectsReserveIdsCall) Do(opts ...googleapi.CallOption) (*ReserveIdsResponse, error)
Do executes the "datastore.projects.reserveIds" call. Exactly one of *ReserveIdsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ReserveIdsResponse.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 (*ProjectsReserveIdsCall) Fields ¶
func (c *ProjectsReserveIdsCall) Fields(s ...googleapi.Field) *ProjectsReserveIdsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsReserveIdsCall) Header ¶
func (c *ProjectsReserveIdsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsRollbackCall ¶
type ProjectsRollbackCall struct {
// contains filtered or unexported fields
}
func (*ProjectsRollbackCall) Context ¶
func (c *ProjectsRollbackCall) Context(ctx context.Context) *ProjectsRollbackCall
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 (*ProjectsRollbackCall) Do ¶
func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackResponse, error)
Do executes the "datastore.projects.rollback" call. Exactly one of *RollbackResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *RollbackResponse.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 (*ProjectsRollbackCall) Fields ¶
func (c *ProjectsRollbackCall) Fields(s ...googleapi.Field) *ProjectsRollbackCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsRollbackCall) Header ¶
func (c *ProjectsRollbackCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsRunQueryCall ¶
type ProjectsRunQueryCall struct {
// contains filtered or unexported fields
}
func (*ProjectsRunQueryCall) Context ¶
func (c *ProjectsRunQueryCall) Context(ctx context.Context) *ProjectsRunQueryCall
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 (*ProjectsRunQueryCall) Do ¶
func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error)
Do executes the "datastore.projects.runQuery" call. Exactly one of *RunQueryResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *RunQueryResponse.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 (*ProjectsRunQueryCall) Fields ¶
func (c *ProjectsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsRunQueryCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsRunQueryCall) Header ¶
func (c *ProjectsRunQueryCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsService ¶
type ProjectsService struct { Indexes *ProjectsIndexesService Operations *ProjectsOperationsService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
func (*ProjectsService) AllocateIds ¶
func (r *ProjectsService) AllocateIds(projectId string, allocateidsrequest *AllocateIdsRequest) *ProjectsAllocateIdsCall
AllocateIds: Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
func (*ProjectsService) BeginTransaction ¶
func (r *ProjectsService) BeginTransaction(projectId string, begintransactionrequest *BeginTransactionRequest) *ProjectsBeginTransactionCall
BeginTransaction: Begins a new transaction.
func (*ProjectsService) Commit ¶
func (r *ProjectsService) Commit(projectId string, commitrequest *CommitRequest) *ProjectsCommitCall
Commit: Commits a transaction, optionally creating, deleting or modifying some entities.
func (*ProjectsService) Export ¶
func (r *ProjectsService) Export(projectId string, googledatastoreadminv1exportentitiesrequest *GoogleDatastoreAdminV1ExportEntitiesRequest) *ProjectsExportCall
Export: Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
func (*ProjectsService) Import ¶
func (r *ProjectsService) Import(projectId string, googledatastoreadminv1importentitiesrequest *GoogleDatastoreAdminV1ImportEntitiesRequest) *ProjectsImportCall
Import: Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
func (*ProjectsService) Lookup ¶
func (r *ProjectsService) Lookup(projectId string, lookuprequest *LookupRequest) *ProjectsLookupCall
Lookup: Looks up entities by key.
func (*ProjectsService) ReserveIds ¶
func (r *ProjectsService) ReserveIds(projectId string, reserveidsrequest *ReserveIdsRequest) *ProjectsReserveIdsCall
ReserveIds: Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
func (*ProjectsService) Rollback ¶
func (r *ProjectsService) Rollback(projectId string, rollbackrequest *RollbackRequest) *ProjectsRollbackCall
Rollback: Rolls back a transaction.
func (*ProjectsService) RunQuery ¶
func (r *ProjectsService) RunQuery(projectId string, runqueryrequest *RunQueryRequest) *ProjectsRunQueryCall
RunQuery: Queries for entities.
type PropertyFilter ¶
type PropertyFilter struct { // Op: The operator to filter by. // // Possible values: // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used. // "LESS_THAN" - Less than. // "LESS_THAN_OR_EQUAL" - Less than or equal. // "GREATER_THAN" - Greater than. // "GREATER_THAN_OR_EQUAL" - Greater than or equal. // "EQUAL" - Equal. // "HAS_ANCESTOR" - Has ancestor. Op string `json:"op,omitempty"` // Property: The property to filter by. Property *PropertyReference `json:"property,omitempty"` // Value: The value to compare the property to. Value *Value `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Op") 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. "Op") 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:"-"` }
PropertyFilter: A filter on a specific property.
func (*PropertyFilter) MarshalJSON ¶
func (s *PropertyFilter) MarshalJSON() ([]byte, error)
type PropertyOrder ¶
type PropertyOrder struct { // Direction: The direction to order by. Defaults to `ASCENDING`. // // Possible values: // "DIRECTION_UNSPECIFIED" - Unspecified. This value must not be used. // "ASCENDING" - Ascending. // "DESCENDING" - Descending. Direction string `json:"direction,omitempty"` // Property: The property to order by. Property *PropertyReference `json:"property,omitempty"` // ForceSendFields is a list of field names (e.g. "Direction") 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. "Direction") 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:"-"` }
PropertyOrder: The desired order for a specific property.
func (*PropertyOrder) MarshalJSON ¶
func (s *PropertyOrder) MarshalJSON() ([]byte, error)
type PropertyReference ¶
type PropertyReference struct { // Name: The name of the property. // If name includes "."s, it may be interpreted as a property name path. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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:"-"` }
PropertyReference: A reference to a property relative to the kind expressions.
func (*PropertyReference) MarshalJSON ¶
func (s *PropertyReference) MarshalJSON() ([]byte, error)
type Query ¶
type Query struct { // DistinctOn: The properties to make distinct. The query results will // contain the first // result for each distinct combination of values for the given // properties // (if empty, all results are returned). DistinctOn []*PropertyReference `json:"distinctOn,omitempty"` // EndCursor: An ending point for the query results. Query cursors // are // returned in query result batches and // [can only be used to limit the // same // query](https://cloud.google.com/datastore/docs/concepts/queries#c // ursors_limits_and_offsets). EndCursor string `json:"endCursor,omitempty"` // Filter: The filter to apply. Filter *Filter `json:"filter,omitempty"` // Kind: The kinds to query (if empty, returns entities of all // kinds). // Currently at most 1 kind may be specified. Kind []*KindExpression `json:"kind,omitempty"` // Limit: The maximum number of results to return. Applies after all // other // constraints. Optional. // Unspecified is interpreted as no limit. // Must be >= 0 if specified. Limit int64 `json:"limit,omitempty"` // Offset: The number of results to skip. Applies before limit, but // after all other // constraints. Optional. Must be >= 0 if specified. Offset int64 `json:"offset,omitempty"` // Order: The order to apply to the query results (if empty, order is // unspecified). Order []*PropertyOrder `json:"order,omitempty"` // Projection: The projection to return. Defaults to returning all // properties. Projection []*Projection `json:"projection,omitempty"` // StartCursor: A starting point for the query results. Query cursors // are // returned in query result batches and // [can only be used to continue the // same // query](https://cloud.google.com/datastore/docs/concepts/queries#c // ursors_limits_and_offsets). StartCursor string `json:"startCursor,omitempty"` // ForceSendFields is a list of field names (e.g. "DistinctOn") 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. "DistinctOn") 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:"-"` }
Query: A query for entities.
func (*Query) MarshalJSON ¶
type QueryResultBatch ¶
type QueryResultBatch struct { // EndCursor: A cursor that points to the position after the last result // in the batch. EndCursor string `json:"endCursor,omitempty"` // EntityResultType: The result type for every entity in // `entity_results`. // // Possible values: // "RESULT_TYPE_UNSPECIFIED" - Unspecified. This value is never used. // "FULL" - The key and properties. // "PROJECTION" - A projected subset of properties. The entity may // have no key. // "KEY_ONLY" - Only the key. EntityResultType string `json:"entityResultType,omitempty"` // EntityResults: The results for this batch. EntityResults []*EntityResult `json:"entityResults,omitempty"` // MoreResults: The state of the query after the current batch. // // Possible values: // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never // used. // "NOT_FINISHED" - There may be additional batches to fetch from this // query. // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may // be more results after the limit. // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may // be more results after the end // cursor. // "NO_MORE_RESULTS" - The query is finished, and there are no more // results. MoreResults string `json:"moreResults,omitempty"` // SkippedCursor: A cursor that points to the position after the last // skipped result. // Will be set when `skipped_results` != 0. SkippedCursor string `json:"skippedCursor,omitempty"` // SkippedResults: The number of results skipped, typically because of // an offset. SkippedResults int64 `json:"skippedResults,omitempty"` // SnapshotVersion: The version number of the snapshot this batch was // returned from. // This applies to the range of results from the query's `start_cursor` // (or // the beginning of the query if no cursor was given) to this // batch's // `end_cursor` (not the query's `end_cursor`). // // In a single transaction, subsequent query result batches for the same // query // can have a greater snapshot version number. Each batch's snapshot // version // is valid for all preceding batches. // The value will be zero for eventually consistent queries. SnapshotVersion int64 `json:"snapshotVersion,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndCursor") 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. "EndCursor") 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:"-"` }
QueryResultBatch: A batch of results produced by a query.
func (*QueryResultBatch) MarshalJSON ¶
func (s *QueryResultBatch) MarshalJSON() ([]byte, error)
type ReadOptions ¶
type ReadOptions struct { // ReadConsistency: The non-transactional read consistency to // use. // Cannot be set to `STRONG` for global queries. // // Possible values: // "READ_CONSISTENCY_UNSPECIFIED" - Unspecified. This value must not // be used. // "STRONG" - Strong consistency. // "EVENTUAL" - Eventual consistency. ReadConsistency string `json:"readConsistency,omitempty"` // Transaction: The identifier of the transaction in which to read. // A // transaction identifier is returned by a call // to // Datastore.BeginTransaction. Transaction string `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "ReadConsistency") 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. "ReadConsistency") 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:"-"` }
ReadOptions: The options shared by read requests.
func (*ReadOptions) MarshalJSON ¶
func (s *ReadOptions) MarshalJSON() ([]byte, error)
type ReadWrite ¶
type ReadWrite struct { // PreviousTransaction: The transaction identifier of the transaction // being retried. PreviousTransaction string `json:"previousTransaction,omitempty"` // ForceSendFields is a list of field names (e.g. "PreviousTransaction") // 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. "PreviousTransaction") 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:"-"` }
ReadWrite: Options specific to read / write transactions.
func (*ReadWrite) MarshalJSON ¶
type ReserveIdsRequest ¶
type ReserveIdsRequest struct { // DatabaseId: If not empty, the ID of the database against which to // make the request. DatabaseId string `json:"databaseId,omitempty"` // Keys: A list of keys with complete key paths whose numeric IDs should // not be // auto-allocated. Keys []*Key `json:"keys,omitempty"` // ForceSendFields is a list of field names (e.g. "DatabaseId") 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. "DatabaseId") 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:"-"` }
ReserveIdsRequest: The request for Datastore.ReserveIds.
func (*ReserveIdsRequest) MarshalJSON ¶
func (s *ReserveIdsRequest) MarshalJSON() ([]byte, error)
type ReserveIdsResponse ¶
type ReserveIdsResponse struct { // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` }
ReserveIdsResponse: The response for Datastore.ReserveIds.
type RollbackRequest ¶
type RollbackRequest struct { // Transaction: The transaction identifier, returned by a call // to // Datastore.BeginTransaction. Transaction string `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "Transaction") 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. "Transaction") 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:"-"` }
RollbackRequest: The request for Datastore.Rollback.
func (*RollbackRequest) MarshalJSON ¶
func (s *RollbackRequest) MarshalJSON() ([]byte, error)
type RollbackResponse ¶
type RollbackResponse struct { // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` }
RollbackResponse: The response for Datastore.Rollback. (an empty message).
type RunQueryRequest ¶
type RunQueryRequest struct { // GqlQuery: The GQL query to run. GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` // PartitionId: Entities are partitioned into subsets, identified by a // partition ID. // Queries are scoped to a single partition. // This partition ID is normalized with the standard default // context // partition ID. PartitionId *PartitionId `json:"partitionId,omitempty"` // Query: The query to run. Query *Query `json:"query,omitempty"` // ReadOptions: The options for this query. ReadOptions *ReadOptions `json:"readOptions,omitempty"` // ForceSendFields is a list of field names (e.g. "GqlQuery") 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. "GqlQuery") 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:"-"` }
RunQueryRequest: The request for Datastore.RunQuery.
func (*RunQueryRequest) MarshalJSON ¶
func (s *RunQueryRequest) MarshalJSON() ([]byte, error)
type RunQueryResponse ¶
type RunQueryResponse struct { // Batch: A batch of query results (always present). Batch *QueryResultBatch `json:"batch,omitempty"` // Query: The parsed form of the `GqlQuery` from the request, if it was // set. Query *Query `json:"query,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Batch") 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. "Batch") 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:"-"` }
RunQueryResponse: The response for Datastore.RunQuery.
func (*RunQueryResponse) MarshalJSON ¶
func (s *RunQueryResponse) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Projects *ProjectsService // contains filtered or unexported fields }
func New
deprecated
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 ¶ added in v0.3.0
NewService creates a new Service.
type Status ¶
type Status struct { // Code: The status code, which should be an enum value of // google.rpc.Code. Code int64 `json:"code,omitempty"` // Details: A list of messages that carry the error details. There is a // common set of // message types for APIs to use. Details []googleapi.RawMessage `json:"details,omitempty"` // Message: A developer-facing error message, which should be in // English. Any // user-facing error message should be localized and sent in // the // google.rpc.Status.details field, or localized by the client. Message string `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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:"-"` }
Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:
- Simple to use and understand for most users - Flexible enough to meet unexpected needs
Overview ¶
The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.
Language mapping ¶
The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.
Other uses ¶
The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.
Example uses of this error model include:
- Partial errors. If a service needs to return partial errors to the client,
it may embed the `Status` in the normal response to indicate the
partial
errors.
- Workflow errors. A typical workflow has multiple steps. Each step may
have a `Status` message for error reporting.
- Batch operations. If a client uses batch request and batch response, the
`Status` message should be used directly inside batch response,
one for
each error sub-response.
- Asynchronous operations. If an API call embeds asynchronous operation
results in its response, the status of those operations should
be
represented directly using the `Status` message.
- Logging. If some API errors are stored in logs, the message `Status` could
be used directly after any stripping needed for security/privacy
reasons.
func (*Status) MarshalJSON ¶
type TransactionOptions ¶
type TransactionOptions struct { // ReadOnly: The transaction should only allow reads. ReadOnly *ReadOnly `json:"readOnly,omitempty"` // ReadWrite: The transaction should allow both reads and writes. ReadWrite *ReadWrite `json:"readWrite,omitempty"` // ForceSendFields is a list of field names (e.g. "ReadOnly") 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. "ReadOnly") 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:"-"` }
TransactionOptions: Options for beginning a new transaction.
Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.
func (*TransactionOptions) MarshalJSON ¶
func (s *TransactionOptions) MarshalJSON() ([]byte, error)
type Value ¶
type Value struct { // ArrayValue: An array value. // Cannot contain another array value. // A `Value` instance that sets field `array_value` must not set // fields // `meaning` or `exclude_from_indexes`. ArrayValue *ArrayValue `json:"arrayValue,omitempty"` // BlobValue: A blob value. // May have at most 1,000,000 bytes. // When `exclude_from_indexes` is false, may have at most 1500 bytes. // In JSON requests, must be base64-encoded. BlobValue string `json:"blobValue,omitempty"` // BooleanValue: A boolean value. BooleanValue bool `json:"booleanValue,omitempty"` // DoubleValue: A double value. DoubleValue float64 `json:"doubleValue,omitempty"` // EntityValue: An entity value. // // - May have no key. // - May have a key with an incomplete key path. // - May have a reserved/read-only key. EntityValue *Entity `json:"entityValue,omitempty"` // ExcludeFromIndexes: If the value should be excluded from all indexes // including those defined // explicitly. ExcludeFromIndexes bool `json:"excludeFromIndexes,omitempty"` // GeoPointValue: A geo point value representing a point on the surface // of Earth. GeoPointValue *LatLng `json:"geoPointValue,omitempty"` // IntegerValue: An integer value. IntegerValue int64 `json:"integerValue,omitempty,string"` // KeyValue: A key value. KeyValue *Key `json:"keyValue,omitempty"` // Meaning: The `meaning` field should only be populated for backwards // compatibility. Meaning int64 `json:"meaning,omitempty"` // NullValue: A null value. // // Possible values: // "NULL_VALUE" - Null value. NullValue string `json:"nullValue,omitempty"` // StringValue: A UTF-8 encoded string value. // When `exclude_from_indexes` is false (it is indexed) , may have at // most 1500 bytes. // Otherwise, may be set to at least 1,000,000 bytes. StringValue string `json:"stringValue,omitempty"` // TimestampValue: A timestamp value. // When stored in the Datastore, precise only to microseconds; // any additional precision is rounded down. TimestampValue string `json:"timestampValue,omitempty"` // ForceSendFields is a list of field names (e.g. "ArrayValue") 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. "ArrayValue") 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:"-"` }
Value: A message that can hold any of the supported value types and associated metadata.