From 39ea8e17cd1856ccb7afe1921182d9e34562f5e7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 15 2015 12:17:03 +0000 Subject: import kubernetes-1.0.3-0.1.gitb9a88a7.el7 --- diff --git a/.gitignore b/.gitignore index 5693359..600386e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SOURCES/kubernetes-b2dafda.tar.gz +SOURCES/contrib-bb44ddd.tar.gz +SOURCES/kubernetes-b9a88a7.tar.gz diff --git a/.kubernetes.metadata b/.kubernetes.metadata index 22e1312..b657940 100644 --- a/.kubernetes.metadata +++ b/.kubernetes.metadata @@ -1 +1,2 @@ -dbb23cb41730ecc4d38afcad19327830fec31907 SOURCES/kubernetes-b2dafda.tar.gz +9ee8a9f63a7efd37cc7b12ef2671f0b880e6c2f8 SOURCES/contrib-bb44ddd.tar.gz +c33e374dbffafd1f1c9d56089ccd5e5f43a6910e SOURCES/kubernetes-b9a88a7.tar.gz diff --git a/SOURCES/Change-etcd-server-port.patch b/SOURCES/Change-etcd-server-port.patch index 2a8d34b..52d0e2f 100644 --- a/SOURCES/Change-etcd-server-port.patch +++ b/SOURCES/Change-etcd-server-port.patch @@ -1,6 +1,6 @@ -From 6ff601af2b4d2a684f46984ff68673871a6e0859 Mon Sep 17 00:00:00 2001 +From 44d2db8243f51a8319aa3893233df0c87f097c3a Mon Sep 17 00:00:00 2001 From: Jan Chaloupka -Date: Fri, 17 Jul 2015 09:35:35 +0200 +Date: Tue, 25 Aug 2015 08:26:42 +0200 Subject: [PATCH] Change etcd server port --- diff --git a/SOURCES/Fix-Persistent-Volumes-and-Persistent-Volume-Claims.patch b/SOURCES/Fix-Persistent-Volumes-and-Persistent-Volume-Claims.patch new file mode 100644 index 0000000..d13745a --- /dev/null +++ b/SOURCES/Fix-Persistent-Volumes-and-Persistent-Volume-Claims.patch @@ -0,0 +1,68 @@ +From e77337bfa867704bb79b4224191bd69d5de3d847 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Mon, 20 Jul 2015 20:13:42 +0200 +Subject: [PATCH] Fix Persistent Volumes and Persistent Volume Claims + +--- + hack/test-cmd.sh | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh +index f5088a7..18f1c87 100755 +--- a/hack/test-cmd.sh ++++ b/hack/test-cmd.sh +@@ -680,19 +680,19 @@ __EOF__ + + ### Create and delete persistent volume examples + # Pre-condition: no persistent volumes currently exist +- kube::test::get_object_assert pv "{{range.items}}{{.$id_field}}:{{end}}" '' ++ kube::test::get_object_assert pv "{{range.items}}{{$id_field}}:{{end}}" '' + # Command + kubectl create -f docs/user-guide/persistent-volumes/volumes/local-01.yaml "${kube_flags[@]}" +- kube::test::get_object_assert pv "{{range.items}}{{.$id_field}}:{{end}}" 'pv0001:' ++ kube::test::get_object_assert pv "{{range.items}}{{$id_field}}:{{end}}" 'pv0001:' + kubectl delete pv pv0001 "${kube_flags[@]}" + kubectl create -f docs/user-guide/persistent-volumes/volumes/local-02.yaml "${kube_flags[@]}" +- kube::test::get_object_assert pv "{{range.items}}{{.$id_field}}:{{end}}" 'pv0002:' ++ kube::test::get_object_assert pv "{{range.items}}{{$id_field}}:{{end}}" 'pv0002:' + kubectl delete pv pv0002 "${kube_flags[@]}" + kubectl create -f docs/user-guide/persistent-volumes/volumes/gce.yaml "${kube_flags[@]}" +- kube::test::get_object_assert pv "{{range.items}}{{.$id_field}}:{{end}}" 'pv0003:' ++ kube::test::get_object_assert pv "{{range.items}}{{$id_field}}:{{end}}" 'pv0003:' + kubectl delete pv pv0003 "${kube_flags[@]}" + # Post-condition: no PVs +- kube::test::get_object_assert pv "{{range.items}}{{.$id_field}}:{{end}}" '' ++ kube::test::get_object_assert pv "{{range.items}}{{$id_field}}:{{end}}" '' + + ############################ + # Persistent Volume Claims # +@@ -700,21 +700,21 @@ __EOF__ + + ### Create and delete persistent volume claim examples + # Pre-condition: no persistent volume claims currently exist +- kube::test::get_object_assert pvc "{{range.items}}{{.$id_field}}:{{end}}" '' ++ kube::test::get_object_assert pvc "{{range.items}}{{$id_field}}:{{end}}" '' + # Command + kubectl create -f docs/user-guide/persistent-volumes/claims/claim-01.yaml "${kube_flags[@]}" +- kube::test::get_object_assert pvc "{{range.items}}{{.$id_field}}:{{end}}" 'myclaim-1:' ++ kube::test::get_object_assert pvc "{{range.items}}{{$id_field}}:{{end}}" 'myclaim-1:' + kubectl delete pvc myclaim-1 "${kube_flags[@]}" + + kubectl create -f docs/user-guide/persistent-volumes/claims/claim-02.yaml "${kube_flags[@]}" +- kube::test::get_object_assert pvc "{{range.items}}{{.$id_field}}:{{end}}" 'myclaim-2:' ++ kube::test::get_object_assert pvc "{{range.items}}{{$id_field}}:{{end}}" 'myclaim-2:' + kubectl delete pvc myclaim-2 "${kube_flags[@]}" + + kubectl create -f docs/user-guide/persistent-volumes/claims/claim-03.json "${kube_flags[@]}" +- kube::test::get_object_assert pvc "{{range.items}}{{.$id_field}}:{{end}}" 'myclaim-3:' ++ kube::test::get_object_assert pvc "{{range.items}}{{$id_field}}:{{end}}" 'myclaim-3:' + kubectl delete pvc myclaim-3 "${kube_flags[@]}" + # Post-condition: no PVCs +- kube::test::get_object_assert pvc "{{range.items}}{{.$id_field}}:{{end}}" '' ++ kube::test::get_object_assert pvc "{{range.items}}{{$id_field}}:{{end}}" '' + + + +-- +1.9.3 + diff --git a/SOURCES/change-internal-to-inteernal.patch b/SOURCES/change-internal-to-inteernal.patch new file mode 100644 index 0000000..0d3903a --- /dev/null +++ b/SOURCES/change-internal-to-inteernal.patch @@ -0,0 +1,4927 @@ +From 3410b407040157a276456eaaa22c2297e302f70e Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Sat, 1 Aug 2015 10:42:54 +0200 +Subject: [PATCH] change internal to inteernal + +--- + .../gcloud-golang/compute/metadata/metadata.go | 2 +- + .../cloud/compute/metadata/metadata.go | 2 +- + .../src/google.golang.org/cloud/inteernal/cloud.go | 128 ++ + .../cloud/inteernal/datastore/datastore_v1.pb.go | 1633 ++++++++++++++++++++ + .../cloud/inteernal/datastore/datastore_v1.proto | 594 +++++++ + .../cloud/inteernal/testutil/context.go | 57 + + .../src/google.golang.org/cloud/internal/cloud.go | 128 -- + .../cloud/internal/datastore/datastore_v1.pb.go | 1633 -------------------- + .../cloud/internal/datastore/datastore_v1.proto | 594 ------- + .../cloud/internal/testutil/context.go | 57 - + 10 files changed, 2414 insertions(+), 2414 deletions(-) + create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/inteernal/cloud.go + create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.pb.go + create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.proto + create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/inteernal/testutil/context.go + delete mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/cloud.go + delete mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.pb.go + delete mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.proto + delete mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/testutil/context.go + +diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata/metadata.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata/metadata.go +index b007cde..c92267f 100644 +--- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata/metadata.go ++++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata/metadata.go +@@ -30,7 +30,7 @@ import ( + "sync" + "time" + +- "google.golang.org/cloud/internal" ++ "google.golang.org/cloud/inteernal" + ) + + type cachedValue struct { +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/metadata.go b/Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/metadata.go +index 7753a05..6102500 100644 +--- a/Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/metadata.go ++++ b/Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/metadata.go +@@ -29,7 +29,7 @@ import ( + "sync" + "time" + +- "google.golang.org/cloud/internal" ++ "google.golang.org/cloud/inteernal" + ) + + type cachedValue struct { +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/inteernal/cloud.go b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/cloud.go +new file mode 100644 +index 0000000..984323c +--- /dev/null ++++ b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/cloud.go +@@ -0,0 +1,128 @@ ++// Copyright 2014 Google Inc. All Rights Reserved. ++// ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++// Package internal provides support for the cloud packages. ++// ++// Users should not import this package directly. ++package internal ++ ++import ( ++ "fmt" ++ "net/http" ++ "sync" ++ ++ "golang.org/x/net/context" ++) ++ ++type contextKey struct{} ++ ++func WithContext(parent context.Context, projID string, c *http.Client) context.Context { ++ if c == nil { ++ panic("nil *http.Client passed to WithContext") ++ } ++ if projID == "" { ++ panic("empty project ID passed to WithContext") ++ } ++ return context.WithValue(parent, contextKey{}, &cloudContext{ ++ ProjectID: projID, ++ HTTPClient: c, ++ }) ++} ++ ++const userAgent = "gcloud-golang/0.1" ++ ++type cloudContext struct { ++ ProjectID string ++ HTTPClient *http.Client ++ ++ mu sync.Mutex // guards svc ++ svc map[string]interface{} // e.g. "storage" => *rawStorage.Service ++} ++ ++// Service returns the result of the fill function if it's never been ++// called before for the given name (which is assumed to be an API ++// service name, like "datastore"). If it has already been cached, the fill ++// func is not run. ++// It's safe for concurrent use by multiple goroutines. ++func Service(ctx context.Context, name string, fill func(*http.Client) interface{}) interface{} { ++ return cc(ctx).service(name, fill) ++} ++ ++func (c *cloudContext) service(name string, fill func(*http.Client) interface{}) interface{} { ++ c.mu.Lock() ++ defer c.mu.Unlock() ++ ++ if c.svc == nil { ++ c.svc = make(map[string]interface{}) ++ } else if v, ok := c.svc[name]; ok { ++ return v ++ } ++ v := fill(c.HTTPClient) ++ c.svc[name] = v ++ return v ++} ++ ++// Transport is an http.RoundTripper that appends ++// Google Cloud client's user-agent to the original ++// request's user-agent header. ++type Transport struct { ++ // Base represents the actual http.RoundTripper ++ // the requests will be delegated to. ++ Base http.RoundTripper ++} ++ ++// RoundTrip appends a user-agent to the existing user-agent ++// header and delegates the request to the base http.RoundTripper. ++func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { ++ req = cloneRequest(req) ++ ua := req.Header.Get("User-Agent") ++ if ua == "" { ++ ua = userAgent ++ } else { ++ ua = fmt.Sprintf("%s;%s", ua, userAgent) ++ } ++ req.Header.Set("User-Agent", ua) ++ return t.Base.RoundTrip(req) ++} ++ ++// cloneRequest returns a clone of the provided *http.Request. ++// The clone is a shallow copy of the struct and its Header map. ++func cloneRequest(r *http.Request) *http.Request { ++ // shallow copy of the struct ++ r2 := new(http.Request) ++ *r2 = *r ++ // deep copy of the Header ++ r2.Header = make(http.Header) ++ for k, s := range r.Header { ++ r2.Header[k] = s ++ } ++ return r2 ++} ++ ++func ProjID(ctx context.Context) string { ++ return cc(ctx).ProjectID ++} ++ ++func HTTPClient(ctx context.Context) *http.Client { ++ return cc(ctx).HTTPClient ++} ++ ++// cc returns the internal *cloudContext (cc) state for a context.Context. ++// It panics if the user did it wrong. ++func cc(ctx context.Context) *cloudContext { ++ if c, ok := ctx.Value(contextKey{}).(*cloudContext); ok { ++ return c ++ } ++ panic("invalid context.Context type; it should be created with cloud.NewContext") ++} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.pb.go b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.pb.go +new file mode 100644 +index 0000000..be903e5 +--- /dev/null ++++ b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.pb.go +@@ -0,0 +1,1633 @@ ++// Code generated by protoc-gen-go. ++// source: datastore_v1.proto ++// DO NOT EDIT! ++ ++/* ++Package pb 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 ++*/ ++package pb ++ ++import proto "github.com/golang/protobuf/proto" ++import math "math" ++ ++// Reference imports to suppress errors if they are not otherwise used. ++var _ = proto.Marshal ++var _ = math.Inf ++ ++// 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'). ++type EntityResult_ResultType int32 ++ ++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 ++) ++ ++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, ++} ++ ++func (x EntityResult_ResultType) Enum() *EntityResult_ResultType { ++ p := new(EntityResult_ResultType) ++ *p = x ++ return p ++} ++func (x EntityResult_ResultType) String() string { ++ return proto.EnumName(EntityResult_ResultType_name, int32(x)) ++} ++func (x *EntityResult_ResultType) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(EntityResult_ResultType_value, data, "EntityResult_ResultType") ++ if err != nil { ++ return err ++ } ++ *x = EntityResult_ResultType(value) ++ return nil ++} ++ ++type PropertyExpression_AggregationFunction int32 ++ ++const ( ++ PropertyExpression_FIRST PropertyExpression_AggregationFunction = 1 ++) ++ ++var PropertyExpression_AggregationFunction_name = map[int32]string{ ++ 1: "FIRST", ++} ++var PropertyExpression_AggregationFunction_value = map[string]int32{ ++ "FIRST": 1, ++} ++ ++func (x PropertyExpression_AggregationFunction) Enum() *PropertyExpression_AggregationFunction { ++ p := new(PropertyExpression_AggregationFunction) ++ *p = x ++ return p ++} ++func (x PropertyExpression_AggregationFunction) String() string { ++ return proto.EnumName(PropertyExpression_AggregationFunction_name, int32(x)) ++} ++func (x *PropertyExpression_AggregationFunction) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(PropertyExpression_AggregationFunction_value, data, "PropertyExpression_AggregationFunction") ++ if err != nil { ++ return err ++ } ++ *x = PropertyExpression_AggregationFunction(value) ++ return nil ++} ++ ++type PropertyOrder_Direction int32 ++ ++const ( ++ PropertyOrder_ASCENDING PropertyOrder_Direction = 1 ++ PropertyOrder_DESCENDING PropertyOrder_Direction = 2 ++) ++ ++var PropertyOrder_Direction_name = map[int32]string{ ++ 1: "ASCENDING", ++ 2: "DESCENDING", ++} ++var PropertyOrder_Direction_value = map[string]int32{ ++ "ASCENDING": 1, ++ "DESCENDING": 2, ++} ++ ++func (x PropertyOrder_Direction) Enum() *PropertyOrder_Direction { ++ p := new(PropertyOrder_Direction) ++ *p = x ++ return p ++} ++func (x PropertyOrder_Direction) String() string { ++ return proto.EnumName(PropertyOrder_Direction_name, int32(x)) ++} ++func (x *PropertyOrder_Direction) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(PropertyOrder_Direction_value, data, "PropertyOrder_Direction") ++ if err != nil { ++ return err ++ } ++ *x = PropertyOrder_Direction(value) ++ return nil ++} ++ ++type CompositeFilter_Operator int32 ++ ++const ( ++ CompositeFilter_AND CompositeFilter_Operator = 1 ++) ++ ++var CompositeFilter_Operator_name = map[int32]string{ ++ 1: "AND", ++} ++var CompositeFilter_Operator_value = map[string]int32{ ++ "AND": 1, ++} ++ ++func (x CompositeFilter_Operator) Enum() *CompositeFilter_Operator { ++ p := new(CompositeFilter_Operator) ++ *p = x ++ return p ++} ++func (x CompositeFilter_Operator) String() string { ++ return proto.EnumName(CompositeFilter_Operator_name, int32(x)) ++} ++func (x *CompositeFilter_Operator) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(CompositeFilter_Operator_value, data, "CompositeFilter_Operator") ++ if err != nil { ++ return err ++ } ++ *x = CompositeFilter_Operator(value) ++ return nil ++} ++ ++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 ++) ++ ++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, ++} ++ ++func (x PropertyFilter_Operator) Enum() *PropertyFilter_Operator { ++ p := new(PropertyFilter_Operator) ++ *p = x ++ return p ++} ++func (x PropertyFilter_Operator) String() string { ++ return proto.EnumName(PropertyFilter_Operator_name, int32(x)) ++} ++func (x *PropertyFilter_Operator) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(PropertyFilter_Operator_value, data, "PropertyFilter_Operator") ++ if err != nil { ++ return err ++ } ++ *x = PropertyFilter_Operator(value) ++ return nil ++} ++ ++// The possible values for the 'more_results' field. ++type QueryResultBatch_MoreResultsType int32 ++ ++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 ++) ++ ++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, ++} ++ ++func (x QueryResultBatch_MoreResultsType) Enum() *QueryResultBatch_MoreResultsType { ++ p := new(QueryResultBatch_MoreResultsType) ++ *p = x ++ return p ++} ++func (x QueryResultBatch_MoreResultsType) String() string { ++ return proto.EnumName(QueryResultBatch_MoreResultsType_name, int32(x)) ++} ++func (x *QueryResultBatch_MoreResultsType) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(QueryResultBatch_MoreResultsType_value, data, "QueryResultBatch_MoreResultsType") ++ if err != nil { ++ return err ++ } ++ *x = QueryResultBatch_MoreResultsType(value) ++ return nil ++} ++ ++type ReadOptions_ReadConsistency int32 ++ ++const ( ++ ReadOptions_DEFAULT ReadOptions_ReadConsistency = 0 ++ ReadOptions_STRONG ReadOptions_ReadConsistency = 1 ++ ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2 ++) ++ ++var ReadOptions_ReadConsistency_name = map[int32]string{ ++ 0: "DEFAULT", ++ 1: "STRONG", ++ 2: "EVENTUAL", ++} ++var ReadOptions_ReadConsistency_value = map[string]int32{ ++ "DEFAULT": 0, ++ "STRONG": 1, ++ "EVENTUAL": 2, ++} ++ ++func (x ReadOptions_ReadConsistency) Enum() *ReadOptions_ReadConsistency { ++ p := new(ReadOptions_ReadConsistency) ++ *p = x ++ return p ++} ++func (x ReadOptions_ReadConsistency) String() string { ++ return proto.EnumName(ReadOptions_ReadConsistency_name, int32(x)) ++} ++func (x *ReadOptions_ReadConsistency) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(ReadOptions_ReadConsistency_value, data, "ReadOptions_ReadConsistency") ++ if err != nil { ++ return err ++ } ++ *x = ReadOptions_ReadConsistency(value) ++ return nil ++} ++ ++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 ++) ++ ++var BeginTransactionRequest_IsolationLevel_name = map[int32]string{ ++ 0: "SNAPSHOT", ++ 1: "SERIALIZABLE", ++} ++var BeginTransactionRequest_IsolationLevel_value = map[string]int32{ ++ "SNAPSHOT": 0, ++ "SERIALIZABLE": 1, ++} ++ ++func (x BeginTransactionRequest_IsolationLevel) Enum() *BeginTransactionRequest_IsolationLevel { ++ p := new(BeginTransactionRequest_IsolationLevel) ++ *p = x ++ return p ++} ++func (x BeginTransactionRequest_IsolationLevel) String() string { ++ return proto.EnumName(BeginTransactionRequest_IsolationLevel_name, int32(x)) ++} ++func (x *BeginTransactionRequest_IsolationLevel) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_IsolationLevel_value, data, "BeginTransactionRequest_IsolationLevel") ++ if err != nil { ++ return err ++ } ++ *x = BeginTransactionRequest_IsolationLevel(value) ++ return nil ++} ++ ++type CommitRequest_Mode int32 ++ ++const ( ++ CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1 ++ CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2 ++) ++ ++var CommitRequest_Mode_name = map[int32]string{ ++ 1: "TRANSACTIONAL", ++ 2: "NON_TRANSACTIONAL", ++} ++var CommitRequest_Mode_value = map[string]int32{ ++ "TRANSACTIONAL": 1, ++ "NON_TRANSACTIONAL": 2, ++} ++ ++func (x CommitRequest_Mode) Enum() *CommitRequest_Mode { ++ p := new(CommitRequest_Mode) ++ *p = x ++ return p ++} ++func (x CommitRequest_Mode) String() string { ++ return proto.EnumName(CommitRequest_Mode_name, int32(x)) ++} ++func (x *CommitRequest_Mode) UnmarshalJSON(data []byte) error { ++ value, err := proto.UnmarshalJSONEnum(CommitRequest_Mode_value, data, "CommitRequest_Mode") ++ if err != nil { ++ return err ++ } ++ *x = CommitRequest_Mode(value) ++ return nil ++} ++ ++// 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} ++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:"-"` ++} ++ ++func (m *PartitionId) Reset() { *m = PartitionId{} } ++func (m *PartitionId) String() string { return proto.CompactTextString(m) } ++func (*PartitionId) ProtoMessage() {} ++ ++func (m *PartitionId) GetDatasetId() string { ++ if m != nil && m.DatasetId != nil { ++ return *m.DatasetId ++ } ++ return "" ++} ++ ++func (m *PartitionId) GetNamespace() string { ++ if m != nil && m.Namespace != nil { ++ return *m.Namespace ++ } ++ return "" ++} ++ ++// 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. ++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 root entity, the second element identifies ++ // a child 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 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. A path can never ++ // be empty. ++ PathElement []*Key_PathElement `protobuf:"bytes,2,rep,name=path_element" json:"path_element,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *Key) Reset() { *m = Key{} } ++func (m *Key) String() string { return proto.CompactTextString(m) } ++func (*Key) ProtoMessage() {} ++ ++func (m *Key) GetPartitionId() *PartitionId { ++ if m != nil { ++ return m.PartitionId ++ } ++ return nil ++} ++ ++func (m *Key) GetPathElement() []*Key_PathElement { ++ if m != nil { ++ return m.PathElement ++ } ++ return nil ++} ++ ++// 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. ++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:"-"` ++} ++ ++func (m *Key_PathElement) Reset() { *m = Key_PathElement{} } ++func (m *Key_PathElement) String() string { return proto.CompactTextString(m) } ++func (*Key_PathElement) ProtoMessage() {} ++ ++func (m *Key_PathElement) GetKind() string { ++ if m != nil && m.Kind != nil { ++ return *m.Kind ++ } ++ return "" ++} ++ ++func (m *Key_PathElement) GetId() int64 { ++ if m != nil && m.Id != nil { ++ return *m.Id ++ } ++ return 0 ++} ++ ++func (m *Key_PathElement) GetName() string { ++ if m != nil && m.Name != nil { ++ return *m.Name ++ } ++ return "" ++} ++ ++// A message that can hold any of the supported value types and associated ++// metadata. ++// ++// At most one of the Value fields may be set. ++// If none are set the value is "null". ++// ++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 meaning 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 indexed property may be set for a ++ // null value. ++ // When indexed is true, stringValue ++ // 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 indexed set to ++ // true; however, you can explicitly set indexed to ++ // true if you want. (An output value never has ++ // indexed explicitly set to true.) If a value is ++ // itself an entity, it cannot have indexed set to ++ // true. ++ // 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:"-"` ++} ++ ++func (m *Value) Reset() { *m = Value{} } ++func (m *Value) String() string { return proto.CompactTextString(m) } ++func (*Value) ProtoMessage() {} ++ ++const Default_Value_Indexed bool = true ++ ++func (m *Value) GetBooleanValue() bool { ++ if m != nil && m.BooleanValue != nil { ++ return *m.BooleanValue ++ } ++ return false ++} ++ ++func (m *Value) GetIntegerValue() int64 { ++ if m != nil && m.IntegerValue != nil { ++ return *m.IntegerValue ++ } ++ return 0 ++} ++ ++func (m *Value) GetDoubleValue() float64 { ++ if m != nil && m.DoubleValue != nil { ++ return *m.DoubleValue ++ } ++ return 0 ++} ++ ++func (m *Value) GetTimestampMicrosecondsValue() int64 { ++ if m != nil && m.TimestampMicrosecondsValue != nil { ++ return *m.TimestampMicrosecondsValue ++ } ++ return 0 ++} ++ ++func (m *Value) GetKeyValue() *Key { ++ if m != nil { ++ return m.KeyValue ++ } ++ return nil ++} ++ ++func (m *Value) GetBlobKeyValue() string { ++ if m != nil && m.BlobKeyValue != nil { ++ return *m.BlobKeyValue ++ } ++ return "" ++} ++ ++func (m *Value) GetStringValue() string { ++ if m != nil && m.StringValue != nil { ++ return *m.StringValue ++ } ++ return "" ++} ++ ++func (m *Value) GetBlobValue() []byte { ++ if m != nil { ++ return m.BlobValue ++ } ++ return nil ++} ++ ++func (m *Value) GetEntityValue() *Entity { ++ if m != nil { ++ return m.EntityValue ++ } ++ return nil ++} ++ ++func (m *Value) GetListValue() []*Value { ++ if m != nil { ++ return m.ListValue ++ } ++ return nil ++} ++ ++func (m *Value) GetMeaning() int32 { ++ if m != nil && m.Meaning != nil { ++ return *m.Meaning ++ } ++ return 0 ++} ++ ++func (m *Value) GetIndexed() bool { ++ if m != nil && m.Indexed != nil { ++ return *m.Indexed ++ } ++ return Default_Value_Indexed ++} ++ ++// An entity 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 { value: { integerValue: 22, ++ // stringValue: "a" } }, but you can have { value: { listValue: ++ // [ { integerValue: 22 }, { stringValue: "a" } ] }. ++ Value *Value `protobuf:"bytes,4,req,name=value" json:"value,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *Property) Reset() { *m = Property{} } ++func (m *Property) String() string { return proto.CompactTextString(m) } ++func (*Property) ProtoMessage() {} ++ ++func (m *Property) GetName() string { ++ if m != nil && m.Name != nil { ++ return *m.Name ++ } ++ return "" ++} ++ ++func (m *Property) GetValue() *Value { ++ if m != nil { ++ return m.Value ++ } ++ return nil ++} ++ ++// An entity. ++// ++// 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. ++type Entity struct { ++ // The entity's key. ++ // ++ // An entity must have a key, unless otherwise documented (for example, ++ // an entity in Value.entityValue 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:"-"` ++} ++ ++func (m *Entity) Reset() { *m = Entity{} } ++func (m *Entity) String() string { return proto.CompactTextString(m) } ++func (*Entity) ProtoMessage() {} ++ ++func (m *Entity) GetKey() *Key { ++ if m != nil { ++ return m.Key ++ } ++ return nil ++} ++ ++func (m *Entity) GetProperty() []*Property { ++ if m != nil { ++ return m.Property ++ } ++ return nil ++} ++ ++// The result of fetching an entity from the datastore. ++type EntityResult struct { ++ // The resulting entity. ++ Entity *Entity `protobuf:"bytes,1,req,name=entity" json:"entity,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *EntityResult) Reset() { *m = EntityResult{} } ++func (m *EntityResult) String() string { return proto.CompactTextString(m) } ++func (*EntityResult) ProtoMessage() {} ++ ++func (m *EntityResult) GetEntity() *Entity { ++ if m != nil { ++ return m.Entity ++ } ++ return nil ++} ++ ++// A 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:"-"` ++} ++ ++func (m *Query) Reset() { *m = Query{} } ++func (m *Query) String() string { return proto.CompactTextString(m) } ++func (*Query) ProtoMessage() {} ++ ++const Default_Query_Offset int32 = 0 ++ ++func (m *Query) GetProjection() []*PropertyExpression { ++ if m != nil { ++ return m.Projection ++ } ++ return nil ++} ++ ++func (m *Query) GetKind() []*KindExpression { ++ if m != nil { ++ return m.Kind ++ } ++ return nil ++} ++ ++func (m *Query) GetFilter() *Filter { ++ if m != nil { ++ return m.Filter ++ } ++ return nil ++} ++ ++func (m *Query) GetOrder() []*PropertyOrder { ++ if m != nil { ++ return m.Order ++ } ++ return nil ++} ++ ++func (m *Query) GetGroupBy() []*PropertyReference { ++ if m != nil { ++ return m.GroupBy ++ } ++ return nil ++} ++ ++func (m *Query) GetStartCursor() []byte { ++ if m != nil { ++ return m.StartCursor ++ } ++ return nil ++} ++ ++func (m *Query) GetEndCursor() []byte { ++ if m != nil { ++ return m.EndCursor ++ } ++ return nil ++} ++ ++func (m *Query) GetOffset() int32 { ++ if m != nil && m.Offset != nil { ++ return *m.Offset ++ } ++ return Default_Query_Offset ++} ++ ++func (m *Query) GetLimit() int32 { ++ if m != nil && m.Limit != nil { ++ return *m.Limit ++ } ++ return 0 ++} ++ ++// A representation of a kind. ++type KindExpression struct { ++ // The name of the kind. ++ Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *KindExpression) Reset() { *m = KindExpression{} } ++func (m *KindExpression) String() string { return proto.CompactTextString(m) } ++func (*KindExpression) ProtoMessage() {} ++ ++func (m *KindExpression) GetName() string { ++ if m != nil && m.Name != nil { ++ return *m.Name ++ } ++ return "" ++} ++ ++// A reference to a property relative to the kind expressions. ++// exactly. ++type PropertyReference struct { ++ // The name of the property. ++ Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *PropertyReference) Reset() { *m = PropertyReference{} } ++func (m *PropertyReference) String() string { return proto.CompactTextString(m) } ++func (*PropertyReference) ProtoMessage() {} ++ ++func (m *PropertyReference) GetName() string { ++ if m != nil && m.Name != nil { ++ return *m.Name ++ } ++ return "" ++} ++ ++// A representation of a property in a projection. ++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 `protobuf:"varint,2,opt,name=aggregation_function,enum=pb.PropertyExpression_AggregationFunction" json:"aggregation_function,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *PropertyExpression) Reset() { *m = PropertyExpression{} } ++func (m *PropertyExpression) String() string { return proto.CompactTextString(m) } ++func (*PropertyExpression) ProtoMessage() {} ++ ++func (m *PropertyExpression) GetProperty() *PropertyReference { ++ if m != nil { ++ return m.Property ++ } ++ return nil ++} ++ ++func (m *PropertyExpression) GetAggregationFunction() PropertyExpression_AggregationFunction { ++ if m != nil && m.AggregationFunction != nil { ++ return *m.AggregationFunction ++ } ++ return PropertyExpression_FIRST ++} ++ ++// The desired order for a specific property. ++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=pb.PropertyOrder_Direction,def=1" json:"direction,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *PropertyOrder) Reset() { *m = PropertyOrder{} } ++func (m *PropertyOrder) String() string { return proto.CompactTextString(m) } ++func (*PropertyOrder) ProtoMessage() {} ++ ++const Default_PropertyOrder_Direction PropertyOrder_Direction = PropertyOrder_ASCENDING ++ ++func (m *PropertyOrder) GetProperty() *PropertyReference { ++ if m != nil { ++ return m.Property ++ } ++ return nil ++} ++ ++func (m *PropertyOrder) GetDirection() PropertyOrder_Direction { ++ if m != nil && m.Direction != nil { ++ return *m.Direction ++ } ++ return Default_PropertyOrder_Direction ++} ++ ++// A holder for any type of filter. Exactly one field should be specified. ++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:"-"` ++} ++ ++func (m *Filter) Reset() { *m = Filter{} } ++func (m *Filter) String() string { return proto.CompactTextString(m) } ++func (*Filter) ProtoMessage() {} ++ ++func (m *Filter) GetCompositeFilter() *CompositeFilter { ++ if m != nil { ++ return m.CompositeFilter ++ } ++ return nil ++} ++ ++func (m *Filter) GetPropertyFilter() *PropertyFilter { ++ if m != nil { ++ return m.PropertyFilter ++ } ++ return nil ++} ++ ++// A filter that merges the multiple other filters using the given operation. ++type CompositeFilter struct { ++ // The operator for combining multiple filters. ++ Operator *CompositeFilter_Operator `protobuf:"varint,1,req,name=operator,enum=pb.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:"-"` ++} ++ ++func (m *CompositeFilter) Reset() { *m = CompositeFilter{} } ++func (m *CompositeFilter) String() string { return proto.CompactTextString(m) } ++func (*CompositeFilter) ProtoMessage() {} ++ ++func (m *CompositeFilter) GetOperator() CompositeFilter_Operator { ++ if m != nil && m.Operator != nil { ++ return *m.Operator ++ } ++ return CompositeFilter_AND ++} ++ ++func (m *CompositeFilter) GetFilter() []*Filter { ++ if m != nil { ++ return m.Filter ++ } ++ return nil ++} ++ ++// A filter on a specific property. ++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=pb.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:"-"` ++} ++ ++func (m *PropertyFilter) Reset() { *m = PropertyFilter{} } ++func (m *PropertyFilter) String() string { return proto.CompactTextString(m) } ++func (*PropertyFilter) ProtoMessage() {} ++ ++func (m *PropertyFilter) GetProperty() *PropertyReference { ++ if m != nil { ++ return m.Property ++ } ++ return nil ++} ++ ++func (m *PropertyFilter) GetOperator() PropertyFilter_Operator { ++ if m != nil && m.Operator != nil { ++ return *m.Operator ++ } ++ return PropertyFilter_LESS_THAN ++} ++ ++func (m *PropertyFilter) GetValue() *Value { ++ if m != nil { ++ return m.Value ++ } ++ return nil ++} ++ ++// A GQL query. ++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:"-"` ++} ++ ++func (m *GqlQuery) Reset() { *m = GqlQuery{} } ++func (m *GqlQuery) String() string { return proto.CompactTextString(m) } ++func (*GqlQuery) ProtoMessage() {} ++ ++const Default_GqlQuery_AllowLiteral bool = false ++ ++func (m *GqlQuery) GetQueryString() string { ++ if m != nil && m.QueryString != nil { ++ return *m.QueryString ++ } ++ return "" ++} ++ ++func (m *GqlQuery) GetAllowLiteral() bool { ++ if m != nil && m.AllowLiteral != nil { ++ return *m.AllowLiteral ++ } ++ return Default_GqlQuery_AllowLiteral ++} ++ ++func (m *GqlQuery) GetNameArg() []*GqlQueryArg { ++ if m != nil { ++ return m.NameArg ++ } ++ return nil ++} ++ ++func (m *GqlQuery) GetNumberArg() []*GqlQueryArg { ++ if m != nil { ++ return m.NumberArg ++ } ++ return nil ++} ++ ++// A binding argument for a GQL query. ++// Exactly one of fields value and cursor must be set. ++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:"-"` ++} ++ ++func (m *GqlQueryArg) Reset() { *m = GqlQueryArg{} } ++func (m *GqlQueryArg) String() string { return proto.CompactTextString(m) } ++func (*GqlQueryArg) ProtoMessage() {} ++ ++func (m *GqlQueryArg) GetName() string { ++ if m != nil && m.Name != nil { ++ return *m.Name ++ } ++ return "" ++} ++ ++func (m *GqlQueryArg) GetValue() *Value { ++ if m != nil { ++ return m.Value ++ } ++ return nil ++} ++ ++func (m *GqlQueryArg) GetCursor() []byte { ++ if m != nil { ++ return m.Cursor ++ } ++ return nil ++} ++ ++// A batch of results produced by a query. ++type QueryResultBatch struct { ++ // The result type for every entity in entityResults. ++ EntityResultType *EntityResult_ResultType `protobuf:"varint,1,req,name=entity_result_type,enum=pb.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=pb.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"` ++ // The number of results skipped because of Query.offset. ++ SkippedResults *int32 `protobuf:"varint,6,opt,name=skipped_results" json:"skipped_results,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *QueryResultBatch) Reset() { *m = QueryResultBatch{} } ++func (m *QueryResultBatch) String() string { return proto.CompactTextString(m) } ++func (*QueryResultBatch) ProtoMessage() {} ++ ++func (m *QueryResultBatch) GetEntityResultType() EntityResult_ResultType { ++ if m != nil && m.EntityResultType != nil { ++ return *m.EntityResultType ++ } ++ return EntityResult_FULL ++} ++ ++func (m *QueryResultBatch) GetEntityResult() []*EntityResult { ++ if m != nil { ++ return m.EntityResult ++ } ++ return nil ++} ++ ++func (m *QueryResultBatch) GetEndCursor() []byte { ++ if m != nil { ++ return m.EndCursor ++ } ++ return nil ++} ++ ++func (m *QueryResultBatch) GetMoreResults() QueryResultBatch_MoreResultsType { ++ if m != nil && m.MoreResults != nil { ++ return *m.MoreResults ++ } ++ return QueryResultBatch_NOT_FINISHED ++} ++ ++func (m *QueryResultBatch) GetSkippedResults() int32 { ++ if m != nil && m.SkippedResults != nil { ++ return *m.SkippedResults ++ } ++ return 0 ++} ++ ++// 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 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:"-"` ++} ++ ++func (m *Mutation) Reset() { *m = Mutation{} } ++func (m *Mutation) String() string { return proto.CompactTextString(m) } ++func (*Mutation) ProtoMessage() {} ++ ++func (m *Mutation) GetUpsert() []*Entity { ++ if m != nil { ++ return m.Upsert ++ } ++ return nil ++} ++ ++func (m *Mutation) GetUpdate() []*Entity { ++ if m != nil { ++ return m.Update ++ } ++ return nil ++} ++ ++func (m *Mutation) GetInsert() []*Entity { ++ if m != nil { ++ return m.Insert ++ } ++ return nil ++} ++ ++func (m *Mutation) GetInsertAutoId() []*Entity { ++ if m != nil { ++ return m.InsertAutoId ++ } ++ return nil ++} ++ ++func (m *Mutation) GetDelete() []*Key { ++ if m != nil { ++ return m.Delete ++ } ++ return nil ++} ++ ++func (m *Mutation) GetForce() bool { ++ if m != nil && m.Force != nil { ++ return *m.Force ++ } ++ return false ++} ++ ++// The result of applying a mutation. ++type MutationResult struct { ++ // Number of index writes. ++ IndexUpdates *int32 `protobuf:"varint,1,req,name=index_updates" json:"index_updates,omitempty"` ++ // Keys for insertAutoId 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:"-"` ++} ++ ++func (m *MutationResult) Reset() { *m = MutationResult{} } ++func (m *MutationResult) String() string { return proto.CompactTextString(m) } ++func (*MutationResult) ProtoMessage() {} ++ ++func (m *MutationResult) GetIndexUpdates() int32 { ++ if m != nil && m.IndexUpdates != nil { ++ return *m.IndexUpdates ++ } ++ return 0 ++} ++ ++func (m *MutationResult) GetInsertAutoIdKey() []*Key { ++ if m != nil { ++ return m.InsertAutoIdKey ++ } ++ return nil ++} ++ ++// Options shared by read requests. ++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 `protobuf:"varint,1,opt,name=read_consistency,enum=pb.ReadOptions_ReadConsistency,def=0" json:"read_consistency,omitempty"` ++ // The transaction to use. Optional. ++ Transaction []byte `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *ReadOptions) Reset() { *m = ReadOptions{} } ++func (m *ReadOptions) String() string { return proto.CompactTextString(m) } ++func (*ReadOptions) ProtoMessage() {} ++ ++const Default_ReadOptions_ReadConsistency ReadOptions_ReadConsistency = ReadOptions_DEFAULT ++ ++func (m *ReadOptions) GetReadConsistency() ReadOptions_ReadConsistency { ++ if m != nil && m.ReadConsistency != nil { ++ return *m.ReadConsistency ++ } ++ return Default_ReadOptions_ReadConsistency ++} ++ ++func (m *ReadOptions) GetTransaction() []byte { ++ if m != nil { ++ return m.Transaction ++ } ++ return nil ++} ++ ++// The request for Lookup. ++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:"-"` ++} ++ ++func (m *LookupRequest) Reset() { *m = LookupRequest{} } ++func (m *LookupRequest) String() string { return proto.CompactTextString(m) } ++func (*LookupRequest) ProtoMessage() {} ++ ++func (m *LookupRequest) GetReadOptions() *ReadOptions { ++ if m != nil { ++ return m.ReadOptions ++ } ++ return nil ++} ++ ++func (m *LookupRequest) GetKey() []*Key { ++ if m != nil { ++ return m.Key ++ } ++ return nil ++} ++ ++// The response for Lookup. ++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:"-"` ++} ++ ++func (m *LookupResponse) Reset() { *m = LookupResponse{} } ++func (m *LookupResponse) String() string { return proto.CompactTextString(m) } ++func (*LookupResponse) ProtoMessage() {} ++ ++func (m *LookupResponse) GetFound() []*EntityResult { ++ if m != nil { ++ return m.Found ++ } ++ return nil ++} ++ ++func (m *LookupResponse) GetMissing() []*EntityResult { ++ if m != nil { ++ return m.Missing ++ } ++ return nil ++} ++ ++func (m *LookupResponse) GetDeferred() []*Key { ++ if m != nil { ++ return m.Deferred ++ } ++ return nil ++} ++ ++// The request for RunQuery. ++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:"-"` ++} ++ ++func (m *RunQueryRequest) Reset() { *m = RunQueryRequest{} } ++func (m *RunQueryRequest) String() string { return proto.CompactTextString(m) } ++func (*RunQueryRequest) ProtoMessage() {} ++ ++func (m *RunQueryRequest) GetReadOptions() *ReadOptions { ++ if m != nil { ++ return m.ReadOptions ++ } ++ return nil ++} ++ ++func (m *RunQueryRequest) GetPartitionId() *PartitionId { ++ if m != nil { ++ return m.PartitionId ++ } ++ return nil ++} ++ ++func (m *RunQueryRequest) GetQuery() *Query { ++ if m != nil { ++ return m.Query ++ } ++ return nil ++} ++ ++func (m *RunQueryRequest) GetGqlQuery() *GqlQuery { ++ if m != nil { ++ return m.GqlQuery ++ } ++ return nil ++} ++ ++// The response for RunQuery. ++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:"-"` ++} ++ ++func (m *RunQueryResponse) Reset() { *m = RunQueryResponse{} } ++func (m *RunQueryResponse) String() string { return proto.CompactTextString(m) } ++func (*RunQueryResponse) ProtoMessage() {} ++ ++func (m *RunQueryResponse) GetBatch() *QueryResultBatch { ++ if m != nil { ++ return m.Batch ++ } ++ return nil ++} ++ ++// The request for BeginTransaction. ++type BeginTransactionRequest struct { ++ // The transaction isolation level. ++ IsolationLevel *BeginTransactionRequest_IsolationLevel `protobuf:"varint,1,opt,name=isolation_level,enum=pb.BeginTransactionRequest_IsolationLevel,def=0" json:"isolation_level,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } ++func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } ++func (*BeginTransactionRequest) ProtoMessage() {} ++ ++const Default_BeginTransactionRequest_IsolationLevel BeginTransactionRequest_IsolationLevel = BeginTransactionRequest_SNAPSHOT ++ ++func (m *BeginTransactionRequest) GetIsolationLevel() BeginTransactionRequest_IsolationLevel { ++ if m != nil && m.IsolationLevel != nil { ++ return *m.IsolationLevel ++ } ++ return Default_BeginTransactionRequest_IsolationLevel ++} ++ ++// The response for BeginTransaction. ++type BeginTransactionResponse struct { ++ // The transaction identifier (always present). ++ Transaction []byte `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *BeginTransactionResponse) Reset() { *m = BeginTransactionResponse{} } ++func (m *BeginTransactionResponse) String() string { return proto.CompactTextString(m) } ++func (*BeginTransactionResponse) ProtoMessage() {} ++ ++func (m *BeginTransactionResponse) GetTransaction() []byte { ++ if m != nil { ++ return m.Transaction ++ } ++ return nil ++} ++ ++// The request for Rollback. ++type RollbackRequest struct { ++ // The transaction identifier, returned by a call to ++ // beginTransaction. ++ Transaction []byte `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *RollbackRequest) Reset() { *m = RollbackRequest{} } ++func (m *RollbackRequest) String() string { return proto.CompactTextString(m) } ++func (*RollbackRequest) ProtoMessage() {} ++ ++func (m *RollbackRequest) GetTransaction() []byte { ++ if m != nil { ++ return m.Transaction ++ } ++ return nil ++} ++ ++// The response for Rollback. ++type RollbackResponse struct { ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *RollbackResponse) Reset() { *m = RollbackResponse{} } ++func (m *RollbackResponse) String() string { return proto.CompactTextString(m) } ++func (*RollbackResponse) ProtoMessage() {} ++ ++// The request for Commit. ++type CommitRequest struct { ++ // The transaction identifier, returned by a call to ++ // beginTransaction. 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=pb.CommitRequest_Mode,def=1" json:"mode,omitempty"` ++ XXX_unrecognized []byte `json:"-"` ++} ++ ++func (m *CommitRequest) Reset() { *m = CommitRequest{} } ++func (m *CommitRequest) String() string { return proto.CompactTextString(m) } ++func (*CommitRequest) ProtoMessage() {} ++ ++const Default_CommitRequest_Mode CommitRequest_Mode = CommitRequest_TRANSACTIONAL ++ ++func (m *CommitRequest) GetTransaction() []byte { ++ if m != nil { ++ return m.Transaction ++ } ++ return nil ++} ++ ++func (m *CommitRequest) GetMutation() *Mutation { ++ if m != nil { ++ return m.Mutation ++ } ++ return nil ++} ++ ++func (m *CommitRequest) GetMode() CommitRequest_Mode { ++ if m != nil && m.Mode != nil { ++ return *m.Mode ++ } ++ return Default_CommitRequest_Mode ++} ++ ++// The response for Commit. ++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:"-"` ++} ++ ++func (m *CommitResponse) Reset() { *m = CommitResponse{} } ++func (m *CommitResponse) String() string { return proto.CompactTextString(m) } ++func (*CommitResponse) ProtoMessage() {} ++ ++func (m *CommitResponse) GetMutationResult() *MutationResult { ++ if m != nil { ++ return m.MutationResult ++ } ++ return nil ++} ++ ++// The request for AllocateIds. ++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:"-"` ++} ++ ++func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } ++func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } ++func (*AllocateIdsRequest) ProtoMessage() {} ++ ++func (m *AllocateIdsRequest) GetKey() []*Key { ++ if m != nil { ++ return m.Key ++ } ++ return nil ++} ++ ++// The response for AllocateIds. ++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:"-"` ++} ++ ++func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } ++func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } ++func (*AllocateIdsResponse) ProtoMessage() {} ++ ++func (m *AllocateIdsResponse) GetKey() []*Key { ++ if m != nil { ++ return m.Key ++ } ++ return nil ++} ++ ++func init() { ++ proto.RegisterEnum("pb.EntityResult_ResultType", EntityResult_ResultType_name, EntityResult_ResultType_value) ++ proto.RegisterEnum("pb.PropertyExpression_AggregationFunction", PropertyExpression_AggregationFunction_name, PropertyExpression_AggregationFunction_value) ++ proto.RegisterEnum("pb.PropertyOrder_Direction", PropertyOrder_Direction_name, PropertyOrder_Direction_value) ++ proto.RegisterEnum("pb.CompositeFilter_Operator", CompositeFilter_Operator_name, CompositeFilter_Operator_value) ++ proto.RegisterEnum("pb.PropertyFilter_Operator", PropertyFilter_Operator_name, PropertyFilter_Operator_value) ++ proto.RegisterEnum("pb.QueryResultBatch_MoreResultsType", QueryResultBatch_MoreResultsType_name, QueryResultBatch_MoreResultsType_value) ++ proto.RegisterEnum("pb.ReadOptions_ReadConsistency", ReadOptions_ReadConsistency_name, ReadOptions_ReadConsistency_value) ++ proto.RegisterEnum("pb.BeginTransactionRequest_IsolationLevel", BeginTransactionRequest_IsolationLevel_name, BeginTransactionRequest_IsolationLevel_value) ++ proto.RegisterEnum("pb.CommitRequest_Mode", CommitRequest_Mode_name, CommitRequest_Mode_value) ++} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.proto b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.proto +new file mode 100644 +index 0000000..bb4c199 +--- /dev/null ++++ b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/datastore/datastore_v1.proto +@@ -0,0 +1,594 @@ ++// Copyright 2013 Google Inc. All Rights Reserved. ++// ++// The datastore v1 service proto definitions ++ ++syntax = "proto2"; ++ ++package pb; ++option java_package = "com.google.api.services.datastore"; ++ ++ ++// 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} ++message PartitionId { ++ // The dataset ID. ++ optional string dataset_id = 3; ++ // The namespace. ++ optional string namespace = 4; ++} ++ ++// 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. ++message Key { ++ // 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. ++ optional PartitionId partition_id = 1; ++ ++ // 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. ++ message PathElement { ++ // The kind of the entity. ++ // A kind matching regex "__.*__" is reserved/read-only. ++ // A kind must not contain more than 500 characters. ++ // Cannot be "". ++ required string kind = 1; ++ // The ID of the entity. ++ // Never equal to zero. Values less than zero are discouraged and will not ++ // be supported in the future. ++ optional int64 id = 2; ++ // The name of the entity. ++ // A name matching regex "__.*__" is reserved/read-only. ++ // A name must not be more than 500 characters. ++ // Cannot be "". ++ optional string name = 3; ++ } ++ ++ // 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 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. A path can never ++ // be empty. ++ repeated PathElement path_element = 2; ++} ++ ++// A message that can hold any of the supported value types and associated ++// metadata. ++// ++// At most one of the Value fields may be set. ++// If none are set the value is "null". ++// ++message Value { ++ // A boolean value. ++ optional bool boolean_value = 1; ++ // An integer value. ++ optional int64 integer_value = 2; ++ // A double value. ++ optional double double_value = 3; ++ // A timestamp value. ++ optional int64 timestamp_microseconds_value = 4; ++ // A key value. ++ optional Key key_value = 5; ++ // A blob key value. ++ optional string blob_key_value = 16; ++ // A UTF-8 encoded string value. ++ optional string string_value = 17; ++ // A blob value. ++ optional bytes blob_value = 18; ++ // An entity value. ++ // May have no key. ++ // May have a key with an incomplete key path. ++ // May have a reserved/read-only key. ++ optional Entity entity_value = 6; ++ // A list value. ++ // Cannot contain another list value. ++ // Cannot also have a meaning and indexing set. ++ repeated Value list_value = 7; ++ ++ // The meaning field is reserved and should not be used. ++ optional int32 meaning = 14; ++ ++ // If the value should be indexed. ++ // ++ // The indexed property may be set for a ++ // null value. ++ // When indexed is true, stringValue ++ // 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 indexed set to ++ // true; however, you can explicitly set indexed to ++ // true if you want. (An output value never has ++ // indexed explicitly set to true.) If a value is ++ // itself an entity, it cannot have indexed set to ++ // true. ++ // Exception: An entity value with meaning 9, 20 or 21 may be indexed. ++ optional bool indexed = 15 [default = true]; ++} ++ ++// An entity property. ++message Property { ++ // 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 "". ++ required string name = 1; ++ ++ // The value(s) of the property. ++ // Each value can have only one value property populated. For example, ++ // you cannot have a values list of { value: { integerValue: 22, ++ // stringValue: "a" } }, but you can have { value: { listValue: ++ // [ { integerValue: 22 }, { stringValue: "a" } ] }. ++ required Value value = 4; ++} ++ ++// An entity. ++// ++// 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. ++message Entity { ++ // The entity's key. ++ // ++ // An entity must have a key, unless otherwise documented (for example, ++ // an entity in Value.entityValue 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. ++ optional Key key = 1; ++ // The entity's properties. ++ // Each property's name must be unique for its entity. ++ repeated Property property = 2; ++} ++ ++// The result of fetching an entity from the datastore. ++message EntityResult { ++ // 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'). ++ enum ResultType { ++ FULL = 1; // The entire entity. ++ PROJECTION = 2; // A projected subset of properties. ++ // The entity may have no key. ++ // A property value may have meaning 18. ++ KEY_ONLY = 3; // Only the key. ++ } ++ ++ // The resulting entity. ++ required Entity entity = 1; ++} ++ ++// A query. ++message Query { ++ // The projection to return. If not set the entire entity is returned. ++ repeated PropertyExpression projection = 2; ++ ++ // The kinds to query (if empty, returns entities from all kinds). ++ repeated KindExpression kind = 3; ++ ++ // The filter to apply (optional). ++ optional Filter filter = 4; ++ ++ // The order to apply to the query results (if empty, order is unspecified). ++ repeated PropertyOrder order = 5; ++ ++ // The properties to group by (if empty, no grouping is applied to the ++ // result set). ++ repeated PropertyReference group_by = 6; ++ ++ // A starting point for the query results. Optional. Query cursors are ++ // returned in query result batches. ++ optional bytes /* serialized QueryCursor */ start_cursor = 7; ++ ++ // An ending point for the query results. Optional. Query cursors are ++ // returned in query result batches. ++ optional bytes /* serialized QueryCursor */ end_cursor = 8; ++ ++ // The number of results to skip. Applies before limit, but after all other ++ // constraints (optional, defaults to 0). ++ optional int32 offset = 10 [default=0]; ++ ++ // The maximum number of results to return. Applies after all other ++ // constraints. Optional. ++ optional int32 limit = 11; ++} ++ ++// A representation of a kind. ++message KindExpression { ++ // The name of the kind. ++ required string name = 1; ++} ++ ++// A reference to a property relative to the kind expressions. ++// exactly. ++message PropertyReference { ++ // The name of the property. ++ required string name = 2; ++} ++ ++// A representation of a property in a projection. ++message PropertyExpression { ++ enum AggregationFunction { ++ FIRST = 1; ++ } ++ // The property to project. ++ required PropertyReference property = 1; ++ // 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. ++ optional AggregationFunction aggregation_function = 2; ++} ++ ++// The desired order for a specific property. ++message PropertyOrder { ++ enum Direction { ++ ASCENDING = 1; ++ DESCENDING = 2; ++ } ++ // The property to order by. ++ required PropertyReference property = 1; ++ // The direction to order by. ++ optional Direction direction = 2 [default=ASCENDING]; ++} ++ ++// A holder for any type of filter. Exactly one field should be specified. ++message Filter { ++ // A composite filter. ++ optional CompositeFilter composite_filter = 1; ++ // A filter on a property. ++ optional PropertyFilter property_filter = 2; ++} ++ ++// A filter that merges the multiple other filters using the given operation. ++message CompositeFilter { ++ enum Operator { ++ AND = 1; ++ } ++ ++ // The operator for combining multiple filters. ++ required Operator operator = 1; ++ // The list of filters to combine. ++ // Must contain at least one filter. ++ repeated Filter filter = 2; ++} ++ ++// A filter on a specific property. ++message PropertyFilter { ++ enum Operator { ++ LESS_THAN = 1; ++ LESS_THAN_OR_EQUAL = 2; ++ GREATER_THAN = 3; ++ GREATER_THAN_OR_EQUAL = 4; ++ EQUAL = 5; ++ ++ HAS_ANCESTOR = 11; ++ } ++ ++ // The property to filter by. ++ required PropertyReference property = 1; ++ // The operator to filter by. ++ required Operator operator = 2; ++ // The value to compare the property to. ++ required Value value = 3; ++} ++ ++// A GQL query. ++message GqlQuery { ++ required string query_string = 1; ++ // When false, the query string must not contain a literal. ++ optional bool allow_literal = 2 [default = false]; ++ // 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. ++ repeated GqlQueryArg name_arg = 3; ++ // 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. ++ repeated GqlQueryArg number_arg = 4; ++} ++ ++// A binding argument for a GQL query. ++// Exactly one of fields value and cursor must be set. ++message GqlQueryArg { ++ // Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". ++ // Must not match regex "__.*__". ++ // Must not be "". ++ optional string name = 1; ++ optional Value value = 2; ++ optional bytes cursor = 3; ++} ++ ++// A batch of results produced by a query. ++message QueryResultBatch { ++ // The possible values for the 'more_results' field. ++ enum MoreResultsType { ++ NOT_FINISHED = 1; // There are additional batches to fetch from this query. ++ MORE_RESULTS_AFTER_LIMIT = 2; // The query is finished, but there are more ++ // results after the limit. ++ NO_MORE_RESULTS = 3; // The query has been exhausted. ++ } ++ ++ // The result type for every entity in entityResults. ++ required EntityResult.ResultType entity_result_type = 1; ++ // The results for this batch. ++ repeated EntityResult entity_result = 2; ++ ++ // A cursor that points to the position after the last result in the batch. ++ // May be absent. ++ optional bytes /* serialized QueryCursor */ end_cursor = 4; ++ ++ // The state of the query after the current batch. ++ required MoreResultsType more_results = 5; ++ ++ // The number of results skipped because of Query.offset. ++ optional int32 skipped_results = 6; ++} ++ ++// 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. ++message Mutation { ++ // Entities to upsert. ++ // Each upserted entity's key must have a complete path and ++ // must not be reserved/read-only. ++ repeated Entity upsert = 1; ++ // Entities to update. ++ // Each updated entity's key must have a complete path and ++ // must not be reserved/read-only. ++ repeated Entity update = 2; ++ // Entities to insert. ++ // Each inserted entity's key must have a complete path and ++ // must not be reserved/read-only. ++ repeated Entity insert = 3; ++ // 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. ++ repeated Entity insert_auto_id = 4; ++ // Keys of entities to delete. ++ // Each key must have a complete key path and must not be reserved/read-only. ++ repeated Key delete = 5; ++ // Ignore a user specified read-only period. Optional. ++ optional bool force = 6; ++} ++ ++// The result of applying a mutation. ++message MutationResult { ++ // Number of index writes. ++ required int32 index_updates = 1; ++ // Keys for insertAutoId entities. One per entity from the ++ // request, in the same order. ++ repeated Key insert_auto_id_key = 2; ++} ++ ++// Options shared by read requests. ++message ReadOptions { ++ enum ReadConsistency { ++ DEFAULT = 0; ++ STRONG = 1; ++ EVENTUAL = 2; ++ } ++ ++ // 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. ++ optional ReadConsistency read_consistency = 1 [default=DEFAULT]; ++ ++ // The transaction to use. Optional. ++ optional bytes /* serialized Transaction */ transaction = 2; ++} ++ ++// The request for Lookup. ++message LookupRequest { ++ ++ // Options for this lookup request. Optional. ++ optional ReadOptions read_options = 1; ++ // Keys of entities to look up from the datastore. ++ repeated Key key = 3; ++} ++ ++// The response for Lookup. ++message LookupResponse { ++ ++ // The order of results in these fields is undefined and has no relation to ++ // the order of the keys in the input. ++ ++ // Entities found as ResultType.FULL entities. ++ repeated EntityResult found = 1; ++ ++ // Entities not found as ResultType.KEY_ONLY entities. ++ repeated EntityResult missing = 2; ++ ++ // A list of keys that were not looked up due to resource constraints. ++ repeated Key deferred = 3; ++} ++ ++ ++// The request for RunQuery. ++message RunQueryRequest { ++ ++ // The options for this query. ++ optional ReadOptions read_options = 1; ++ ++ // 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. ++ optional PartitionId partition_id = 2; ++ ++ // The query to run. ++ // Either this field or field gql_query must be set, but not both. ++ optional Query query = 3; ++ // The GQL query to run. ++ // Either this field or field query must be set, but not both. ++ optional GqlQuery gql_query = 7; ++} ++ ++// The response for RunQuery. ++message RunQueryResponse { ++ ++ // A batch of query results (always present). ++ optional QueryResultBatch batch = 1; ++ ++} ++ ++// The request for BeginTransaction. ++message BeginTransactionRequest { ++ ++ enum IsolationLevel { ++ SNAPSHOT = 0; // Read from a consistent snapshot. Concurrent transactions ++ // 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). ++ SERIALIZABLE = 1; // Read from a consistent snapshot. Concurrent ++ // transactions conflict if they cannot be serialized. ++ // For example Read(A),Write(B) does conflict with ++ // Read(B),Write(A) but Read(A) may not conflict with ++ // Write(A). ++ } ++ ++ // The transaction isolation level. ++ optional IsolationLevel isolation_level = 1 [default=SNAPSHOT]; ++} ++ ++// The response for BeginTransaction. ++message BeginTransactionResponse { ++ ++ // The transaction identifier (always present). ++ optional bytes /* serialized Transaction */ transaction = 1; ++} ++ ++// The request for Rollback. ++message RollbackRequest { ++ ++ // The transaction identifier, returned by a call to ++ // beginTransaction. ++ required bytes /* serialized Transaction */ transaction = 1; ++} ++ ++// The response for Rollback. ++message RollbackResponse { ++// Empty ++} ++ ++// The request for Commit. ++message CommitRequest { ++ ++ enum Mode { ++ TRANSACTIONAL = 1; ++ NON_TRANSACTIONAL = 2; ++ } ++ ++ // The transaction identifier, returned by a call to ++ // beginTransaction. Must be set when mode is TRANSACTIONAL. ++ optional bytes /* serialized Transaction */ transaction = 1; ++ // The mutation to perform. Optional. ++ optional Mutation mutation = 2; ++ // The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. ++ optional Mode mode = 5 [default=TRANSACTIONAL]; ++} ++ ++// The response for Commit. ++message CommitResponse { ++ ++ // The result of performing the mutation (if any). ++ optional MutationResult mutation_result = 1; ++} ++ ++// The request for AllocateIds. ++message AllocateIdsRequest { ++ ++ // A list of keys with incomplete key paths to allocate IDs for. ++ // No key may be reserved/read-only. ++ repeated Key key = 1; ++} ++ ++// The response for AllocateIds. ++message AllocateIdsResponse { ++ ++ // The keys specified in the request (in the same order), each with ++ // its key path completed with a newly allocated ID. ++ repeated Key key = 1; ++} ++ ++// Each rpc normalizes the partition IDs of the keys in its input entities, ++// and always returns entities with keys with normalized partition IDs. ++// (Note that applies to all entities, including entities in values.) ++service DatastoreService { ++ // Look up some entities by key. ++ rpc Lookup(LookupRequest) returns (LookupResponse) { ++ }; ++ // Query for entities. ++ rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) { ++ }; ++ // Begin a new transaction. ++ rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { ++ }; ++ // Commit a transaction, optionally creating, deleting or modifying some ++ // entities. ++ rpc Commit(CommitRequest) returns (CommitResponse) { ++ }; ++ // Roll back a transaction. ++ rpc Rollback(RollbackRequest) returns (RollbackResponse) { ++ }; ++ // Allocate IDs for incomplete keys (useful for referencing an entity before ++ // it is inserted). ++ rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) { ++ }; ++} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/inteernal/testutil/context.go b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/testutil/context.go +new file mode 100644 +index 0000000..aafd683 +--- /dev/null ++++ b/Godeps/_workspace/src/google.golang.org/cloud/inteernal/testutil/context.go +@@ -0,0 +1,57 @@ ++// Copyright 2014 Google Inc. All Rights Reserved. ++// ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++// Package testutil contains helper functions for writing tests. ++package testutil ++ ++import ( ++ "io/ioutil" ++ "log" ++ "net/http" ++ "os" ++ ++ "golang.org/x/net/context" ++ "golang.org/x/oauth2" ++ "golang.org/x/oauth2/google" ++ "google.golang.org/cloud" ++) ++ ++const ( ++ envProjID = "GCLOUD_TESTS_GOLANG_PROJECT_ID" ++ envPrivateKey = "GCLOUD_TESTS_GOLANG_KEY" ++) ++ ++func Context(scopes ...string) context.Context { ++ key, projID := os.Getenv(envPrivateKey), os.Getenv(envProjID) ++ if key == "" || projID == "" { ++ log.Fatal("GCLOUD_TESTS_GOLANG_KEY and GCLOUD_TESTS_GOLANG_PROJECT_ID must be set. See CONTRIBUTING.md for details.") ++ } ++ jsonKey, err := ioutil.ReadFile(key) ++ if err != nil { ++ log.Fatalf("Cannot read the JSON key file, err: %v", err) ++ } ++ conf, err := google.JWTConfigFromJSON(jsonKey, scopes...) ++ if err != nil { ++ log.Fatal(err) ++ } ++ return cloud.NewContext(projID, conf.Client(oauth2.NoContext)) ++} ++ ++func NoAuthContext() context.Context { ++ projID := os.Getenv(envProjID) ++ if projID == "" { ++ log.Fatal("GCLOUD_TESTS_GOLANG_PROJECT_ID must be set. See CONTRIBUTING.md for details.") ++ } ++ return cloud.NewContext(projID, &http.Client{Transport: http.DefaultTransport}) ++} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/internal/cloud.go b/Godeps/_workspace/src/google.golang.org/cloud/internal/cloud.go +deleted file mode 100644 +index 984323c..0000000 +--- a/Godeps/_workspace/src/google.golang.org/cloud/internal/cloud.go ++++ /dev/null +@@ -1,128 +0,0 @@ +-// Copyright 2014 Google Inc. All Rights Reserved. +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-// Package internal provides support for the cloud packages. +-// +-// Users should not import this package directly. +-package internal +- +-import ( +- "fmt" +- "net/http" +- "sync" +- +- "golang.org/x/net/context" +-) +- +-type contextKey struct{} +- +-func WithContext(parent context.Context, projID string, c *http.Client) context.Context { +- if c == nil { +- panic("nil *http.Client passed to WithContext") +- } +- if projID == "" { +- panic("empty project ID passed to WithContext") +- } +- return context.WithValue(parent, contextKey{}, &cloudContext{ +- ProjectID: projID, +- HTTPClient: c, +- }) +-} +- +-const userAgent = "gcloud-golang/0.1" +- +-type cloudContext struct { +- ProjectID string +- HTTPClient *http.Client +- +- mu sync.Mutex // guards svc +- svc map[string]interface{} // e.g. "storage" => *rawStorage.Service +-} +- +-// Service returns the result of the fill function if it's never been +-// called before for the given name (which is assumed to be an API +-// service name, like "datastore"). If it has already been cached, the fill +-// func is not run. +-// It's safe for concurrent use by multiple goroutines. +-func Service(ctx context.Context, name string, fill func(*http.Client) interface{}) interface{} { +- return cc(ctx).service(name, fill) +-} +- +-func (c *cloudContext) service(name string, fill func(*http.Client) interface{}) interface{} { +- c.mu.Lock() +- defer c.mu.Unlock() +- +- if c.svc == nil { +- c.svc = make(map[string]interface{}) +- } else if v, ok := c.svc[name]; ok { +- return v +- } +- v := fill(c.HTTPClient) +- c.svc[name] = v +- return v +-} +- +-// Transport is an http.RoundTripper that appends +-// Google Cloud client's user-agent to the original +-// request's user-agent header. +-type Transport struct { +- // Base represents the actual http.RoundTripper +- // the requests will be delegated to. +- Base http.RoundTripper +-} +- +-// RoundTrip appends a user-agent to the existing user-agent +-// header and delegates the request to the base http.RoundTripper. +-func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { +- req = cloneRequest(req) +- ua := req.Header.Get("User-Agent") +- if ua == "" { +- ua = userAgent +- } else { +- ua = fmt.Sprintf("%s;%s", ua, userAgent) +- } +- req.Header.Set("User-Agent", ua) +- return t.Base.RoundTrip(req) +-} +- +-// cloneRequest returns a clone of the provided *http.Request. +-// The clone is a shallow copy of the struct and its Header map. +-func cloneRequest(r *http.Request) *http.Request { +- // shallow copy of the struct +- r2 := new(http.Request) +- *r2 = *r +- // deep copy of the Header +- r2.Header = make(http.Header) +- for k, s := range r.Header { +- r2.Header[k] = s +- } +- return r2 +-} +- +-func ProjID(ctx context.Context) string { +- return cc(ctx).ProjectID +-} +- +-func HTTPClient(ctx context.Context) *http.Client { +- return cc(ctx).HTTPClient +-} +- +-// cc returns the internal *cloudContext (cc) state for a context.Context. +-// It panics if the user did it wrong. +-func cc(ctx context.Context) *cloudContext { +- if c, ok := ctx.Value(contextKey{}).(*cloudContext); ok { +- return c +- } +- panic("invalid context.Context type; it should be created with cloud.NewContext") +-} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.pb.go b/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.pb.go +deleted file mode 100644 +index be903e5..0000000 +--- a/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.pb.go ++++ /dev/null +@@ -1,1633 +0,0 @@ +-// Code generated by protoc-gen-go. +-// source: datastore_v1.proto +-// DO NOT EDIT! +- +-/* +-Package pb 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 +-*/ +-package pb +- +-import proto "github.com/golang/protobuf/proto" +-import math "math" +- +-// Reference imports to suppress errors if they are not otherwise used. +-var _ = proto.Marshal +-var _ = math.Inf +- +-// 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'). +-type EntityResult_ResultType int32 +- +-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 +-) +- +-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, +-} +- +-func (x EntityResult_ResultType) Enum() *EntityResult_ResultType { +- p := new(EntityResult_ResultType) +- *p = x +- return p +-} +-func (x EntityResult_ResultType) String() string { +- return proto.EnumName(EntityResult_ResultType_name, int32(x)) +-} +-func (x *EntityResult_ResultType) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(EntityResult_ResultType_value, data, "EntityResult_ResultType") +- if err != nil { +- return err +- } +- *x = EntityResult_ResultType(value) +- return nil +-} +- +-type PropertyExpression_AggregationFunction int32 +- +-const ( +- PropertyExpression_FIRST PropertyExpression_AggregationFunction = 1 +-) +- +-var PropertyExpression_AggregationFunction_name = map[int32]string{ +- 1: "FIRST", +-} +-var PropertyExpression_AggregationFunction_value = map[string]int32{ +- "FIRST": 1, +-} +- +-func (x PropertyExpression_AggregationFunction) Enum() *PropertyExpression_AggregationFunction { +- p := new(PropertyExpression_AggregationFunction) +- *p = x +- return p +-} +-func (x PropertyExpression_AggregationFunction) String() string { +- return proto.EnumName(PropertyExpression_AggregationFunction_name, int32(x)) +-} +-func (x *PropertyExpression_AggregationFunction) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(PropertyExpression_AggregationFunction_value, data, "PropertyExpression_AggregationFunction") +- if err != nil { +- return err +- } +- *x = PropertyExpression_AggregationFunction(value) +- return nil +-} +- +-type PropertyOrder_Direction int32 +- +-const ( +- PropertyOrder_ASCENDING PropertyOrder_Direction = 1 +- PropertyOrder_DESCENDING PropertyOrder_Direction = 2 +-) +- +-var PropertyOrder_Direction_name = map[int32]string{ +- 1: "ASCENDING", +- 2: "DESCENDING", +-} +-var PropertyOrder_Direction_value = map[string]int32{ +- "ASCENDING": 1, +- "DESCENDING": 2, +-} +- +-func (x PropertyOrder_Direction) Enum() *PropertyOrder_Direction { +- p := new(PropertyOrder_Direction) +- *p = x +- return p +-} +-func (x PropertyOrder_Direction) String() string { +- return proto.EnumName(PropertyOrder_Direction_name, int32(x)) +-} +-func (x *PropertyOrder_Direction) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(PropertyOrder_Direction_value, data, "PropertyOrder_Direction") +- if err != nil { +- return err +- } +- *x = PropertyOrder_Direction(value) +- return nil +-} +- +-type CompositeFilter_Operator int32 +- +-const ( +- CompositeFilter_AND CompositeFilter_Operator = 1 +-) +- +-var CompositeFilter_Operator_name = map[int32]string{ +- 1: "AND", +-} +-var CompositeFilter_Operator_value = map[string]int32{ +- "AND": 1, +-} +- +-func (x CompositeFilter_Operator) Enum() *CompositeFilter_Operator { +- p := new(CompositeFilter_Operator) +- *p = x +- return p +-} +-func (x CompositeFilter_Operator) String() string { +- return proto.EnumName(CompositeFilter_Operator_name, int32(x)) +-} +-func (x *CompositeFilter_Operator) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(CompositeFilter_Operator_value, data, "CompositeFilter_Operator") +- if err != nil { +- return err +- } +- *x = CompositeFilter_Operator(value) +- return nil +-} +- +-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 +-) +- +-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, +-} +- +-func (x PropertyFilter_Operator) Enum() *PropertyFilter_Operator { +- p := new(PropertyFilter_Operator) +- *p = x +- return p +-} +-func (x PropertyFilter_Operator) String() string { +- return proto.EnumName(PropertyFilter_Operator_name, int32(x)) +-} +-func (x *PropertyFilter_Operator) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(PropertyFilter_Operator_value, data, "PropertyFilter_Operator") +- if err != nil { +- return err +- } +- *x = PropertyFilter_Operator(value) +- return nil +-} +- +-// The possible values for the 'more_results' field. +-type QueryResultBatch_MoreResultsType int32 +- +-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 +-) +- +-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, +-} +- +-func (x QueryResultBatch_MoreResultsType) Enum() *QueryResultBatch_MoreResultsType { +- p := new(QueryResultBatch_MoreResultsType) +- *p = x +- return p +-} +-func (x QueryResultBatch_MoreResultsType) String() string { +- return proto.EnumName(QueryResultBatch_MoreResultsType_name, int32(x)) +-} +-func (x *QueryResultBatch_MoreResultsType) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(QueryResultBatch_MoreResultsType_value, data, "QueryResultBatch_MoreResultsType") +- if err != nil { +- return err +- } +- *x = QueryResultBatch_MoreResultsType(value) +- return nil +-} +- +-type ReadOptions_ReadConsistency int32 +- +-const ( +- ReadOptions_DEFAULT ReadOptions_ReadConsistency = 0 +- ReadOptions_STRONG ReadOptions_ReadConsistency = 1 +- ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2 +-) +- +-var ReadOptions_ReadConsistency_name = map[int32]string{ +- 0: "DEFAULT", +- 1: "STRONG", +- 2: "EVENTUAL", +-} +-var ReadOptions_ReadConsistency_value = map[string]int32{ +- "DEFAULT": 0, +- "STRONG": 1, +- "EVENTUAL": 2, +-} +- +-func (x ReadOptions_ReadConsistency) Enum() *ReadOptions_ReadConsistency { +- p := new(ReadOptions_ReadConsistency) +- *p = x +- return p +-} +-func (x ReadOptions_ReadConsistency) String() string { +- return proto.EnumName(ReadOptions_ReadConsistency_name, int32(x)) +-} +-func (x *ReadOptions_ReadConsistency) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(ReadOptions_ReadConsistency_value, data, "ReadOptions_ReadConsistency") +- if err != nil { +- return err +- } +- *x = ReadOptions_ReadConsistency(value) +- return nil +-} +- +-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 +-) +- +-var BeginTransactionRequest_IsolationLevel_name = map[int32]string{ +- 0: "SNAPSHOT", +- 1: "SERIALIZABLE", +-} +-var BeginTransactionRequest_IsolationLevel_value = map[string]int32{ +- "SNAPSHOT": 0, +- "SERIALIZABLE": 1, +-} +- +-func (x BeginTransactionRequest_IsolationLevel) Enum() *BeginTransactionRequest_IsolationLevel { +- p := new(BeginTransactionRequest_IsolationLevel) +- *p = x +- return p +-} +-func (x BeginTransactionRequest_IsolationLevel) String() string { +- return proto.EnumName(BeginTransactionRequest_IsolationLevel_name, int32(x)) +-} +-func (x *BeginTransactionRequest_IsolationLevel) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_IsolationLevel_value, data, "BeginTransactionRequest_IsolationLevel") +- if err != nil { +- return err +- } +- *x = BeginTransactionRequest_IsolationLevel(value) +- return nil +-} +- +-type CommitRequest_Mode int32 +- +-const ( +- CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1 +- CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2 +-) +- +-var CommitRequest_Mode_name = map[int32]string{ +- 1: "TRANSACTIONAL", +- 2: "NON_TRANSACTIONAL", +-} +-var CommitRequest_Mode_value = map[string]int32{ +- "TRANSACTIONAL": 1, +- "NON_TRANSACTIONAL": 2, +-} +- +-func (x CommitRequest_Mode) Enum() *CommitRequest_Mode { +- p := new(CommitRequest_Mode) +- *p = x +- return p +-} +-func (x CommitRequest_Mode) String() string { +- return proto.EnumName(CommitRequest_Mode_name, int32(x)) +-} +-func (x *CommitRequest_Mode) UnmarshalJSON(data []byte) error { +- value, err := proto.UnmarshalJSONEnum(CommitRequest_Mode_value, data, "CommitRequest_Mode") +- if err != nil { +- return err +- } +- *x = CommitRequest_Mode(value) +- return nil +-} +- +-// 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} +-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:"-"` +-} +- +-func (m *PartitionId) Reset() { *m = PartitionId{} } +-func (m *PartitionId) String() string { return proto.CompactTextString(m) } +-func (*PartitionId) ProtoMessage() {} +- +-func (m *PartitionId) GetDatasetId() string { +- if m != nil && m.DatasetId != nil { +- return *m.DatasetId +- } +- return "" +-} +- +-func (m *PartitionId) GetNamespace() string { +- if m != nil && m.Namespace != nil { +- return *m.Namespace +- } +- return "" +-} +- +-// 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. +-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 root entity, the second element identifies +- // a child 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 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. A path can never +- // be empty. +- PathElement []*Key_PathElement `protobuf:"bytes,2,rep,name=path_element" json:"path_element,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *Key) Reset() { *m = Key{} } +-func (m *Key) String() string { return proto.CompactTextString(m) } +-func (*Key) ProtoMessage() {} +- +-func (m *Key) GetPartitionId() *PartitionId { +- if m != nil { +- return m.PartitionId +- } +- return nil +-} +- +-func (m *Key) GetPathElement() []*Key_PathElement { +- if m != nil { +- return m.PathElement +- } +- return nil +-} +- +-// 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. +-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:"-"` +-} +- +-func (m *Key_PathElement) Reset() { *m = Key_PathElement{} } +-func (m *Key_PathElement) String() string { return proto.CompactTextString(m) } +-func (*Key_PathElement) ProtoMessage() {} +- +-func (m *Key_PathElement) GetKind() string { +- if m != nil && m.Kind != nil { +- return *m.Kind +- } +- return "" +-} +- +-func (m *Key_PathElement) GetId() int64 { +- if m != nil && m.Id != nil { +- return *m.Id +- } +- return 0 +-} +- +-func (m *Key_PathElement) GetName() string { +- if m != nil && m.Name != nil { +- return *m.Name +- } +- return "" +-} +- +-// A message that can hold any of the supported value types and associated +-// metadata. +-// +-// At most one of the Value fields may be set. +-// If none are set the value is "null". +-// +-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 meaning 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 indexed property may be set for a +- // null value. +- // When indexed is true, stringValue +- // 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 indexed set to +- // true; however, you can explicitly set indexed to +- // true if you want. (An output value never has +- // indexed explicitly set to true.) If a value is +- // itself an entity, it cannot have indexed set to +- // true. +- // 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:"-"` +-} +- +-func (m *Value) Reset() { *m = Value{} } +-func (m *Value) String() string { return proto.CompactTextString(m) } +-func (*Value) ProtoMessage() {} +- +-const Default_Value_Indexed bool = true +- +-func (m *Value) GetBooleanValue() bool { +- if m != nil && m.BooleanValue != nil { +- return *m.BooleanValue +- } +- return false +-} +- +-func (m *Value) GetIntegerValue() int64 { +- if m != nil && m.IntegerValue != nil { +- return *m.IntegerValue +- } +- return 0 +-} +- +-func (m *Value) GetDoubleValue() float64 { +- if m != nil && m.DoubleValue != nil { +- return *m.DoubleValue +- } +- return 0 +-} +- +-func (m *Value) GetTimestampMicrosecondsValue() int64 { +- if m != nil && m.TimestampMicrosecondsValue != nil { +- return *m.TimestampMicrosecondsValue +- } +- return 0 +-} +- +-func (m *Value) GetKeyValue() *Key { +- if m != nil { +- return m.KeyValue +- } +- return nil +-} +- +-func (m *Value) GetBlobKeyValue() string { +- if m != nil && m.BlobKeyValue != nil { +- return *m.BlobKeyValue +- } +- return "" +-} +- +-func (m *Value) GetStringValue() string { +- if m != nil && m.StringValue != nil { +- return *m.StringValue +- } +- return "" +-} +- +-func (m *Value) GetBlobValue() []byte { +- if m != nil { +- return m.BlobValue +- } +- return nil +-} +- +-func (m *Value) GetEntityValue() *Entity { +- if m != nil { +- return m.EntityValue +- } +- return nil +-} +- +-func (m *Value) GetListValue() []*Value { +- if m != nil { +- return m.ListValue +- } +- return nil +-} +- +-func (m *Value) GetMeaning() int32 { +- if m != nil && m.Meaning != nil { +- return *m.Meaning +- } +- return 0 +-} +- +-func (m *Value) GetIndexed() bool { +- if m != nil && m.Indexed != nil { +- return *m.Indexed +- } +- return Default_Value_Indexed +-} +- +-// An entity 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 { value: { integerValue: 22, +- // stringValue: "a" } }, but you can have { value: { listValue: +- // [ { integerValue: 22 }, { stringValue: "a" } ] }. +- Value *Value `protobuf:"bytes,4,req,name=value" json:"value,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *Property) Reset() { *m = Property{} } +-func (m *Property) String() string { return proto.CompactTextString(m) } +-func (*Property) ProtoMessage() {} +- +-func (m *Property) GetName() string { +- if m != nil && m.Name != nil { +- return *m.Name +- } +- return "" +-} +- +-func (m *Property) GetValue() *Value { +- if m != nil { +- return m.Value +- } +- return nil +-} +- +-// An entity. +-// +-// 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. +-type Entity struct { +- // The entity's key. +- // +- // An entity must have a key, unless otherwise documented (for example, +- // an entity in Value.entityValue 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:"-"` +-} +- +-func (m *Entity) Reset() { *m = Entity{} } +-func (m *Entity) String() string { return proto.CompactTextString(m) } +-func (*Entity) ProtoMessage() {} +- +-func (m *Entity) GetKey() *Key { +- if m != nil { +- return m.Key +- } +- return nil +-} +- +-func (m *Entity) GetProperty() []*Property { +- if m != nil { +- return m.Property +- } +- return nil +-} +- +-// The result of fetching an entity from the datastore. +-type EntityResult struct { +- // The resulting entity. +- Entity *Entity `protobuf:"bytes,1,req,name=entity" json:"entity,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *EntityResult) Reset() { *m = EntityResult{} } +-func (m *EntityResult) String() string { return proto.CompactTextString(m) } +-func (*EntityResult) ProtoMessage() {} +- +-func (m *EntityResult) GetEntity() *Entity { +- if m != nil { +- return m.Entity +- } +- return nil +-} +- +-// A 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:"-"` +-} +- +-func (m *Query) Reset() { *m = Query{} } +-func (m *Query) String() string { return proto.CompactTextString(m) } +-func (*Query) ProtoMessage() {} +- +-const Default_Query_Offset int32 = 0 +- +-func (m *Query) GetProjection() []*PropertyExpression { +- if m != nil { +- return m.Projection +- } +- return nil +-} +- +-func (m *Query) GetKind() []*KindExpression { +- if m != nil { +- return m.Kind +- } +- return nil +-} +- +-func (m *Query) GetFilter() *Filter { +- if m != nil { +- return m.Filter +- } +- return nil +-} +- +-func (m *Query) GetOrder() []*PropertyOrder { +- if m != nil { +- return m.Order +- } +- return nil +-} +- +-func (m *Query) GetGroupBy() []*PropertyReference { +- if m != nil { +- return m.GroupBy +- } +- return nil +-} +- +-func (m *Query) GetStartCursor() []byte { +- if m != nil { +- return m.StartCursor +- } +- return nil +-} +- +-func (m *Query) GetEndCursor() []byte { +- if m != nil { +- return m.EndCursor +- } +- return nil +-} +- +-func (m *Query) GetOffset() int32 { +- if m != nil && m.Offset != nil { +- return *m.Offset +- } +- return Default_Query_Offset +-} +- +-func (m *Query) GetLimit() int32 { +- if m != nil && m.Limit != nil { +- return *m.Limit +- } +- return 0 +-} +- +-// A representation of a kind. +-type KindExpression struct { +- // The name of the kind. +- Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *KindExpression) Reset() { *m = KindExpression{} } +-func (m *KindExpression) String() string { return proto.CompactTextString(m) } +-func (*KindExpression) ProtoMessage() {} +- +-func (m *KindExpression) GetName() string { +- if m != nil && m.Name != nil { +- return *m.Name +- } +- return "" +-} +- +-// A reference to a property relative to the kind expressions. +-// exactly. +-type PropertyReference struct { +- // The name of the property. +- Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *PropertyReference) Reset() { *m = PropertyReference{} } +-func (m *PropertyReference) String() string { return proto.CompactTextString(m) } +-func (*PropertyReference) ProtoMessage() {} +- +-func (m *PropertyReference) GetName() string { +- if m != nil && m.Name != nil { +- return *m.Name +- } +- return "" +-} +- +-// A representation of a property in a projection. +-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 `protobuf:"varint,2,opt,name=aggregation_function,enum=pb.PropertyExpression_AggregationFunction" json:"aggregation_function,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *PropertyExpression) Reset() { *m = PropertyExpression{} } +-func (m *PropertyExpression) String() string { return proto.CompactTextString(m) } +-func (*PropertyExpression) ProtoMessage() {} +- +-func (m *PropertyExpression) GetProperty() *PropertyReference { +- if m != nil { +- return m.Property +- } +- return nil +-} +- +-func (m *PropertyExpression) GetAggregationFunction() PropertyExpression_AggregationFunction { +- if m != nil && m.AggregationFunction != nil { +- return *m.AggregationFunction +- } +- return PropertyExpression_FIRST +-} +- +-// The desired order for a specific property. +-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=pb.PropertyOrder_Direction,def=1" json:"direction,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *PropertyOrder) Reset() { *m = PropertyOrder{} } +-func (m *PropertyOrder) String() string { return proto.CompactTextString(m) } +-func (*PropertyOrder) ProtoMessage() {} +- +-const Default_PropertyOrder_Direction PropertyOrder_Direction = PropertyOrder_ASCENDING +- +-func (m *PropertyOrder) GetProperty() *PropertyReference { +- if m != nil { +- return m.Property +- } +- return nil +-} +- +-func (m *PropertyOrder) GetDirection() PropertyOrder_Direction { +- if m != nil && m.Direction != nil { +- return *m.Direction +- } +- return Default_PropertyOrder_Direction +-} +- +-// A holder for any type of filter. Exactly one field should be specified. +-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:"-"` +-} +- +-func (m *Filter) Reset() { *m = Filter{} } +-func (m *Filter) String() string { return proto.CompactTextString(m) } +-func (*Filter) ProtoMessage() {} +- +-func (m *Filter) GetCompositeFilter() *CompositeFilter { +- if m != nil { +- return m.CompositeFilter +- } +- return nil +-} +- +-func (m *Filter) GetPropertyFilter() *PropertyFilter { +- if m != nil { +- return m.PropertyFilter +- } +- return nil +-} +- +-// A filter that merges the multiple other filters using the given operation. +-type CompositeFilter struct { +- // The operator for combining multiple filters. +- Operator *CompositeFilter_Operator `protobuf:"varint,1,req,name=operator,enum=pb.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:"-"` +-} +- +-func (m *CompositeFilter) Reset() { *m = CompositeFilter{} } +-func (m *CompositeFilter) String() string { return proto.CompactTextString(m) } +-func (*CompositeFilter) ProtoMessage() {} +- +-func (m *CompositeFilter) GetOperator() CompositeFilter_Operator { +- if m != nil && m.Operator != nil { +- return *m.Operator +- } +- return CompositeFilter_AND +-} +- +-func (m *CompositeFilter) GetFilter() []*Filter { +- if m != nil { +- return m.Filter +- } +- return nil +-} +- +-// A filter on a specific property. +-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=pb.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:"-"` +-} +- +-func (m *PropertyFilter) Reset() { *m = PropertyFilter{} } +-func (m *PropertyFilter) String() string { return proto.CompactTextString(m) } +-func (*PropertyFilter) ProtoMessage() {} +- +-func (m *PropertyFilter) GetProperty() *PropertyReference { +- if m != nil { +- return m.Property +- } +- return nil +-} +- +-func (m *PropertyFilter) GetOperator() PropertyFilter_Operator { +- if m != nil && m.Operator != nil { +- return *m.Operator +- } +- return PropertyFilter_LESS_THAN +-} +- +-func (m *PropertyFilter) GetValue() *Value { +- if m != nil { +- return m.Value +- } +- return nil +-} +- +-// A GQL query. +-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:"-"` +-} +- +-func (m *GqlQuery) Reset() { *m = GqlQuery{} } +-func (m *GqlQuery) String() string { return proto.CompactTextString(m) } +-func (*GqlQuery) ProtoMessage() {} +- +-const Default_GqlQuery_AllowLiteral bool = false +- +-func (m *GqlQuery) GetQueryString() string { +- if m != nil && m.QueryString != nil { +- return *m.QueryString +- } +- return "" +-} +- +-func (m *GqlQuery) GetAllowLiteral() bool { +- if m != nil && m.AllowLiteral != nil { +- return *m.AllowLiteral +- } +- return Default_GqlQuery_AllowLiteral +-} +- +-func (m *GqlQuery) GetNameArg() []*GqlQueryArg { +- if m != nil { +- return m.NameArg +- } +- return nil +-} +- +-func (m *GqlQuery) GetNumberArg() []*GqlQueryArg { +- if m != nil { +- return m.NumberArg +- } +- return nil +-} +- +-// A binding argument for a GQL query. +-// Exactly one of fields value and cursor must be set. +-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:"-"` +-} +- +-func (m *GqlQueryArg) Reset() { *m = GqlQueryArg{} } +-func (m *GqlQueryArg) String() string { return proto.CompactTextString(m) } +-func (*GqlQueryArg) ProtoMessage() {} +- +-func (m *GqlQueryArg) GetName() string { +- if m != nil && m.Name != nil { +- return *m.Name +- } +- return "" +-} +- +-func (m *GqlQueryArg) GetValue() *Value { +- if m != nil { +- return m.Value +- } +- return nil +-} +- +-func (m *GqlQueryArg) GetCursor() []byte { +- if m != nil { +- return m.Cursor +- } +- return nil +-} +- +-// A batch of results produced by a query. +-type QueryResultBatch struct { +- // The result type for every entity in entityResults. +- EntityResultType *EntityResult_ResultType `protobuf:"varint,1,req,name=entity_result_type,enum=pb.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=pb.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"` +- // The number of results skipped because of Query.offset. +- SkippedResults *int32 `protobuf:"varint,6,opt,name=skipped_results" json:"skipped_results,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *QueryResultBatch) Reset() { *m = QueryResultBatch{} } +-func (m *QueryResultBatch) String() string { return proto.CompactTextString(m) } +-func (*QueryResultBatch) ProtoMessage() {} +- +-func (m *QueryResultBatch) GetEntityResultType() EntityResult_ResultType { +- if m != nil && m.EntityResultType != nil { +- return *m.EntityResultType +- } +- return EntityResult_FULL +-} +- +-func (m *QueryResultBatch) GetEntityResult() []*EntityResult { +- if m != nil { +- return m.EntityResult +- } +- return nil +-} +- +-func (m *QueryResultBatch) GetEndCursor() []byte { +- if m != nil { +- return m.EndCursor +- } +- return nil +-} +- +-func (m *QueryResultBatch) GetMoreResults() QueryResultBatch_MoreResultsType { +- if m != nil && m.MoreResults != nil { +- return *m.MoreResults +- } +- return QueryResultBatch_NOT_FINISHED +-} +- +-func (m *QueryResultBatch) GetSkippedResults() int32 { +- if m != nil && m.SkippedResults != nil { +- return *m.SkippedResults +- } +- return 0 +-} +- +-// 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 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:"-"` +-} +- +-func (m *Mutation) Reset() { *m = Mutation{} } +-func (m *Mutation) String() string { return proto.CompactTextString(m) } +-func (*Mutation) ProtoMessage() {} +- +-func (m *Mutation) GetUpsert() []*Entity { +- if m != nil { +- return m.Upsert +- } +- return nil +-} +- +-func (m *Mutation) GetUpdate() []*Entity { +- if m != nil { +- return m.Update +- } +- return nil +-} +- +-func (m *Mutation) GetInsert() []*Entity { +- if m != nil { +- return m.Insert +- } +- return nil +-} +- +-func (m *Mutation) GetInsertAutoId() []*Entity { +- if m != nil { +- return m.InsertAutoId +- } +- return nil +-} +- +-func (m *Mutation) GetDelete() []*Key { +- if m != nil { +- return m.Delete +- } +- return nil +-} +- +-func (m *Mutation) GetForce() bool { +- if m != nil && m.Force != nil { +- return *m.Force +- } +- return false +-} +- +-// The result of applying a mutation. +-type MutationResult struct { +- // Number of index writes. +- IndexUpdates *int32 `protobuf:"varint,1,req,name=index_updates" json:"index_updates,omitempty"` +- // Keys for insertAutoId 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:"-"` +-} +- +-func (m *MutationResult) Reset() { *m = MutationResult{} } +-func (m *MutationResult) String() string { return proto.CompactTextString(m) } +-func (*MutationResult) ProtoMessage() {} +- +-func (m *MutationResult) GetIndexUpdates() int32 { +- if m != nil && m.IndexUpdates != nil { +- return *m.IndexUpdates +- } +- return 0 +-} +- +-func (m *MutationResult) GetInsertAutoIdKey() []*Key { +- if m != nil { +- return m.InsertAutoIdKey +- } +- return nil +-} +- +-// Options shared by read requests. +-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 `protobuf:"varint,1,opt,name=read_consistency,enum=pb.ReadOptions_ReadConsistency,def=0" json:"read_consistency,omitempty"` +- // The transaction to use. Optional. +- Transaction []byte `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *ReadOptions) Reset() { *m = ReadOptions{} } +-func (m *ReadOptions) String() string { return proto.CompactTextString(m) } +-func (*ReadOptions) ProtoMessage() {} +- +-const Default_ReadOptions_ReadConsistency ReadOptions_ReadConsistency = ReadOptions_DEFAULT +- +-func (m *ReadOptions) GetReadConsistency() ReadOptions_ReadConsistency { +- if m != nil && m.ReadConsistency != nil { +- return *m.ReadConsistency +- } +- return Default_ReadOptions_ReadConsistency +-} +- +-func (m *ReadOptions) GetTransaction() []byte { +- if m != nil { +- return m.Transaction +- } +- return nil +-} +- +-// The request for Lookup. +-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:"-"` +-} +- +-func (m *LookupRequest) Reset() { *m = LookupRequest{} } +-func (m *LookupRequest) String() string { return proto.CompactTextString(m) } +-func (*LookupRequest) ProtoMessage() {} +- +-func (m *LookupRequest) GetReadOptions() *ReadOptions { +- if m != nil { +- return m.ReadOptions +- } +- return nil +-} +- +-func (m *LookupRequest) GetKey() []*Key { +- if m != nil { +- return m.Key +- } +- return nil +-} +- +-// The response for Lookup. +-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:"-"` +-} +- +-func (m *LookupResponse) Reset() { *m = LookupResponse{} } +-func (m *LookupResponse) String() string { return proto.CompactTextString(m) } +-func (*LookupResponse) ProtoMessage() {} +- +-func (m *LookupResponse) GetFound() []*EntityResult { +- if m != nil { +- return m.Found +- } +- return nil +-} +- +-func (m *LookupResponse) GetMissing() []*EntityResult { +- if m != nil { +- return m.Missing +- } +- return nil +-} +- +-func (m *LookupResponse) GetDeferred() []*Key { +- if m != nil { +- return m.Deferred +- } +- return nil +-} +- +-// The request for RunQuery. +-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:"-"` +-} +- +-func (m *RunQueryRequest) Reset() { *m = RunQueryRequest{} } +-func (m *RunQueryRequest) String() string { return proto.CompactTextString(m) } +-func (*RunQueryRequest) ProtoMessage() {} +- +-func (m *RunQueryRequest) GetReadOptions() *ReadOptions { +- if m != nil { +- return m.ReadOptions +- } +- return nil +-} +- +-func (m *RunQueryRequest) GetPartitionId() *PartitionId { +- if m != nil { +- return m.PartitionId +- } +- return nil +-} +- +-func (m *RunQueryRequest) GetQuery() *Query { +- if m != nil { +- return m.Query +- } +- return nil +-} +- +-func (m *RunQueryRequest) GetGqlQuery() *GqlQuery { +- if m != nil { +- return m.GqlQuery +- } +- return nil +-} +- +-// The response for RunQuery. +-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:"-"` +-} +- +-func (m *RunQueryResponse) Reset() { *m = RunQueryResponse{} } +-func (m *RunQueryResponse) String() string { return proto.CompactTextString(m) } +-func (*RunQueryResponse) ProtoMessage() {} +- +-func (m *RunQueryResponse) GetBatch() *QueryResultBatch { +- if m != nil { +- return m.Batch +- } +- return nil +-} +- +-// The request for BeginTransaction. +-type BeginTransactionRequest struct { +- // The transaction isolation level. +- IsolationLevel *BeginTransactionRequest_IsolationLevel `protobuf:"varint,1,opt,name=isolation_level,enum=pb.BeginTransactionRequest_IsolationLevel,def=0" json:"isolation_level,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } +-func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } +-func (*BeginTransactionRequest) ProtoMessage() {} +- +-const Default_BeginTransactionRequest_IsolationLevel BeginTransactionRequest_IsolationLevel = BeginTransactionRequest_SNAPSHOT +- +-func (m *BeginTransactionRequest) GetIsolationLevel() BeginTransactionRequest_IsolationLevel { +- if m != nil && m.IsolationLevel != nil { +- return *m.IsolationLevel +- } +- return Default_BeginTransactionRequest_IsolationLevel +-} +- +-// The response for BeginTransaction. +-type BeginTransactionResponse struct { +- // The transaction identifier (always present). +- Transaction []byte `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *BeginTransactionResponse) Reset() { *m = BeginTransactionResponse{} } +-func (m *BeginTransactionResponse) String() string { return proto.CompactTextString(m) } +-func (*BeginTransactionResponse) ProtoMessage() {} +- +-func (m *BeginTransactionResponse) GetTransaction() []byte { +- if m != nil { +- return m.Transaction +- } +- return nil +-} +- +-// The request for Rollback. +-type RollbackRequest struct { +- // The transaction identifier, returned by a call to +- // beginTransaction. +- Transaction []byte `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *RollbackRequest) Reset() { *m = RollbackRequest{} } +-func (m *RollbackRequest) String() string { return proto.CompactTextString(m) } +-func (*RollbackRequest) ProtoMessage() {} +- +-func (m *RollbackRequest) GetTransaction() []byte { +- if m != nil { +- return m.Transaction +- } +- return nil +-} +- +-// The response for Rollback. +-type RollbackResponse struct { +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *RollbackResponse) Reset() { *m = RollbackResponse{} } +-func (m *RollbackResponse) String() string { return proto.CompactTextString(m) } +-func (*RollbackResponse) ProtoMessage() {} +- +-// The request for Commit. +-type CommitRequest struct { +- // The transaction identifier, returned by a call to +- // beginTransaction. 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=pb.CommitRequest_Mode,def=1" json:"mode,omitempty"` +- XXX_unrecognized []byte `json:"-"` +-} +- +-func (m *CommitRequest) Reset() { *m = CommitRequest{} } +-func (m *CommitRequest) String() string { return proto.CompactTextString(m) } +-func (*CommitRequest) ProtoMessage() {} +- +-const Default_CommitRequest_Mode CommitRequest_Mode = CommitRequest_TRANSACTIONAL +- +-func (m *CommitRequest) GetTransaction() []byte { +- if m != nil { +- return m.Transaction +- } +- return nil +-} +- +-func (m *CommitRequest) GetMutation() *Mutation { +- if m != nil { +- return m.Mutation +- } +- return nil +-} +- +-func (m *CommitRequest) GetMode() CommitRequest_Mode { +- if m != nil && m.Mode != nil { +- return *m.Mode +- } +- return Default_CommitRequest_Mode +-} +- +-// The response for Commit. +-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:"-"` +-} +- +-func (m *CommitResponse) Reset() { *m = CommitResponse{} } +-func (m *CommitResponse) String() string { return proto.CompactTextString(m) } +-func (*CommitResponse) ProtoMessage() {} +- +-func (m *CommitResponse) GetMutationResult() *MutationResult { +- if m != nil { +- return m.MutationResult +- } +- return nil +-} +- +-// The request for AllocateIds. +-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:"-"` +-} +- +-func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } +-func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } +-func (*AllocateIdsRequest) ProtoMessage() {} +- +-func (m *AllocateIdsRequest) GetKey() []*Key { +- if m != nil { +- return m.Key +- } +- return nil +-} +- +-// The response for AllocateIds. +-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:"-"` +-} +- +-func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } +-func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } +-func (*AllocateIdsResponse) ProtoMessage() {} +- +-func (m *AllocateIdsResponse) GetKey() []*Key { +- if m != nil { +- return m.Key +- } +- return nil +-} +- +-func init() { +- proto.RegisterEnum("pb.EntityResult_ResultType", EntityResult_ResultType_name, EntityResult_ResultType_value) +- proto.RegisterEnum("pb.PropertyExpression_AggregationFunction", PropertyExpression_AggregationFunction_name, PropertyExpression_AggregationFunction_value) +- proto.RegisterEnum("pb.PropertyOrder_Direction", PropertyOrder_Direction_name, PropertyOrder_Direction_value) +- proto.RegisterEnum("pb.CompositeFilter_Operator", CompositeFilter_Operator_name, CompositeFilter_Operator_value) +- proto.RegisterEnum("pb.PropertyFilter_Operator", PropertyFilter_Operator_name, PropertyFilter_Operator_value) +- proto.RegisterEnum("pb.QueryResultBatch_MoreResultsType", QueryResultBatch_MoreResultsType_name, QueryResultBatch_MoreResultsType_value) +- proto.RegisterEnum("pb.ReadOptions_ReadConsistency", ReadOptions_ReadConsistency_name, ReadOptions_ReadConsistency_value) +- proto.RegisterEnum("pb.BeginTransactionRequest_IsolationLevel", BeginTransactionRequest_IsolationLevel_name, BeginTransactionRequest_IsolationLevel_value) +- proto.RegisterEnum("pb.CommitRequest_Mode", CommitRequest_Mode_name, CommitRequest_Mode_value) +-} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.proto b/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.proto +deleted file mode 100644 +index bb4c199..0000000 +--- a/Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.proto ++++ /dev/null +@@ -1,594 +0,0 @@ +-// Copyright 2013 Google Inc. All Rights Reserved. +-// +-// The datastore v1 service proto definitions +- +-syntax = "proto2"; +- +-package pb; +-option java_package = "com.google.api.services.datastore"; +- +- +-// 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} +-message PartitionId { +- // The dataset ID. +- optional string dataset_id = 3; +- // The namespace. +- optional string namespace = 4; +-} +- +-// 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. +-message Key { +- // 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. +- optional PartitionId partition_id = 1; +- +- // 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. +- message PathElement { +- // The kind of the entity. +- // A kind matching regex "__.*__" is reserved/read-only. +- // A kind must not contain more than 500 characters. +- // Cannot be "". +- required string kind = 1; +- // The ID of the entity. +- // Never equal to zero. Values less than zero are discouraged and will not +- // be supported in the future. +- optional int64 id = 2; +- // The name of the entity. +- // A name matching regex "__.*__" is reserved/read-only. +- // A name must not be more than 500 characters. +- // Cannot be "". +- optional string name = 3; +- } +- +- // 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 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. A path can never +- // be empty. +- repeated PathElement path_element = 2; +-} +- +-// A message that can hold any of the supported value types and associated +-// metadata. +-// +-// At most one of the Value fields may be set. +-// If none are set the value is "null". +-// +-message Value { +- // A boolean value. +- optional bool boolean_value = 1; +- // An integer value. +- optional int64 integer_value = 2; +- // A double value. +- optional double double_value = 3; +- // A timestamp value. +- optional int64 timestamp_microseconds_value = 4; +- // A key value. +- optional Key key_value = 5; +- // A blob key value. +- optional string blob_key_value = 16; +- // A UTF-8 encoded string value. +- optional string string_value = 17; +- // A blob value. +- optional bytes blob_value = 18; +- // An entity value. +- // May have no key. +- // May have a key with an incomplete key path. +- // May have a reserved/read-only key. +- optional Entity entity_value = 6; +- // A list value. +- // Cannot contain another list value. +- // Cannot also have a meaning and indexing set. +- repeated Value list_value = 7; +- +- // The meaning field is reserved and should not be used. +- optional int32 meaning = 14; +- +- // If the value should be indexed. +- // +- // The indexed property may be set for a +- // null value. +- // When indexed is true, stringValue +- // 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 indexed set to +- // true; however, you can explicitly set indexed to +- // true if you want. (An output value never has +- // indexed explicitly set to true.) If a value is +- // itself an entity, it cannot have indexed set to +- // true. +- // Exception: An entity value with meaning 9, 20 or 21 may be indexed. +- optional bool indexed = 15 [default = true]; +-} +- +-// An entity property. +-message Property { +- // 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 "". +- required string name = 1; +- +- // The value(s) of the property. +- // Each value can have only one value property populated. For example, +- // you cannot have a values list of { value: { integerValue: 22, +- // stringValue: "a" } }, but you can have { value: { listValue: +- // [ { integerValue: 22 }, { stringValue: "a" } ] }. +- required Value value = 4; +-} +- +-// An entity. +-// +-// 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. +-message Entity { +- // The entity's key. +- // +- // An entity must have a key, unless otherwise documented (for example, +- // an entity in Value.entityValue 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. +- optional Key key = 1; +- // The entity's properties. +- // Each property's name must be unique for its entity. +- repeated Property property = 2; +-} +- +-// The result of fetching an entity from the datastore. +-message EntityResult { +- // 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'). +- enum ResultType { +- FULL = 1; // The entire entity. +- PROJECTION = 2; // A projected subset of properties. +- // The entity may have no key. +- // A property value may have meaning 18. +- KEY_ONLY = 3; // Only the key. +- } +- +- // The resulting entity. +- required Entity entity = 1; +-} +- +-// A query. +-message Query { +- // The projection to return. If not set the entire entity is returned. +- repeated PropertyExpression projection = 2; +- +- // The kinds to query (if empty, returns entities from all kinds). +- repeated KindExpression kind = 3; +- +- // The filter to apply (optional). +- optional Filter filter = 4; +- +- // The order to apply to the query results (if empty, order is unspecified). +- repeated PropertyOrder order = 5; +- +- // The properties to group by (if empty, no grouping is applied to the +- // result set). +- repeated PropertyReference group_by = 6; +- +- // A starting point for the query results. Optional. Query cursors are +- // returned in query result batches. +- optional bytes /* serialized QueryCursor */ start_cursor = 7; +- +- // An ending point for the query results. Optional. Query cursors are +- // returned in query result batches. +- optional bytes /* serialized QueryCursor */ end_cursor = 8; +- +- // The number of results to skip. Applies before limit, but after all other +- // constraints (optional, defaults to 0). +- optional int32 offset = 10 [default=0]; +- +- // The maximum number of results to return. Applies after all other +- // constraints. Optional. +- optional int32 limit = 11; +-} +- +-// A representation of a kind. +-message KindExpression { +- // The name of the kind. +- required string name = 1; +-} +- +-// A reference to a property relative to the kind expressions. +-// exactly. +-message PropertyReference { +- // The name of the property. +- required string name = 2; +-} +- +-// A representation of a property in a projection. +-message PropertyExpression { +- enum AggregationFunction { +- FIRST = 1; +- } +- // The property to project. +- required PropertyReference property = 1; +- // 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. +- optional AggregationFunction aggregation_function = 2; +-} +- +-// The desired order for a specific property. +-message PropertyOrder { +- enum Direction { +- ASCENDING = 1; +- DESCENDING = 2; +- } +- // The property to order by. +- required PropertyReference property = 1; +- // The direction to order by. +- optional Direction direction = 2 [default=ASCENDING]; +-} +- +-// A holder for any type of filter. Exactly one field should be specified. +-message Filter { +- // A composite filter. +- optional CompositeFilter composite_filter = 1; +- // A filter on a property. +- optional PropertyFilter property_filter = 2; +-} +- +-// A filter that merges the multiple other filters using the given operation. +-message CompositeFilter { +- enum Operator { +- AND = 1; +- } +- +- // The operator for combining multiple filters. +- required Operator operator = 1; +- // The list of filters to combine. +- // Must contain at least one filter. +- repeated Filter filter = 2; +-} +- +-// A filter on a specific property. +-message PropertyFilter { +- enum Operator { +- LESS_THAN = 1; +- LESS_THAN_OR_EQUAL = 2; +- GREATER_THAN = 3; +- GREATER_THAN_OR_EQUAL = 4; +- EQUAL = 5; +- +- HAS_ANCESTOR = 11; +- } +- +- // The property to filter by. +- required PropertyReference property = 1; +- // The operator to filter by. +- required Operator operator = 2; +- // The value to compare the property to. +- required Value value = 3; +-} +- +-// A GQL query. +-message GqlQuery { +- required string query_string = 1; +- // When false, the query string must not contain a literal. +- optional bool allow_literal = 2 [default = false]; +- // 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. +- repeated GqlQueryArg name_arg = 3; +- // 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. +- repeated GqlQueryArg number_arg = 4; +-} +- +-// A binding argument for a GQL query. +-// Exactly one of fields value and cursor must be set. +-message GqlQueryArg { +- // Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". +- // Must not match regex "__.*__". +- // Must not be "". +- optional string name = 1; +- optional Value value = 2; +- optional bytes cursor = 3; +-} +- +-// A batch of results produced by a query. +-message QueryResultBatch { +- // The possible values for the 'more_results' field. +- enum MoreResultsType { +- NOT_FINISHED = 1; // There are additional batches to fetch from this query. +- MORE_RESULTS_AFTER_LIMIT = 2; // The query is finished, but there are more +- // results after the limit. +- NO_MORE_RESULTS = 3; // The query has been exhausted. +- } +- +- // The result type for every entity in entityResults. +- required EntityResult.ResultType entity_result_type = 1; +- // The results for this batch. +- repeated EntityResult entity_result = 2; +- +- // A cursor that points to the position after the last result in the batch. +- // May be absent. +- optional bytes /* serialized QueryCursor */ end_cursor = 4; +- +- // The state of the query after the current batch. +- required MoreResultsType more_results = 5; +- +- // The number of results skipped because of Query.offset. +- optional int32 skipped_results = 6; +-} +- +-// 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. +-message Mutation { +- // Entities to upsert. +- // Each upserted entity's key must have a complete path and +- // must not be reserved/read-only. +- repeated Entity upsert = 1; +- // Entities to update. +- // Each updated entity's key must have a complete path and +- // must not be reserved/read-only. +- repeated Entity update = 2; +- // Entities to insert. +- // Each inserted entity's key must have a complete path and +- // must not be reserved/read-only. +- repeated Entity insert = 3; +- // 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. +- repeated Entity insert_auto_id = 4; +- // Keys of entities to delete. +- // Each key must have a complete key path and must not be reserved/read-only. +- repeated Key delete = 5; +- // Ignore a user specified read-only period. Optional. +- optional bool force = 6; +-} +- +-// The result of applying a mutation. +-message MutationResult { +- // Number of index writes. +- required int32 index_updates = 1; +- // Keys for insertAutoId entities. One per entity from the +- // request, in the same order. +- repeated Key insert_auto_id_key = 2; +-} +- +-// Options shared by read requests. +-message ReadOptions { +- enum ReadConsistency { +- DEFAULT = 0; +- STRONG = 1; +- EVENTUAL = 2; +- } +- +- // 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. +- optional ReadConsistency read_consistency = 1 [default=DEFAULT]; +- +- // The transaction to use. Optional. +- optional bytes /* serialized Transaction */ transaction = 2; +-} +- +-// The request for Lookup. +-message LookupRequest { +- +- // Options for this lookup request. Optional. +- optional ReadOptions read_options = 1; +- // Keys of entities to look up from the datastore. +- repeated Key key = 3; +-} +- +-// The response for Lookup. +-message LookupResponse { +- +- // The order of results in these fields is undefined and has no relation to +- // the order of the keys in the input. +- +- // Entities found as ResultType.FULL entities. +- repeated EntityResult found = 1; +- +- // Entities not found as ResultType.KEY_ONLY entities. +- repeated EntityResult missing = 2; +- +- // A list of keys that were not looked up due to resource constraints. +- repeated Key deferred = 3; +-} +- +- +-// The request for RunQuery. +-message RunQueryRequest { +- +- // The options for this query. +- optional ReadOptions read_options = 1; +- +- // 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. +- optional PartitionId partition_id = 2; +- +- // The query to run. +- // Either this field or field gql_query must be set, but not both. +- optional Query query = 3; +- // The GQL query to run. +- // Either this field or field query must be set, but not both. +- optional GqlQuery gql_query = 7; +-} +- +-// The response for RunQuery. +-message RunQueryResponse { +- +- // A batch of query results (always present). +- optional QueryResultBatch batch = 1; +- +-} +- +-// The request for BeginTransaction. +-message BeginTransactionRequest { +- +- enum IsolationLevel { +- SNAPSHOT = 0; // Read from a consistent snapshot. Concurrent transactions +- // 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). +- SERIALIZABLE = 1; // Read from a consistent snapshot. Concurrent +- // transactions conflict if they cannot be serialized. +- // For example Read(A),Write(B) does conflict with +- // Read(B),Write(A) but Read(A) may not conflict with +- // Write(A). +- } +- +- // The transaction isolation level. +- optional IsolationLevel isolation_level = 1 [default=SNAPSHOT]; +-} +- +-// The response for BeginTransaction. +-message BeginTransactionResponse { +- +- // The transaction identifier (always present). +- optional bytes /* serialized Transaction */ transaction = 1; +-} +- +-// The request for Rollback. +-message RollbackRequest { +- +- // The transaction identifier, returned by a call to +- // beginTransaction. +- required bytes /* serialized Transaction */ transaction = 1; +-} +- +-// The response for Rollback. +-message RollbackResponse { +-// Empty +-} +- +-// The request for Commit. +-message CommitRequest { +- +- enum Mode { +- TRANSACTIONAL = 1; +- NON_TRANSACTIONAL = 2; +- } +- +- // The transaction identifier, returned by a call to +- // beginTransaction. Must be set when mode is TRANSACTIONAL. +- optional bytes /* serialized Transaction */ transaction = 1; +- // The mutation to perform. Optional. +- optional Mutation mutation = 2; +- // The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. +- optional Mode mode = 5 [default=TRANSACTIONAL]; +-} +- +-// The response for Commit. +-message CommitResponse { +- +- // The result of performing the mutation (if any). +- optional MutationResult mutation_result = 1; +-} +- +-// The request for AllocateIds. +-message AllocateIdsRequest { +- +- // A list of keys with incomplete key paths to allocate IDs for. +- // No key may be reserved/read-only. +- repeated Key key = 1; +-} +- +-// The response for AllocateIds. +-message AllocateIdsResponse { +- +- // The keys specified in the request (in the same order), each with +- // its key path completed with a newly allocated ID. +- repeated Key key = 1; +-} +- +-// Each rpc normalizes the partition IDs of the keys in its input entities, +-// and always returns entities with keys with normalized partition IDs. +-// (Note that applies to all entities, including entities in values.) +-service DatastoreService { +- // Look up some entities by key. +- rpc Lookup(LookupRequest) returns (LookupResponse) { +- }; +- // Query for entities. +- rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) { +- }; +- // Begin a new transaction. +- rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { +- }; +- // Commit a transaction, optionally creating, deleting or modifying some +- // entities. +- rpc Commit(CommitRequest) returns (CommitResponse) { +- }; +- // Roll back a transaction. +- rpc Rollback(RollbackRequest) returns (RollbackResponse) { +- }; +- // Allocate IDs for incomplete keys (useful for referencing an entity before +- // it is inserted). +- rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) { +- }; +-} +diff --git a/Godeps/_workspace/src/google.golang.org/cloud/internal/testutil/context.go b/Godeps/_workspace/src/google.golang.org/cloud/internal/testutil/context.go +deleted file mode 100644 +index aafd683..0000000 +--- a/Godeps/_workspace/src/google.golang.org/cloud/internal/testutil/context.go ++++ /dev/null +@@ -1,57 +0,0 @@ +-// Copyright 2014 Google Inc. All Rights Reserved. +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-// Package testutil contains helper functions for writing tests. +-package testutil +- +-import ( +- "io/ioutil" +- "log" +- "net/http" +- "os" +- +- "golang.org/x/net/context" +- "golang.org/x/oauth2" +- "golang.org/x/oauth2/google" +- "google.golang.org/cloud" +-) +- +-const ( +- envProjID = "GCLOUD_TESTS_GOLANG_PROJECT_ID" +- envPrivateKey = "GCLOUD_TESTS_GOLANG_KEY" +-) +- +-func Context(scopes ...string) context.Context { +- key, projID := os.Getenv(envPrivateKey), os.Getenv(envProjID) +- if key == "" || projID == "" { +- log.Fatal("GCLOUD_TESTS_GOLANG_KEY and GCLOUD_TESTS_GOLANG_PROJECT_ID must be set. See CONTRIBUTING.md for details.") +- } +- jsonKey, err := ioutil.ReadFile(key) +- if err != nil { +- log.Fatalf("Cannot read the JSON key file, err: %v", err) +- } +- conf, err := google.JWTConfigFromJSON(jsonKey, scopes...) +- if err != nil { +- log.Fatal(err) +- } +- return cloud.NewContext(projID, conf.Client(oauth2.NoContext)) +-} +- +-func NoAuthContext() context.Context { +- projID := os.Getenv(envProjID) +- if projID == "" { +- log.Fatal("GCLOUD_TESTS_GOLANG_PROJECT_ID must be set. See CONTRIBUTING.md for details.") +- } +- return cloud.NewContext(projID, &http.Client{Transport: http.DefaultTransport}) +-} +-- +1.9.3 + diff --git a/SOURCES/genmanpages.sh b/SOURCES/genmanpages.sh index 0dd1c24..a4b20c9 100644 --- a/SOURCES/genmanpages.sh +++ b/SOURCES/genmanpages.sh @@ -1,5 +1,13 @@ MDSFORMANPAGES="kube-apiserver.md kube-controller-manager.md kube-proxy.md kube-scheduler.md kubelet.md" +# remove comments from man pages +for manpage in ${MDSFORMANPAGES}; do + pos=$(grep -n "<\!-- END MUNGE: UNVERSIONED_WARNING -->" ${manpage} | cut -d':' -f1) + if [ -n ${pos} ]; then + sed -i "1,${pos}{/.*/d}" ${manpage} + fi +done + # for each man page add NAME and SYNOPSIS section # kube-apiserver sed -i -s "s/## kube-apiserver/# NAME\nkube-apiserver \- Provides the API for kubernetes orchestration.\n\n# SYNOPSIS\n**kube-apiserver** [OPTIONS]\n/" kube-apiserver.md diff --git a/SPECS/kubernetes.spec b/SPECS/kubernetes.spec index 2911cda..5adc9c8 100644 --- a/SPECS/kubernetes.spec +++ b/SPECS/kubernetes.spec @@ -14,29 +14,36 @@ %global project GoogleCloudPlatform %global repo kubernetes # https://github.com/GoogleCloudPlatform/kubernetes -%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} -%global commit b2dafdaef5aceafad503ab56254b60f80da9e980 +%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} +%global import_path k8s.io/kubernetes +%global commit b9a88a7d0e357be2174011dd2b127038c6ea8929 %global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global con_commit bb44ddd48d365784343c488a6f3cae97620a780d +%global con_shortcommit %(c=%{con_commit}; echo ${c:0:7}) +%global con_repo contrib + #I really need this, otherwise "version_ldflags=$(kube::version_ldflags)" # does not work %global _buildshell /bin/bash %global _checkshell /bin/bash Name: kubernetes -Version: 1.0.0 -Release: 0.8.git%{shortcommit}%{?dist} +Version: 1.0.3 +Release: 0.1.git%{shortcommit}%{?dist} Summary: Container cluster management License: ASL 2.0 URL: %{import_path} ExclusiveArch: x86_64 -Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -Source1: genmanpages.sh - -Patch0: Change-etcd-server-port.patch +Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +Source1: https://%{provider}.%{provider_tld}/%{project}/%{con_repo}/archive/%{con_commit}/%{con_repo}-%{con_shortcommit}.tar.gz +Source2: genmanpages.sh +Patch1: Fix-Persistent-Volumes-and-Persistent-Volume-Claims.patch +Patch2: Change-etcd-server-port.patch %if 0%{?with_debug} -Patch1: build-with-debug-info.patch +Patch3: build-with-debug-info.patch %endif +Patch4: change-internal-to-inteernal.patch # It obsoletes cadvisor but needs its source code (literally integrated) Obsoletes: cadvisor @@ -69,6 +76,8 @@ Provides: golang(%{import_path}/contrib/mesos/pkg/executor/config) = %{version}- Provides: golang(%{import_path}/contrib/mesos/pkg/executor/messages) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/executor/service) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/hyperkube) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/mesos/pkg/minion) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/mesos/pkg/minion/config) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/offers) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/offers/metrics) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/proc) = %{version}-%{release} @@ -83,9 +92,12 @@ Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/ha) = %{version}-%{r Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/meta) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/metrics) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/podtask) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/resource) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/service) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/scheduler/uid) = %{version}-%{release} Provides: golang(%{import_path}/contrib/mesos/pkg/service) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/submit-queue/github) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/submit-queue/jenkins) = %{version}-%{release} Provides: golang(%{import_path}/pkg/admission) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/endpoints) = %{version}-%{release} @@ -100,7 +112,6 @@ Provides: golang(%{import_path}/pkg/api/rest/resttest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/testapi) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/testing) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/v1) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/api/v1beta3) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/validation) = %{version}-%{release} Provides: golang(%{import_path}/pkg/apiserver) = %{version}-%{release} Provides: golang(%{import_path}/pkg/apiserver/metrics) = %{version}-%{release} @@ -112,6 +123,7 @@ Provides: golang(%{import_path}/pkg/auth/handlers) = %{version}-%{release} Provides: golang(%{import_path}/pkg/auth/user) = %{version}-%{release} Provides: golang(%{import_path}/pkg/capabilities) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/client/auth) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/cache) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/chaosclient) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/clientcmd) = %{version}-%{release} @@ -123,19 +135,35 @@ Provides: golang(%{import_path}/pkg/client/portforward) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/record) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/remotecommand) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/testclient) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/clientauth) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/mesos) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/nodecontroller) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/openstack) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/rackspace) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/routecontroller) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/servicecontroller) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/aws) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/fake) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/gce) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/mesos) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/openstack) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/ovirt) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/rackspace) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/providers/vagrant) = %{version}-%{release} Provides: golang(%{import_path}/pkg/controller) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/endpoint) = %{version}-%{release} Provides: golang(%{import_path}/pkg/controller/framework) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/namespace) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/node) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/persistentvolume) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/replication) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/resourcequota) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/route) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/service) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/controller/serviceaccount) = %{version}-%{release} Provides: golang(%{import_path}/pkg/conversion) = %{version}-%{release} Provides: golang(%{import_path}/pkg/conversion/queryparams) = %{version}-%{release} Provides: golang(%{import_path}/pkg/credentialprovider) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/credentialprovider/gcp) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/expapi) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/expapi/latest) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/expapi/v1) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/expapi/validation) = %{version}-%{release} Provides: golang(%{import_path}/pkg/fieldpath) = %{version}-%{release} Provides: golang(%{import_path}/pkg/fields) = %{version}-%{release} Provides: golang(%{import_path}/pkg/healthz) = %{version}-%{release} @@ -158,31 +186,37 @@ Provides: golang(%{import_path}/pkg/kubelet/metrics) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/network) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/network/exec) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/prober) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/kubelet/qos) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/rkt) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/types) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/util) = %{version}-%{release} Provides: golang(%{import_path}/pkg/labels) = %{version}-%{release} Provides: golang(%{import_path}/pkg/master) = %{version}-%{release} Provides: golang(%{import_path}/pkg/master/ports) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/namespace) = %{version}-%{release} Provides: golang(%{import_path}/pkg/probe) = %{version}-%{release} Provides: golang(%{import_path}/pkg/probe/exec) = %{version}-%{release} Provides: golang(%{import_path}/pkg/probe/http) = %{version}-%{release} Provides: golang(%{import_path}/pkg/probe/tcp) = %{version}-%{release} Provides: golang(%{import_path}/pkg/proxy) = %{version}-%{release} Provides: golang(%{import_path}/pkg/proxy/config) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/proxy/iptables) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/proxy/userspace) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/componentstatus) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/controller/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/endpoint) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/endpoint/etcd) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/registry/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/event) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/event/etcd) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/experimental/controller/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/generic) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/generic/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/generic/rest) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/horizontalpodautoscaler) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/horizontalpodautoscaler/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/limitrange) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/limitrange/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/minion) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/minion/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/namespace) = %{version}-%{release} @@ -203,6 +237,7 @@ Provides: golang(%{import_path}/pkg/registry/secret/etcd) = %{version}-%{release Provides: golang(%{import_path}/pkg/registry/service) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service/allocator) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service/allocator/etcd) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service/ipallocator) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service/ipallocator/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service/ipallocator/etcd) = %{version}-%{release} @@ -210,18 +245,18 @@ Provides: golang(%{import_path}/pkg/registry/service/portallocator) = %{version} Provides: golang(%{import_path}/pkg/registry/service/portallocator/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/serviceaccount) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/serviceaccount/etcd) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/resourcequota) = %{version}-%{release} Provides: golang(%{import_path}/pkg/runtime) = %{version}-%{release} Provides: golang(%{import_path}/pkg/securitycontext) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/service) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/serviceaccount) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/storage) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/storage/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/tools) = %{version}-%{release} Provides: golang(%{import_path}/pkg/tools/etcdtest) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/tools/metrics) = %{version}-%{release} Provides: golang(%{import_path}/pkg/types) = %{version}-%{release} Provides: golang(%{import_path}/pkg/ui) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/ui/data/dashboard) = %{version}-%{release} Provides: golang(%{import_path}/pkg/ui/data/swagger) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/bandwidth) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/config) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/errors) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/exec) = %{version}-%{release} @@ -230,10 +265,14 @@ Provides: golang(%{import_path}/pkg/util/flushwriter) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/httpstream) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/httpstream/spdy) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/iptables) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/jsonpath) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/mount) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/node) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/oom) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/operationmanager) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/procfs) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/proxy) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/rand) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/slice) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/strategicpatch) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/wait) = %{version}-%{release} @@ -254,7 +293,6 @@ Provides: golang(%{import_path}/pkg/volume/persistent_claim) = %{version}-%{rele Provides: golang(%{import_path}/pkg/volume/rbd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/secret) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/util) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/volumeclaimbinder) = %{version}-%{release} Provides: golang(%{import_path}/pkg/watch) = %{version}-%{release} Provides: golang(%{import_path}/pkg/watch/json) = %{version}-%{release} Provides: golang(%{import_path}/plugin/cmd/kube-scheduler/app) = %{version}-%{release} @@ -274,6 +312,7 @@ Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password) = %{vers Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password/allow) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password/passwordfile) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/basicauth) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/keystone) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/union) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/x509) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/token/tokenfile) = %{version}-%{release} @@ -323,6 +362,7 @@ BuildRequires: rsync BuildRequires: golang-github-cpuguy83-go-md2man Requires(pre): shadow-utils +Requires: kubernetes-client = %{version}-%{release} # if node is installed with node, version and release must be the same Conflicts: kubernetes-node < %{version}-%{release} @@ -346,6 +386,8 @@ BuildRequires: rsync BuildRequires: golang-github-cpuguy83-go-md2man Requires(pre): shadow-utils +Requires: socat +Requires: kubernetes-client = %{version}-%{release} # if master is installed with node, version and release must be the same Conflicts: kubernetes-master < %{version}-%{release} @@ -354,20 +396,41 @@ Conflicts: kubernetes-master > %{version}-%{release} %description node Kubernetes services for node host +%package client +Summary: Kubernetes client tools + +BuildRequires: golang >= 1.2-7 + +%description client +Kubernetes client tools like kubectl + %prep -%autosetup -n %{name}-%{commit} -p1 +#%%setup -q -n %{con_repo}-%{con_commit} -T -b 1 +%setup -q -n %{repo}-%{commit} +# move content of contrib back to kubernetes +#mv ../%{con_repo}-%{con_commit}/init contrib/init + +%patch1 -p1 +%patch2 -p1 +%if 0%{?with_debug} +%patch3 -p1 +%endif +#%patch4 -p1 %build export KUBE_GIT_TREE_STATE="clean" export KUBE_GIT_COMMIT=%{commit} -export KUBE_GIT_VERSION=v1.0.0-290-gb2dafdaef5acea +export KUBE_GIT_VERSION=v1.1.0-alpha.0-1909-g280b66c9012c21 hack/build-go.sh --use_go_build hack/build-go.sh --use_go_build cmd/kube-version-change # convert md to man pushd docs -cp %{SOURCE1} genmanpages.sh +pushd admin +cp kube-apiserver.md kube-controller-manager.md kube-proxy.md kube-scheduler.md kubelet.md .. +popd +cp %{SOURCE2} genmanpages.sh bash genmanpages.sh popd @@ -454,14 +517,10 @@ fi %{_mandir}/man1/kube-apiserver.1* %{_mandir}/man1/kube-controller-manager.1* %{_mandir}/man1/kube-scheduler.1* -%{_mandir}/man1/kubectl.1* -%{_mandir}/man1/kubectl-* %{_bindir}/kube-apiserver %{_bindir}/kube-controller-manager %{_bindir}/kube-scheduler %{_bindir}/kube-version-change -%{_bindir}/kubectl -%{_datadir}/bash-completion/completions/kubectl %{_unitdir}/kube-apiserver.service %{_unitdir}/kube-controller-manager.service %{_unitdir}/kube-scheduler.service @@ -476,13 +535,9 @@ fi %doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md %{_mandir}/man1/kubelet.1* %{_mandir}/man1/kube-proxy.1* -%{_mandir}/man1/kubectl.1* -%{_mandir}/man1/kubectl-* %{_bindir}/kubelet %{_bindir}/kube-proxy %{_bindir}/kube-version-change -%{_bindir}/kubectl -%{_datadir}/bash-completion/completions/kubectl %{_unitdir}/kube-proxy.service %{_unitdir}/kubelet.service %dir %{_sharedstatedir}/kubelet @@ -492,13 +547,20 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/proxy %{_tmpfilesdir}/kubernetes.conf +%files client +%doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md +%{_mandir}/man1/kubectl.1* +%{_mandir}/man1/kubectl-* +%{_bindir}/kubectl +%{_datadir}/bash-completion/completions/kubectl + %files unit-test %{_sharedstatedir}/kubernetes-unit-test/ %if 0%{?with_devel} %files devel %doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%dir %{gopath}/src/k8s.io %{gopath}/src/%{import_path} %endif @@ -532,13 +594,106 @@ getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \ %systemd_postun %changelog -* Fri Jul 17 2015 jchaloup - 1.0.0-0.8.gitb2dafda -- Undo 'Set CAP_NET_BIND_SERVICE on the kube-apiserver so it can use 443' +* Tue Aug 25 2015 jchaloup - 1.0.3-0.1.gitb9a88a7 +- The closest version of 1.0 is 1.0.3 + related: #1232005 + +* Tue Aug 25 2015 jchaloup - 1.0-0.1.gitb9a88a7 +- Bump to upstream b9a88a7d0e357be2174011dd2b127038c6ea8929 +- Downgrade to kubernetes-1.0 + related: #1232005 + +* Tue Aug 18 2015 jchaloup - 1.1.0-0.10.git280b66c +- Bump to upstream 280b66c9012c21e253acd4e730f8684c39ca08ec related: #1211266 -* Fri Jul 17 2015 jchaloup - 1.0.0-0.7.gitb2dafda +* Mon Aug 17 2015 jchaloup - 1.1.0-0.9.git081d9c6 +- Bump to upstream 081d9c64d25c20ec16035036536511811118173d + related: #1211266 + +* Fri Aug 14 2015 jchaloup - 1.1.0-0.8.git8dcbeba +- Bump to upstream 8dcbebae5ef6a7191d9dfb65c68833c6852a21ad + related: #1211266 + +* Thu Aug 13 2015 jchaloup - 1.1.0-0.7.git968cbbe +- Bump to upstream 968cbbee5d4964bd916ba379904c469abb53d623 + related: #1211266 + +* Wed Aug 12 2015 jchaloup - 1.1.0-0.6.gitc91950f +- Bump to upstream c91950f01cb14ad47486dfcd2fdfb4be3ee7f36b + related: #1211266 + +* Tue Aug 11 2015 jchaloup - 1.1.0-0.5.gite44c8e6 +- Bump to upstream e44c8e6661c931f7fd434911b0d3bca140e1df3a + related: #1211266 + +* Mon Aug 10 2015 jchaloup - 1.1.0-0.4.git2bfa9a1 +- Bump to upstream 2bfa9a1f98147cfdc2e9f4cf50e2c430518d91eb + related: #1243827 + +* Thu Aug 06 2015 jchaloup - 1.1.0-0.3.git4c42e13 +- Bump to upstream 4c42e1302d3b351f3cb6074d32aa420bbd45e07d +- Change import path prefix to k8s.io/kubernetes + related: #1243827 + +* Wed Aug 05 2015 jchaloup - 1.1.0-0.2.git159ba48 +- Bump to upstream 159ba489329e9f6ce422541e13f97e1166090ec8 + related: #1243827 + +* Sat Aug 01 2015 jchaloup - 1.1.0-0.1.git6129d3d +- Bump to upstream 6129d3d4eb80714286650818081a64ce2699afed + related: #1243827 + +* Fri Jul 31 2015 jchaloup - 1.0.0-0.18.gitff058a1 +- Bump to upstream ff058a1afeb63474f7a35805941f3b07c27aae0f + related: #1243827 + +* Thu Jul 30 2015 jchaloup - 1.0.0-0.17.git769230e +- Bump to upstream 769230e735993bb0bf924279a40593c147c9a6ab + related: #1243827 + +* Wed Jul 29 2015 jchaloup - 1.0.0-0.16.gitdde7222 +- Bump to upstream dde72229dc9cbbdacfb2e44b22d9d5b357027020 + related: #1243827 + +* Tue Jul 28 2015 jchaloup - 1.0.0-0.15.gitc5bffaa +- Bump to upstream c5bffaaf3166513da6259c44a5d1ba8e86bea5ce + related: #1243827 + +* Sat Jul 25 2015 jchaloup - 1.0.0-0.14.git5bd82ff +- Bump to upstream 5bd82ffe6da8f4e72e71b362635e558bfc412106 + related: #1243827 + +* Fri Jul 24 2015 jchaloup - 1.0.0-0.13.git291acd1 +- Bump to upstream 291acd1a09ac836ec7524b060a19a6498d9878dd + related: #1243827 + +* Thu Jul 23 2015 jchaloup - 1.0.0-0.12.gitfbed349 +- Bump to upstream fbed3492bfa09e59b1c423fdd7c1ecad333a06ef + related: #1243827 + +* Tue Jul 21 2015 jchaloup - 1.0.0-0.11.gitfbc85e9 +- Add runtime dependency of kubernetes-node on socat (so kubectl port-forward works on AH) + +* Tue Jul 21 2015 jchaloup - 1.0.0-0.10.gitfbc85e9 +- Update the build script for go1.5 as well +- Bump to upstream fbc85e9838f25547be94fbffeeb92a756d908ca0 + related: #1243827 + +* Mon Jul 20 2015 jchaloup - 1.0.0-0.9.git2d88675 +- Bump to upstream 2d88675f2203d316d4bac312c7ccad12991b56c2 - Change KUBE_ETCD_SERVERS to listen on 2379 ports instead of 4001 resolves: #1243827 +- Add kubernetes-client to provide kubectl command + resolves: #1241469 + +* Mon Jul 20 2015 jchaloup - 1.0.0-0.8.gitb2dafda +- Undo 'Set CAP_NET_BIND_SERVICE on the kube-apiserver so it can use 443' +- Fix dependency and tests for go-1.5 +- with_debug off as the builds ends with error "ELFRESERVE too small: ..." + +* Sat Jul 18 2015 Eric Paris - 1.0.0-0.7.gitb2dafda +- Update apiserver binary gid * Fri Jul 17 2015 jchaloup - 1.0.0-0.6.gitb2dafda - Bump to upstream b2dafdaef5aceafad503ab56254b60f80da9e980