Documentation ¶
Overview ¶
Package datastore is a generated protocol buffer package.
It is generated from these files:
datastore_v1.proto
It has these top-level messages:
PartitionId Key Value Property Entity EntityResult Query KindExpression PropertyReference PropertyExpression PropertyOrder Filter CompositeFilter PropertyFilter GqlQuery GqlQueryArg QueryResultBatch Mutation MutationResult ReadOptions LookupRequest LookupResponse RunQueryRequest RunQueryResponse BeginTransactionRequest BeginTransactionResponse RollbackRequest RollbackResponse CommitRequest CommitResponse AllocateIdsRequest AllocateIdsResponse
Index ¶
- Constants
- Variables
- type AllocateIdsRequest
- type AllocateIdsResponse
- type BeginTransactionRequest
- type BeginTransactionRequest_IsolationLevel
- type BeginTransactionResponse
- type CommitRequest
- type CommitRequest_Mode
- type CommitResponse
- type CompositeFilter
- type CompositeFilter_Operator
- type Entity
- type EntityResult
- type EntityResult_ResultType
- type Filter
- type GqlQuery
- type GqlQueryArg
- type Key
- type Key_PathElement
- type KindExpression
- type LookupRequest
- type LookupResponse
- type Mutation
- func (m *Mutation) GetDelete() []*Key
- func (m *Mutation) GetForce() bool
- func (m *Mutation) GetInsert() []*Entity
- func (m *Mutation) GetInsertAutoId() []*Entity
- func (m *Mutation) GetUpdate() []*Entity
- func (m *Mutation) GetUpsert() []*Entity
- func (*Mutation) ProtoMessage()
- func (m *Mutation) Reset()
- func (m *Mutation) String() string
- type MutationResult
- type PartitionId
- type Property
- type PropertyExpression
- type PropertyExpression_AggregationFunction
- type PropertyFilter
- type PropertyFilter_Operator
- type PropertyOrder
- type PropertyOrder_Direction
- type PropertyReference
- type Query
- func (m *Query) GetEndCursor() []byte
- func (m *Query) GetFilter() *Filter
- func (m *Query) GetGroupBy() []*PropertyReference
- func (m *Query) GetKind() []*KindExpression
- func (m *Query) GetLimit() int32
- func (m *Query) GetOffset() int32
- func (m *Query) GetOrder() []*PropertyOrder
- func (m *Query) GetProjection() []*PropertyExpression
- func (m *Query) GetStartCursor() []byte
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) String() string
- type QueryResultBatch
- func (m *QueryResultBatch) GetEndCursor() []byte
- func (m *QueryResultBatch) GetEntityResult() []*EntityResult
- func (m *QueryResultBatch) GetEntityResultType() EntityResult_ResultType
- func (m *QueryResultBatch) GetMoreResults() QueryResultBatch_MoreResultsType
- func (m *QueryResultBatch) GetSkippedResults() int32
- func (*QueryResultBatch) ProtoMessage()
- func (m *QueryResultBatch) Reset()
- func (m *QueryResultBatch) String() string
- type QueryResultBatch_MoreResultsType
- type ReadOptions
- type ReadOptions_ReadConsistency
- type RollbackRequest
- type RollbackResponse
- type RunQueryRequest
- func (m *RunQueryRequest) GetGqlQuery() *GqlQuery
- func (m *RunQueryRequest) GetPartitionId() *PartitionId
- func (m *RunQueryRequest) GetQuery() *Query
- func (m *RunQueryRequest) GetReadOptions() *ReadOptions
- func (*RunQueryRequest) ProtoMessage()
- func (m *RunQueryRequest) Reset()
- func (m *RunQueryRequest) String() string
- type RunQueryResponse
- type Value
- func (m *Value) GetBlobKeyValue() string
- func (m *Value) GetBlobValue() []byte
- func (m *Value) GetBooleanValue() bool
- func (m *Value) GetDoubleValue() float64
- func (m *Value) GetEntityValue() *Entity
- func (m *Value) GetIndexed() bool
- func (m *Value) GetIntegerValue() int64
- func (m *Value) GetKeyValue() *Key
- func (m *Value) GetListValue() []*Value
- func (m *Value) GetMeaning() int32
- func (m *Value) GetStringValue() string
- func (m *Value) GetTimestampMicrosecondsValue() int64
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) String() string
Constants ¶
const Default_Query_Offset int32 = 0
Variables ¶
var BeginTransactionRequest_IsolationLevel_name = map[int32]string{
0: "SNAPSHOT",
1: "SERIALIZABLE",
}
var BeginTransactionRequest_IsolationLevel_value = map[string]int32{
"SNAPSHOT": 0,
"SERIALIZABLE": 1,
}
var CommitRequest_Mode_name = map[int32]string{
1: "TRANSACTIONAL",
2: "NON_TRANSACTIONAL",
}
var CommitRequest_Mode_value = map[string]int32{
"TRANSACTIONAL": 1,
"NON_TRANSACTIONAL": 2,
}
var EntityResult_ResultType_name = map[int32]string{
1: "FULL",
2: "PROJECTION",
3: "KEY_ONLY",
}
var EntityResult_ResultType_value = map[string]int32{
"FULL": 1,
"PROJECTION": 2,
"KEY_ONLY": 3,
}
var PropertyFilter_Operator_name = map[int32]string{
1: "LESS_THAN",
2: "LESS_THAN_OR_EQUAL",
3: "GREATER_THAN",
4: "GREATER_THAN_OR_EQUAL",
5: "EQUAL",
11: "HAS_ANCESTOR",
}
var PropertyFilter_Operator_value = map[string]int32{
"LESS_THAN": 1,
"LESS_THAN_OR_EQUAL": 2,
"GREATER_THAN": 3,
"GREATER_THAN_OR_EQUAL": 4,
"EQUAL": 5,
"HAS_ANCESTOR": 11,
}
var PropertyOrder_Direction_value = map[string]int32{
"ASCENDING": 1,
"DESCENDING": 2,
}
var QueryResultBatch_MoreResultsType_name = map[int32]string{
1: "NOT_FINISHED",
2: "MORE_RESULTS_AFTER_LIMIT",
3: "NO_MORE_RESULTS",
}
var QueryResultBatch_MoreResultsType_value = map[string]int32{
"NOT_FINISHED": 1,
"MORE_RESULTS_AFTER_LIMIT": 2,
"NO_MORE_RESULTS": 3,
}
Functions ¶
This section is empty.
Types ¶
type AllocateIdsRequest ¶
type AllocateIdsRequest struct { // A list of keys with incomplete key paths to allocate IDs for. // No key may be reserved/read-only. Key []*Key `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` XXX_unrecognized []byte `json:"-"` }
The request for AllocateIds.
func (*AllocateIdsRequest) GetKey ¶
func (m *AllocateIdsRequest) GetKey() []*Key
func (*AllocateIdsRequest) ProtoMessage ¶
func (*AllocateIdsRequest) ProtoMessage()
func (*AllocateIdsRequest) Reset ¶
func (m *AllocateIdsRequest) Reset()
func (*AllocateIdsRequest) String ¶
func (m *AllocateIdsRequest) String() string
type AllocateIdsResponse ¶
type AllocateIdsResponse struct { // The keys specified in the request (in the same order), each with // its key path completed with a newly allocated ID. Key []*Key `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` XXX_unrecognized []byte `json:"-"` }
The response for AllocateIds.
func (*AllocateIdsResponse) GetKey ¶
func (m *AllocateIdsResponse) GetKey() []*Key
func (*AllocateIdsResponse) ProtoMessage ¶
func (*AllocateIdsResponse) ProtoMessage()
func (*AllocateIdsResponse) Reset ¶
func (m *AllocateIdsResponse) Reset()
func (*AllocateIdsResponse) String ¶
func (m *AllocateIdsResponse) String() string
type BeginTransactionRequest ¶
type BeginTransactionRequest struct { // The transaction isolation level. IsolationLevel *BeginTransactionRequest_IsolationLevel `` /* 137-byte string literal not displayed */ XXX_unrecognized []byte `json:"-"` }
The request for BeginTransaction.
func (*BeginTransactionRequest) GetIsolationLevel ¶
func (m *BeginTransactionRequest) GetIsolationLevel() BeginTransactionRequest_IsolationLevel
func (*BeginTransactionRequest) ProtoMessage ¶
func (*BeginTransactionRequest) ProtoMessage()
func (*BeginTransactionRequest) Reset ¶
func (m *BeginTransactionRequest) Reset()
func (*BeginTransactionRequest) String ¶
func (m *BeginTransactionRequest) String() string
type BeginTransactionRequest_IsolationLevel ¶
type BeginTransactionRequest_IsolationLevel int32
const ( BeginTransactionRequest_SNAPSHOT BeginTransactionRequest_IsolationLevel = 0 // conflict if their mutations conflict. For example: // Read(A),Write(B) may not conflict with Read(B),Write(A), // but Read(B),Write(B) does conflict with Read(B),Write(B). BeginTransactionRequest_SERIALIZABLE BeginTransactionRequest_IsolationLevel = 1 )
const Default_BeginTransactionRequest_IsolationLevel BeginTransactionRequest_IsolationLevel = BeginTransactionRequest_SNAPSHOT
func (BeginTransactionRequest_IsolationLevel) Enum ¶
func (BeginTransactionRequest_IsolationLevel) String ¶
func (x BeginTransactionRequest_IsolationLevel) String() string
func (*BeginTransactionRequest_IsolationLevel) UnmarshalJSON ¶
func (x *BeginTransactionRequest_IsolationLevel) UnmarshalJSON(data []byte) error
type BeginTransactionResponse ¶
type BeginTransactionResponse struct { // The transaction identifier (always present). Transaction []byte `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` XXX_unrecognized []byte `json:"-"` }
The response for BeginTransaction.
func (*BeginTransactionResponse) GetTransaction ¶
func (m *BeginTransactionResponse) GetTransaction() []byte
func (*BeginTransactionResponse) ProtoMessage ¶
func (*BeginTransactionResponse) ProtoMessage()
func (*BeginTransactionResponse) Reset ¶
func (m *BeginTransactionResponse) Reset()
func (*BeginTransactionResponse) String ¶
func (m *BeginTransactionResponse) String() string
type CommitRequest ¶
type CommitRequest struct { // The transaction identifier, returned by a call to // <code>beginTransaction</code>. Must be set when mode is TRANSACTIONAL. Transaction []byte `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` // The mutation to perform. Optional. Mutation *Mutation `protobuf:"bytes,2,opt,name=mutation" json:"mutation,omitempty"` // The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. Mode *CommitRequest_Mode `protobuf:"varint,5,opt,name=mode,enum=datastore.CommitRequest_Mode,def=1" json:"mode,omitempty"` XXX_unrecognized []byte `json:"-"` }
The request for Commit.
func (*CommitRequest) GetMode ¶
func (m *CommitRequest) GetMode() CommitRequest_Mode
func (*CommitRequest) GetMutation ¶
func (m *CommitRequest) GetMutation() *Mutation
func (*CommitRequest) GetTransaction ¶
func (m *CommitRequest) GetTransaction() []byte
func (*CommitRequest) ProtoMessage ¶
func (*CommitRequest) ProtoMessage()
func (*CommitRequest) Reset ¶
func (m *CommitRequest) Reset()
func (*CommitRequest) String ¶
func (m *CommitRequest) String() string
type CommitRequest_Mode ¶
type CommitRequest_Mode int32
const ( CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1 CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2 )
const Default_CommitRequest_Mode CommitRequest_Mode = CommitRequest_TRANSACTIONAL
func (CommitRequest_Mode) Enum ¶
func (x CommitRequest_Mode) Enum() *CommitRequest_Mode
func (CommitRequest_Mode) String ¶
func (x CommitRequest_Mode) String() string
func (*CommitRequest_Mode) UnmarshalJSON ¶
func (x *CommitRequest_Mode) UnmarshalJSON(data []byte) error
type CommitResponse ¶
type CommitResponse struct { // The result of performing the mutation (if any). MutationResult *MutationResult `protobuf:"bytes,1,opt,name=mutation_result" json:"mutation_result,omitempty"` XXX_unrecognized []byte `json:"-"` }
The response for Commit.
func (*CommitResponse) GetMutationResult ¶
func (m *CommitResponse) GetMutationResult() *MutationResult
func (*CommitResponse) ProtoMessage ¶
func (*CommitResponse) ProtoMessage()
func (*CommitResponse) Reset ¶
func (m *CommitResponse) Reset()
func (*CommitResponse) String ¶
func (m *CommitResponse) String() string
type CompositeFilter ¶
type CompositeFilter struct { // The operator for combining multiple filters. Operator *CompositeFilter_Operator `protobuf:"varint,1,req,name=operator,enum=datastore.CompositeFilter_Operator" json:"operator,omitempty"` // The list of filters to combine. // Must contain at least one filter. Filter []*Filter `protobuf:"bytes,2,rep,name=filter" json:"filter,omitempty"` XXX_unrecognized []byte `json:"-"` }
A filter that merges the multiple other filters using the given operation.
func (*CompositeFilter) GetFilter ¶
func (m *CompositeFilter) GetFilter() []*Filter
func (*CompositeFilter) GetOperator ¶
func (m *CompositeFilter) GetOperator() CompositeFilter_Operator
func (*CompositeFilter) ProtoMessage ¶
func (*CompositeFilter) ProtoMessage()
func (*CompositeFilter) Reset ¶
func (m *CompositeFilter) Reset()
func (*CompositeFilter) String ¶
func (m *CompositeFilter) String() string
type CompositeFilter_Operator ¶
type CompositeFilter_Operator int32
const (
CompositeFilter_AND CompositeFilter_Operator = 1
)
func (CompositeFilter_Operator) Enum ¶
func (x CompositeFilter_Operator) Enum() *CompositeFilter_Operator
func (CompositeFilter_Operator) String ¶
func (x CompositeFilter_Operator) String() string
func (*CompositeFilter_Operator) UnmarshalJSON ¶
func (x *CompositeFilter_Operator) UnmarshalJSON(data []byte) error
type Entity ¶
type Entity struct { // The entity's key. // // An entity must have a key, unless otherwise documented (for example, // an entity in <code>Value.entityValue</code> may have no key). // An entity's kind is its key's path's last element's kind, // or null if it has no key. Key *Key `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` // The entity's properties. // Each property's name must be unique for its entity. Property []*Property `protobuf:"bytes,2,rep,name=property" json:"property,omitempty"` XXX_unrecognized []byte `json:"-"` }
An entity.
An entity is limited to 1 megabyte when stored. That <em>roughly</em> corresponds to a limit of 1 megabyte for the serialized form of this message.
type EntityResult ¶
type EntityResult struct { // The resulting entity. Entity *Entity `protobuf:"bytes,1,req,name=entity" json:"entity,omitempty"` XXX_unrecognized []byte `json:"-"` }
The result of fetching an entity from the datastore.
func (*EntityResult) GetEntity ¶
func (m *EntityResult) GetEntity() *Entity
func (*EntityResult) ProtoMessage ¶
func (*EntityResult) ProtoMessage()
func (*EntityResult) Reset ¶
func (m *EntityResult) Reset()
func (*EntityResult) String ¶
func (m *EntityResult) String() string
type EntityResult_ResultType ¶
type EntityResult_ResultType int32
Specifies what data the 'entity' field contains. A ResultType is either implied (for example, in LookupResponse.found it is always FULL) or specified by context (for example, in message QueryResultBatch, field 'entity_result_type' specifies a ResultType for all the values in field 'entity_result').
const ( EntityResult_FULL EntityResult_ResultType = 1 EntityResult_PROJECTION EntityResult_ResultType = 2 // The entity may have no key. // A property value may have meaning 18. EntityResult_KEY_ONLY EntityResult_ResultType = 3 )
func (EntityResult_ResultType) Enum ¶
func (x EntityResult_ResultType) Enum() *EntityResult_ResultType
func (EntityResult_ResultType) String ¶
func (x EntityResult_ResultType) String() string
func (*EntityResult_ResultType) UnmarshalJSON ¶
func (x *EntityResult_ResultType) UnmarshalJSON(data []byte) error
type Filter ¶
type Filter struct { // A composite filter. CompositeFilter *CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter" json:"composite_filter,omitempty"` // A filter on a property. PropertyFilter *PropertyFilter `protobuf:"bytes,2,opt,name=property_filter" json:"property_filter,omitempty"` XXX_unrecognized []byte `json:"-"` }
A holder for any type of filter. Exactly one field should be specified.
func (*Filter) GetCompositeFilter ¶
func (m *Filter) GetCompositeFilter() *CompositeFilter
func (*Filter) GetPropertyFilter ¶
func (m *Filter) GetPropertyFilter() *PropertyFilter
type GqlQuery ¶
type GqlQuery struct { QueryString *string `protobuf:"bytes,1,req,name=query_string" json:"query_string,omitempty"` // When false, the query string must not contain a literal. AllowLiteral *bool `protobuf:"varint,2,opt,name=allow_literal,def=0" json:"allow_literal,omitempty"` // A named argument must set field GqlQueryArg.name. // No two named arguments may have the same name. // For each non-reserved named binding site in the query string, // there must be a named argument with that name, // but not necessarily the inverse. NameArg []*GqlQueryArg `protobuf:"bytes,3,rep,name=name_arg" json:"name_arg,omitempty"` // Numbered binding site @1 references the first numbered argument, // effectively using 1-based indexing, rather than the usual 0. // A numbered argument must NOT set field GqlQueryArg.name. // For each binding site numbered i in query_string, // there must be an ith numbered argument. // The inverse must also be true. NumberArg []*GqlQueryArg `protobuf:"bytes,4,rep,name=number_arg" json:"number_arg,omitempty"` XXX_unrecognized []byte `json:"-"` }
A GQL query.
func (*GqlQuery) GetNameArg ¶
func (m *GqlQuery) GetNameArg() []*GqlQueryArg
func (*GqlQuery) GetNumberArg ¶
func (m *GqlQuery) GetNumberArg() []*GqlQueryArg
type GqlQueryArg ¶
type GqlQueryArg struct { // Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". // Must not match regex "__.*__". // Must not be "". Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value *Value `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` Cursor []byte `protobuf:"bytes,3,opt,name=cursor" json:"cursor,omitempty"` XXX_unrecognized []byte `json:"-"` }
A binding argument for a GQL query. Exactly one of fields value and cursor must be set.
func (*GqlQueryArg) GetCursor ¶
func (m *GqlQueryArg) GetCursor() []byte
func (*GqlQueryArg) GetName ¶
func (m *GqlQueryArg) GetName() string
func (*GqlQueryArg) GetValue ¶
func (m *GqlQueryArg) GetValue() *Value
func (*GqlQueryArg) ProtoMessage ¶
func (*GqlQueryArg) ProtoMessage()
func (*GqlQueryArg) Reset ¶
func (m *GqlQueryArg) Reset()
func (*GqlQueryArg) String ¶
func (m *GqlQueryArg) String() string
type Key ¶
type Key struct { // Entities are partitioned into subsets, currently identified by a dataset // (usually implicitly specified by the project) and namespace ID. // Queries are scoped to a single partition. PartitionId *PartitionId `protobuf:"bytes,1,opt,name=partition_id" json:"partition_id,omitempty"` // 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 <em>root entity</em>, the second element identifies // a <em>child</em> of the root entity, the third element a child of the // second entity, and so forth. The entities identified by all prefixes of // the path are called the element's <em>ancestors</em>. // 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. A path can never // be empty. PathElement []*Key_PathElement `protobuf:"bytes,2,rep,name=path_element" json:"path_element,omitempty"` XXX_unrecognized []byte `json:"-"` }
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) GetPartitionId ¶
func (m *Key) GetPartitionId() *PartitionId
func (*Key) GetPathElement ¶
func (m *Key) GetPathElement() []*Key_PathElement
type Key_PathElement ¶
type Key_PathElement struct { // The kind of the entity. // A kind matching regex "__.*__" is reserved/read-only. // A kind must not contain more than 500 characters. // Cannot be "". Kind *string `protobuf:"bytes,1,req,name=kind" json:"kind,omitempty"` // The ID of the entity. // Never equal to zero. Values less than zero are discouraged and will not // be supported in the future. Id *int64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"` // The name of the entity. // A name matching regex "__.*__" is reserved/read-only. // A name must not be more than 500 characters. // Cannot be "". Name *string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` }
A (kind, ID/name) pair used to construct a key path.
At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
func (*Key_PathElement) GetId ¶
func (m *Key_PathElement) GetId() int64
func (*Key_PathElement) GetKind ¶
func (m *Key_PathElement) GetKind() string
func (*Key_PathElement) GetName ¶
func (m *Key_PathElement) GetName() string
func (*Key_PathElement) ProtoMessage ¶
func (*Key_PathElement) ProtoMessage()
func (*Key_PathElement) Reset ¶
func (m *Key_PathElement) Reset()
func (*Key_PathElement) String ¶
func (m *Key_PathElement) String() string
type KindExpression ¶
type KindExpression struct { // The name of the kind. Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` }
A representation of a kind.
func (*KindExpression) GetName ¶
func (m *KindExpression) GetName() string
func (*KindExpression) ProtoMessage ¶
func (*KindExpression) ProtoMessage()
func (*KindExpression) Reset ¶
func (m *KindExpression) Reset()
func (*KindExpression) String ¶
func (m *KindExpression) String() string
type LookupRequest ¶
type LookupRequest struct { // Options for this lookup request. Optional. ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options" json:"read_options,omitempty"` // Keys of entities to look up from the datastore. Key []*Key `protobuf:"bytes,3,rep,name=key" json:"key,omitempty"` XXX_unrecognized []byte `json:"-"` }
The request for Lookup.
func (*LookupRequest) GetKey ¶
func (m *LookupRequest) GetKey() []*Key
func (*LookupRequest) GetReadOptions ¶
func (m *LookupRequest) GetReadOptions() *ReadOptions
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) Reset ¶
func (m *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (m *LookupRequest) String() string
type LookupResponse ¶
type LookupResponse struct { // Entities found as ResultType.FULL entities. Found []*EntityResult `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` // Entities not found as ResultType.KEY_ONLY entities. Missing []*EntityResult `protobuf:"bytes,2,rep,name=missing" json:"missing,omitempty"` // A list of keys that were not looked up due to resource constraints. Deferred []*Key `protobuf:"bytes,3,rep,name=deferred" json:"deferred,omitempty"` XXX_unrecognized []byte `json:"-"` }
The response for Lookup.
func (*LookupResponse) GetDeferred ¶
func (m *LookupResponse) GetDeferred() []*Key
func (*LookupResponse) GetFound ¶
func (m *LookupResponse) GetFound() []*EntityResult
func (*LookupResponse) GetMissing ¶
func (m *LookupResponse) GetMissing() []*EntityResult
func (*LookupResponse) ProtoMessage ¶
func (*LookupResponse) ProtoMessage()
func (*LookupResponse) Reset ¶
func (m *LookupResponse) Reset()
func (*LookupResponse) String ¶
func (m *LookupResponse) String() string
type Mutation ¶
type Mutation struct { // Entities to upsert. // Each upserted entity's key must have a complete path and // must not be reserved/read-only. Upsert []*Entity `protobuf:"bytes,1,rep,name=upsert" json:"upsert,omitempty"` // Entities to update. // Each updated entity's key must have a complete path and // must not be reserved/read-only. Update []*Entity `protobuf:"bytes,2,rep,name=update" json:"update,omitempty"` // Entities to insert. // Each inserted entity's key must have a complete path and // must not be reserved/read-only. Insert []*Entity `protobuf:"bytes,3,rep,name=insert" json:"insert,omitempty"` // Insert entities with a newly allocated ID. // Each inserted entity's key must omit the final identifier in its path and // must not be reserved/read-only. InsertAutoId []*Entity `protobuf:"bytes,4,rep,name=insert_auto_id" json:"insert_auto_id,omitempty"` // Keys of entities to delete. // Each key must have a complete key path and must not be reserved/read-only. Delete []*Key `protobuf:"bytes,5,rep,name=delete" json:"delete,omitempty"` // Ignore a user specified read-only period. Optional. Force *bool `protobuf:"varint,6,opt,name=force" json:"force,omitempty"` XXX_unrecognized []byte `json:"-"` }
A set of changes to apply.
No entity in this message may have a reserved property name, not even a property in an entity in a value. No value in this message may have meaning 18, not even a value in an entity in another value.
If entities with duplicate keys are present, an arbitrary choice will be made as to which is written.
type MutationResult ¶
type MutationResult struct { // Number of index writes. IndexUpdates *int32 `protobuf:"varint,1,req,name=index_updates" json:"index_updates,omitempty"` // Keys for <code>insertAutoId</code> entities. One per entity from the // request, in the same order. InsertAutoIdKey []*Key `protobuf:"bytes,2,rep,name=insert_auto_id_key" json:"insert_auto_id_key,omitempty"` XXX_unrecognized []byte `json:"-"` }
The result of applying a mutation.
func (*MutationResult) GetIndexUpdates ¶
func (m *MutationResult) GetIndexUpdates() int32
func (*MutationResult) GetInsertAutoIdKey ¶
func (m *MutationResult) GetInsertAutoIdKey() []*Key
func (*MutationResult) ProtoMessage ¶
func (*MutationResult) ProtoMessage()
func (*MutationResult) Reset ¶
func (m *MutationResult) Reset()
func (*MutationResult) String ¶
func (m *MutationResult) String() string
type PartitionId ¶
type PartitionId struct { // The dataset ID. DatasetId *string `protobuf:"bytes,3,opt,name=dataset_id" json:"dataset_id,omitempty"` // The namespace. Namespace *string `protobuf:"bytes,4,opt,name=namespace" json:"namespace,omitempty"` XXX_unrecognized []byte `json:"-"` }
An identifier for a particular subset of entities.
Entities are partitioned into various subsets, each used by different datasets and different namespaces within a dataset and so forth.
All input partition IDs are normalized before use. A partition ID is normalized as follows:
If the partition ID is unset or is set to an empty partition ID, replace it with the context partition ID. Otherwise, if the partition ID has no dataset ID, assign it the context partition ID's dataset ID.
Unless otherwise documented, the context partition ID has the dataset ID set to the context dataset ID and no other partition dimension set.
A partition ID is empty if all of its fields are unset.
Partition dimension: A dimension may be unset. A dimension's value must never be "". A dimension's value must match [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.
Dataset ID: A dataset id's value must never be "". A dataset id's value must match ([a-z\d\-]{1,100}~)?([a-z\d][a-z\d\-\.]{0,99}:)?([a-z\d][a-z\d\-]{0,99}
func (*PartitionId) GetDatasetId ¶
func (m *PartitionId) GetDatasetId() string
func (*PartitionId) GetNamespace ¶
func (m *PartitionId) GetNamespace() string
func (*PartitionId) ProtoMessage ¶
func (*PartitionId) ProtoMessage()
func (*PartitionId) Reset ¶
func (m *PartitionId) Reset()
func (*PartitionId) String ¶
func (m *PartitionId) String() string
type Property ¶
type Property struct { // The name of the property. // 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. // Cannot be "". Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` // The value(s) of the property. // Each value can have only one value property populated. For example, // you cannot have a values list of <code>{ value: { integerValue: 22, // stringValue: "a" } }</code>, but you can have <code>{ value: { listValue: // [ { integerValue: 22 }, { stringValue: "a" } ] }</code>. Value *Value `protobuf:"bytes,4,req,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` }
An entity property.
type PropertyExpression ¶
type PropertyExpression struct { // The property to project. Property *PropertyReference `protobuf:"bytes,1,req,name=property" json:"property,omitempty"` // The aggregation function to apply to the property. Optional. // Can only be used when grouping by at least one property. Must // then be set on all properties in the projection that are not // being grouped by. AggregationFunction *PropertyExpression_AggregationFunction `` /* 141-byte string literal not displayed */ XXX_unrecognized []byte `json:"-"` }
A representation of a property in a projection.
func (*PropertyExpression) GetAggregationFunction ¶
func (m *PropertyExpression) GetAggregationFunction() PropertyExpression_AggregationFunction
func (*PropertyExpression) GetProperty ¶
func (m *PropertyExpression) GetProperty() *PropertyReference
func (*PropertyExpression) ProtoMessage ¶
func (*PropertyExpression) ProtoMessage()
func (*PropertyExpression) Reset ¶
func (m *PropertyExpression) Reset()
func (*PropertyExpression) String ¶
func (m *PropertyExpression) String() string
type PropertyExpression_AggregationFunction ¶
type PropertyExpression_AggregationFunction int32
const (
PropertyExpression_FIRST PropertyExpression_AggregationFunction = 1
)
func (PropertyExpression_AggregationFunction) Enum ¶
func (PropertyExpression_AggregationFunction) String ¶
func (x PropertyExpression_AggregationFunction) String() string
func (*PropertyExpression_AggregationFunction) UnmarshalJSON ¶
func (x *PropertyExpression_AggregationFunction) UnmarshalJSON(data []byte) error
type PropertyFilter ¶
type PropertyFilter struct { // The property to filter by. Property *PropertyReference `protobuf:"bytes,1,req,name=property" json:"property,omitempty"` // The operator to filter by. Operator *PropertyFilter_Operator `protobuf:"varint,2,req,name=operator,enum=datastore.PropertyFilter_Operator" json:"operator,omitempty"` // The value to compare the property to. Value *Value `protobuf:"bytes,3,req,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` }
A filter on a specific property.
func (*PropertyFilter) GetOperator ¶
func (m *PropertyFilter) GetOperator() PropertyFilter_Operator
func (*PropertyFilter) GetProperty ¶
func (m *PropertyFilter) GetProperty() *PropertyReference
func (*PropertyFilter) GetValue ¶
func (m *PropertyFilter) GetValue() *Value
func (*PropertyFilter) ProtoMessage ¶
func (*PropertyFilter) ProtoMessage()
func (*PropertyFilter) Reset ¶
func (m *PropertyFilter) Reset()
func (*PropertyFilter) String ¶
func (m *PropertyFilter) String() string
type PropertyFilter_Operator ¶
type PropertyFilter_Operator int32
const ( PropertyFilter_LESS_THAN PropertyFilter_Operator = 1 PropertyFilter_LESS_THAN_OR_EQUAL PropertyFilter_Operator = 2 PropertyFilter_GREATER_THAN PropertyFilter_Operator = 3 PropertyFilter_GREATER_THAN_OR_EQUAL PropertyFilter_Operator = 4 PropertyFilter_EQUAL PropertyFilter_Operator = 5 PropertyFilter_HAS_ANCESTOR PropertyFilter_Operator = 11 )
func (PropertyFilter_Operator) Enum ¶
func (x PropertyFilter_Operator) Enum() *PropertyFilter_Operator
func (PropertyFilter_Operator) String ¶
func (x PropertyFilter_Operator) String() string
func (*PropertyFilter_Operator) UnmarshalJSON ¶
func (x *PropertyFilter_Operator) UnmarshalJSON(data []byte) error
type PropertyOrder ¶
type PropertyOrder struct { // The property to order by. Property *PropertyReference `protobuf:"bytes,1,req,name=property" json:"property,omitempty"` // The direction to order by. Direction *PropertyOrder_Direction `protobuf:"varint,2,opt,name=direction,enum=datastore.PropertyOrder_Direction,def=1" json:"direction,omitempty"` XXX_unrecognized []byte `json:"-"` }
The desired order for a specific property.
func (*PropertyOrder) GetDirection ¶
func (m *PropertyOrder) GetDirection() PropertyOrder_Direction
func (*PropertyOrder) GetProperty ¶
func (m *PropertyOrder) GetProperty() *PropertyReference
func (*PropertyOrder) ProtoMessage ¶
func (*PropertyOrder) ProtoMessage()
func (*PropertyOrder) Reset ¶
func (m *PropertyOrder) Reset()
func (*PropertyOrder) String ¶
func (m *PropertyOrder) String() string
type PropertyOrder_Direction ¶
type PropertyOrder_Direction int32
const ( PropertyOrder_ASCENDING PropertyOrder_Direction = 1 PropertyOrder_DESCENDING PropertyOrder_Direction = 2 )
const Default_PropertyOrder_Direction PropertyOrder_Direction = PropertyOrder_ASCENDING
func (PropertyOrder_Direction) Enum ¶
func (x PropertyOrder_Direction) Enum() *PropertyOrder_Direction
func (PropertyOrder_Direction) String ¶
func (x PropertyOrder_Direction) String() string
func (*PropertyOrder_Direction) UnmarshalJSON ¶
func (x *PropertyOrder_Direction) UnmarshalJSON(data []byte) error
type PropertyReference ¶
type PropertyReference struct { // The name of the property. Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` }
A reference to a property relative to the kind expressions. exactly.
func (*PropertyReference) GetName ¶
func (m *PropertyReference) GetName() string
func (*PropertyReference) ProtoMessage ¶
func (*PropertyReference) ProtoMessage()
func (*PropertyReference) Reset ¶
func (m *PropertyReference) Reset()
func (*PropertyReference) String ¶
func (m *PropertyReference) String() string
type Query ¶
type Query struct { // The projection to return. If not set the entire entity is returned. Projection []*PropertyExpression `protobuf:"bytes,2,rep,name=projection" json:"projection,omitempty"` // The kinds to query (if empty, returns entities from all kinds). Kind []*KindExpression `protobuf:"bytes,3,rep,name=kind" json:"kind,omitempty"` // The filter to apply (optional). Filter *Filter `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"` // The order to apply to the query results (if empty, order is unspecified). Order []*PropertyOrder `protobuf:"bytes,5,rep,name=order" json:"order,omitempty"` // The properties to group by (if empty, no grouping is applied to the // result set). GroupBy []*PropertyReference `protobuf:"bytes,6,rep,name=group_by" json:"group_by,omitempty"` // A starting point for the query results. Optional. Query cursors are // returned in query result batches. StartCursor []byte `protobuf:"bytes,7,opt,name=start_cursor" json:"start_cursor,omitempty"` // An ending point for the query results. Optional. Query cursors are // returned in query result batches. EndCursor []byte `protobuf:"bytes,8,opt,name=end_cursor" json:"end_cursor,omitempty"` // The number of results to skip. Applies before limit, but after all other // constraints (optional, defaults to 0). Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` // The maximum number of results to return. Applies after all other // constraints. Optional. Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` XXX_unrecognized []byte `json:"-"` }
A query.
func (*Query) GetGroupBy ¶
func (m *Query) GetGroupBy() []*PropertyReference
func (*Query) GetKind ¶
func (m *Query) GetKind() []*KindExpression
func (*Query) GetOrder ¶
func (m *Query) GetOrder() []*PropertyOrder
func (*Query) GetProjection ¶
func (m *Query) GetProjection() []*PropertyExpression
type QueryResultBatch ¶
type QueryResultBatch struct { // The result type for every entity in entityResults. EntityResultType *EntityResult_ResultType `protobuf:"varint,1,req,name=entity_result_type,enum=datastore.EntityResult_ResultType" json:"entity_result_type,omitempty"` // The results for this batch. EntityResult []*EntityResult `protobuf:"bytes,2,rep,name=entity_result" json:"entity_result,omitempty"` // A cursor that points to the position after the last result in the batch. // May be absent. EndCursor []byte `protobuf:"bytes,4,opt,name=end_cursor" json:"end_cursor,omitempty"` // The state of the query after the current batch. MoreResults *QueryResultBatch_MoreResultsType `protobuf:"varint,5,req,name=more_results,enum=datastore.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"` // The number of results skipped because of <code>Query.offset</code>. SkippedResults *int32 `protobuf:"varint,6,opt,name=skipped_results" json:"skipped_results,omitempty"` XXX_unrecognized []byte `json:"-"` }
A batch of results produced by a query.
func (*QueryResultBatch) GetEndCursor ¶
func (m *QueryResultBatch) GetEndCursor() []byte
func (*QueryResultBatch) GetEntityResult ¶
func (m *QueryResultBatch) GetEntityResult() []*EntityResult
func (*QueryResultBatch) GetEntityResultType ¶
func (m *QueryResultBatch) GetEntityResultType() EntityResult_ResultType
func (*QueryResultBatch) GetMoreResults ¶
func (m *QueryResultBatch) GetMoreResults() QueryResultBatch_MoreResultsType
func (*QueryResultBatch) GetSkippedResults ¶
func (m *QueryResultBatch) GetSkippedResults() int32
func (*QueryResultBatch) ProtoMessage ¶
func (*QueryResultBatch) ProtoMessage()
func (*QueryResultBatch) Reset ¶
func (m *QueryResultBatch) Reset()
func (*QueryResultBatch) String ¶
func (m *QueryResultBatch) String() string
type QueryResultBatch_MoreResultsType ¶
type QueryResultBatch_MoreResultsType int32
The possible values for the 'more_results' field.
const ( QueryResultBatch_NOT_FINISHED QueryResultBatch_MoreResultsType = 1 QueryResultBatch_MORE_RESULTS_AFTER_LIMIT QueryResultBatch_MoreResultsType = 2 // results after the limit. QueryResultBatch_NO_MORE_RESULTS QueryResultBatch_MoreResultsType = 3 )
func (QueryResultBatch_MoreResultsType) Enum ¶
func (x QueryResultBatch_MoreResultsType) Enum() *QueryResultBatch_MoreResultsType
func (QueryResultBatch_MoreResultsType) String ¶
func (x QueryResultBatch_MoreResultsType) String() string
func (*QueryResultBatch_MoreResultsType) UnmarshalJSON ¶
func (x *QueryResultBatch_MoreResultsType) UnmarshalJSON(data []byte) error
type ReadOptions ¶
type ReadOptions struct { // The read consistency to use. // Cannot be set when transaction is set. // Lookup and ancestor queries default to STRONG, global queries default to // EVENTUAL and cannot be set to STRONG. ReadConsistency *ReadOptions_ReadConsistency `` /* 128-byte string literal not displayed */ // The transaction to use. Optional. Transaction []byte `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` XXX_unrecognized []byte `json:"-"` }
Options shared by read requests.
func (*ReadOptions) GetReadConsistency ¶
func (m *ReadOptions) GetReadConsistency() ReadOptions_ReadConsistency
func (*ReadOptions) GetTransaction ¶
func (m *ReadOptions) GetTransaction() []byte
func (*ReadOptions) ProtoMessage ¶
func (*ReadOptions) ProtoMessage()
func (*ReadOptions) Reset ¶
func (m *ReadOptions) Reset()
func (*ReadOptions) String ¶
func (m *ReadOptions) String() string
type ReadOptions_ReadConsistency ¶
type ReadOptions_ReadConsistency int32
const ( ReadOptions_DEFAULT ReadOptions_ReadConsistency = 0 ReadOptions_STRONG ReadOptions_ReadConsistency = 1 ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2 )
const Default_ReadOptions_ReadConsistency ReadOptions_ReadConsistency = ReadOptions_DEFAULT
func (ReadOptions_ReadConsistency) Enum ¶
func (x ReadOptions_ReadConsistency) Enum() *ReadOptions_ReadConsistency
func (ReadOptions_ReadConsistency) String ¶
func (x ReadOptions_ReadConsistency) String() string
func (*ReadOptions_ReadConsistency) UnmarshalJSON ¶
func (x *ReadOptions_ReadConsistency) UnmarshalJSON(data []byte) error
type RollbackRequest ¶
type RollbackRequest struct { // The transaction identifier, returned by a call to // <code>beginTransaction</code>. Transaction []byte `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` XXX_unrecognized []byte `json:"-"` }
The request for Rollback.
func (*RollbackRequest) GetTransaction ¶
func (m *RollbackRequest) GetTransaction() []byte
func (*RollbackRequest) ProtoMessage ¶
func (*RollbackRequest) ProtoMessage()
func (*RollbackRequest) Reset ¶
func (m *RollbackRequest) Reset()
func (*RollbackRequest) String ¶
func (m *RollbackRequest) String() string
type RollbackResponse ¶
type RollbackResponse struct {
XXX_unrecognized []byte `json:"-"`
}
The response for Rollback.
func (*RollbackResponse) ProtoMessage ¶
func (*RollbackResponse) ProtoMessage()
func (*RollbackResponse) Reset ¶
func (m *RollbackResponse) Reset()
func (*RollbackResponse) String ¶
func (m *RollbackResponse) String() string
type RunQueryRequest ¶
type RunQueryRequest struct { // The options for this query. ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options" json:"read_options,omitempty"` // Entities are partitioned into subsets, identified by a dataset (usually // implicitly specified by the project) and namespace ID. Queries are scoped // to a single partition. // This partition ID is normalized with the standard default context // partition ID, but all other partition IDs in RunQueryRequest are // normalized with this partition ID as the context partition ID. PartitionId *PartitionId `protobuf:"bytes,2,opt,name=partition_id" json:"partition_id,omitempty"` // The query to run. // Either this field or field gql_query must be set, but not both. Query *Query `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"` // The GQL query to run. // Either this field or field query must be set, but not both. GqlQuery *GqlQuery `protobuf:"bytes,7,opt,name=gql_query" json:"gql_query,omitempty"` XXX_unrecognized []byte `json:"-"` }
The request for RunQuery.
func (*RunQueryRequest) GetGqlQuery ¶
func (m *RunQueryRequest) GetGqlQuery() *GqlQuery
func (*RunQueryRequest) GetPartitionId ¶
func (m *RunQueryRequest) GetPartitionId() *PartitionId
func (*RunQueryRequest) GetQuery ¶
func (m *RunQueryRequest) GetQuery() *Query
func (*RunQueryRequest) GetReadOptions ¶
func (m *RunQueryRequest) GetReadOptions() *ReadOptions
func (*RunQueryRequest) ProtoMessage ¶
func (*RunQueryRequest) ProtoMessage()
func (*RunQueryRequest) Reset ¶
func (m *RunQueryRequest) Reset()
func (*RunQueryRequest) String ¶
func (m *RunQueryRequest) String() string
type RunQueryResponse ¶
type RunQueryResponse struct { // A batch of query results (always present). Batch *QueryResultBatch `protobuf:"bytes,1,opt,name=batch" json:"batch,omitempty"` XXX_unrecognized []byte `json:"-"` }
The response for RunQuery.
func (*RunQueryResponse) GetBatch ¶
func (m *RunQueryResponse) GetBatch() *QueryResultBatch
func (*RunQueryResponse) ProtoMessage ¶
func (*RunQueryResponse) ProtoMessage()
func (*RunQueryResponse) Reset ¶
func (m *RunQueryResponse) Reset()
func (*RunQueryResponse) String ¶
func (m *RunQueryResponse) String() string
type Value ¶
type Value struct { // A boolean value. BooleanValue *bool `protobuf:"varint,1,opt,name=boolean_value" json:"boolean_value,omitempty"` // An integer value. IntegerValue *int64 `protobuf:"varint,2,opt,name=integer_value" json:"integer_value,omitempty"` // A double value. DoubleValue *float64 `protobuf:"fixed64,3,opt,name=double_value" json:"double_value,omitempty"` // A timestamp value. TimestampMicrosecondsValue *int64 `protobuf:"varint,4,opt,name=timestamp_microseconds_value" json:"timestamp_microseconds_value,omitempty"` // A key value. KeyValue *Key `protobuf:"bytes,5,opt,name=key_value" json:"key_value,omitempty"` // A blob key value. BlobKeyValue *string `protobuf:"bytes,16,opt,name=blob_key_value" json:"blob_key_value,omitempty"` // A UTF-8 encoded string value. StringValue *string `protobuf:"bytes,17,opt,name=string_value" json:"string_value,omitempty"` // A blob value. BlobValue []byte `protobuf:"bytes,18,opt,name=blob_value" json:"blob_value,omitempty"` // 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 `protobuf:"bytes,6,opt,name=entity_value" json:"entity_value,omitempty"` // A list value. // Cannot contain another list value. // Cannot also have a meaning and indexing set. ListValue []*Value `protobuf:"bytes,7,rep,name=list_value" json:"list_value,omitempty"` // The <code>meaning</code> field is reserved and should not be used. Meaning *int32 `protobuf:"varint,14,opt,name=meaning" json:"meaning,omitempty"` // If the value should be indexed. // // The <code>indexed</code> property may be set for a // <code>null</code> value. // When <code>indexed</code> is <code>true</code>, <code>stringValue</code> // is limited to 500 characters and the blob value is limited to 500 bytes. // Exception: If meaning is set to 2, string_value is limited to 2038 // characters regardless of indexed. // When indexed is true, meaning 15 and 22 are not allowed, and meaning 16 // will be ignored on input (and will never be set on output). // Input values by default have <code>indexed</code> set to // <code>true</code>; however, you can explicitly set <code>indexed</code> to // <code>true</code> if you want. (An output value never has // <code>indexed</code> explicitly set to <code>true</code>.) If a value is // itself an entity, it cannot have <code>indexed</code> set to // <code>true</code>. // Exception: An entity value with meaning 9, 20 or 21 may be indexed. Indexed *bool `protobuf:"varint,15,opt,name=indexed,def=1" json:"indexed,omitempty"` XXX_unrecognized []byte `json:"-"` }
A message that can hold any of the supported value types and associated metadata.
At most one of the <type>Value fields may be set. If none are set the value is "null".