From 5e0969e17235f6a9229f5c1ab7208588c514b421 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Thu, 18 Jul 2024 20:05:22 -0700 Subject: [PATCH] Bind against v19 vitess protos See https://github.com/planetscale/vitess-types/pull/12 --- .buildkite/Dockerfile | 2 +- Makefile | 10 +- go.mod | 8 +- go.sum | 21 ++-- proto-src/buf.lock | 4 +- proto-src/psdb/v1alpha1/database.proto | 22 ++-- proto-src/psdbconnect/v1alpha1/connect.proto | 16 +-- types/psdb/data/v1/data.pb.go | 4 +- types/psdb/v1alpha1/database.pb.go | 110 +++++++++--------- types/psdb/v1alpha1/database_vtproto.pb.go | 30 ++--- .../psdbv1alpha1connect/database.connect.go | 42 +++++-- types/psdbconnect/v1alpha1/connect.pb.go | 74 ++++++------ .../v1alpha1/connect_vtproto.pb.go | 16 +-- .../connect.connect.go | 14 ++- 14 files changed, 199 insertions(+), 174 deletions(-) diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile index e54063b..56aea72 100644 --- a/.buildkite/Dockerfile +++ b/.buildkite/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-bookworm +FROM golang:1.22-bookworm RUN apt-get update && apt-get upgrade -y && \ apt-get install -y ruby && gem install license_finder && \ diff --git a/Makefile b/Makefile index 6df57e4..ff3c89e 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,11 @@ $(BIN)/gofumpt: Makefile | $(BIN) $(BIN)/staticcheck: Makefile | $(BIN) $(TOOL_INSTALL) honnef.co/go/tools/cmd/staticcheck@v0.4.6 -$(BIN)/enumcheck: Makefile | $(BIN) - $(TOOL_INSTALL) loov.dev/enumcheck@v0.0.0-20220314183541-8aa7b787306e - $(BIN)/govulncheck: Makefile | $(BIN) $(TOOL_INSTALL) golang.org/x/vuln/cmd/govulncheck@v1.0.1 $(BIN)/buf: Makefile | $(BIN) - $(TOOL_INSTALL) github.com/bufbuild/buf/cmd/buf@v1.28.1 + $(TOOL_INSTALL) github.com/bufbuild/buf/cmd/buf@v1.48.0 $(BIN)/yq: Makefile | $(BIN) $(TOOL_INSTALL) github.com/mikefarah/yq/v4@v4.30.8 @@ -61,7 +58,6 @@ tools: \ $(PROTO_TOOLS) \ $(BIN)/gofumpt \ $(BIN)/staticcheck \ - $(BIN)/enumcheck \ $(BIN)/govulncheck \ $(BIN)/yq @@ -86,7 +82,7 @@ else fd . -t f -e yaml -e yml -x $(BIN)/yq -iP eval-all . {} \; endif -lint: lint-vet lint-staticcheck lint-enumcheck lint-govulncheck lint-proto +lint: lint-vet lint-staticcheck lint-govulncheck lint-proto lint-vet: go vet ./... @@ -107,7 +103,7 @@ tests: go test -v ./... update-proto: $(BIN)/buf - $< mod update $(PROTO_SRC) + $< dep update $(PROTO_SRC) push-proto: $(BIN)/buf $< push $(PROTO_SRC) diff --git a/go.mod b/go.mod index fe1ef9e..9ea798e 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/planetscale/psdb -go 1.19 +go 1.22 require ( - connectrpc.com/connect v1.11.0 + connectrpc.com/connect v1.14.0 github.com/klauspost/connect-compress/v2 v2.0.0 - github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa + github.com/planetscale/vitess-types v0.0.0-20250102225031-46661e124a3a github.com/segmentio/asm v1.2.0 github.com/stretchr/testify v1.7.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.34.2 ) require ( diff --git a/go.sum b/go.sum index eddef46..7f78343 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,15 @@ -connectrpc.com/connect v1.11.0 h1:Av2KQXxSaX4vjqhf5Cl01SX4dqYADQ38eBtr84JSUBk= -connectrpc.com/connect v1.11.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA= +connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/connect-compress/v2 v2.0.0 h1:L7TVsLa6Oo9Hkkb6r3DwSrhBbcWlXjneqBj7fCRXviU= github.com/klauspost/connect-compress/v2 v2.0.0/go.mod h1:604CD9JSAjGqtVzCM4SRgM/9TFTkWBcp+2wlQfGyJ6c= -github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa h1:juLtMTt8CSth379yqZZh1v8JP9UpI/wQlBpsfo/qhdE= -github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa/go.mod h1:xzNXoqcNPoV2oI52AwXf+213wzzf46KSOAjGXHrju7U= +github.com/planetscale/vitess-types v0.0.0-20250102225031-46661e124a3a h1:z/rnWZk953nW9n+H5jNOijM2Den554yUelzpZ5hZogo= +github.com/planetscale/vitess-types v0.0.0-20250102225031-46661e124a3a/go.mod h1:uZSnwJb6bb4mPXSB1ECkfip6wiw3g8+dHnZgrzjST5E= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= @@ -18,12 +17,14 @@ github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/proto-src/buf.lock b/proto-src/buf.lock index 048e141..cace72a 100644 --- a/proto-src/buf.lock +++ b/proto-src/buf.lock @@ -4,5 +4,5 @@ deps: - remote: buf.build owner: planetscale repository: vitess - commit: 9c148f260a264212bb8f6e1343e87685 - digest: shake256:766938ee30eaf36984dad02134bce5d20957c997f78afa580d2e3126dc4518eeb4b2bd5ade888b82e43df597f9a12ed512b488f89ace96d945586234c6c665bf + commit: 15fcdcc799f44609bf25abea0e9f2c9d + digest: shake256:f1c0948e870cf899781613c3add5eb1bc6c3d069826b6e9b6df51725af52c98bb5f256c7157034ed56d3423d5db197d433db1bc0b45401325ea60a6ef608ed23 diff --git a/proto-src/psdb/v1alpha1/database.proto b/proto-src/psdb/v1alpha1/database.proto index 409a399..c5a399d 100644 --- a/proto-src/psdb/v1alpha1/database.proto +++ b/proto-src/psdb/v1alpha1/database.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package psdb.v1alpha1; import "psdb/data/v1/data.proto"; -import "vitess/query/v16/query.proto"; -import "vitess/vtgate/v16/vtgate.proto"; -import "vitess/vtrpc/v16/vtrpc.proto"; +import "vitess/query/v19/query.proto"; +import "vitess/vtgate/v19/vtgate.proto"; +import "vitess/vtrpc/v19/vtrpc.proto"; option go_package = "github.com/planetscale/psdb/types/psdb/v1alpha1;psdbv1alpha1"; @@ -26,14 +26,14 @@ message ExecuteRequest { Session session = 1; string query = 2; - map bind_variables = 3; + map bind_variables = 3; } message ExecuteResponse { Session session = 1; - vitess.query.v16.QueryResult result = 2; - vitess.vtrpc.v16.RPCError error = 3; + vitess.query.v19.QueryResult result = 2; + vitess.vtrpc.v19.RPCError error = 3; // optional timing, in seconds, for the response, if empty or 0, this wasn't set // does not exist in the response from a StreamExecute. @@ -44,14 +44,14 @@ message PrepareRequest { Session session = 1; string query = 2; - map bind_variables = 3; + map bind_variables = 3; } message PrepareResponse { Session session = 1; - repeated vitess.query.v16.Field fields = 2; - vitess.vtrpc.v16.RPCError error = 3; + repeated vitess.query.v19.Field fields = 2; + vitess.vtrpc.v19.RPCError error = 3; } message CloseSessionRequest { @@ -60,12 +60,12 @@ message CloseSessionRequest { message CloseSessionResponse { Session session = 1; - vitess.vtrpc.v16.RPCError error = 2; + vitess.vtrpc.v19.RPCError error = 2; } message Session { bytes signature = 1; - vitess.vtgate.v16.Session vitess_session = 2; + vitess.vtgate.v19.Session vitess_session = 2; } service Database { diff --git a/proto-src/psdbconnect/v1alpha1/connect.proto b/proto-src/psdbconnect/v1alpha1/connect.proto index 4a72a74..e7f1827 100644 --- a/proto-src/psdbconnect/v1alpha1/connect.proto +++ b/proto-src/psdbconnect/v1alpha1/connect.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package psdbconnect.v1alpha1; -import "vitess/query/v16/query.proto"; -import "vitess/vtrpc/v16/vtrpc.proto"; +import "vitess/query/v19/query.proto"; +import "vitess/vtrpc/v19/vtrpc.proto"; option go_package = "github.com/planetscale/psdb/types/psdbconnect/v1alpha1;psdbconnectv1alpha1"; @@ -46,25 +46,25 @@ message SyncRequest { // DeletedRow denotes a row that is deleted from the table referenced in the SyncRequest message DeletedRow { // This result will contain only the primary keys from the deleted row. - vitess.query.v16.QueryResult result = 1; + vitess.query.v19.QueryResult result = 1; } // Updated denotes a row that is updated in the table referenced in the SyncRequest message UpdatedRow { // All values of the table before the update was made. - vitess.query.v16.QueryResult before = 1; + vitess.query.v19.QueryResult before = 1; // All values of the table ater the update was made. - vitess.query.v16.QueryResult after = 2; + vitess.query.v19.QueryResult after = 2; } // SyncResponse denotes a response to the SyncRequest message SyncResponse { // An array of rows that denote inserts into the table. - repeated vitess.query.v16.QueryResult result = 1; + repeated vitess.query.v19.QueryResult result = 1; // A state object to use that denotes the current state of the SyncResponse. TableCursor cursor = 2; // Any errors encountered in streaming data from the table. - vitess.vtrpc.v16.RPCError error = 3; + vitess.vtrpc.v19.RPCError error = 3; // An array of rows that denote deletes from the table. repeated DeletedRow deletes = 4; // An array of rows that denote updates to the table. @@ -85,7 +85,7 @@ message TableCursor { // the SyncRequest will fail. string position = 3; // Any known last known primary key values from the a previous session. - vitess.query.v16.QueryResult last_known_pk = 4; + vitess.query.v19.QueryResult last_known_pk = 4; } service Connect { diff --git a/types/psdb/data/v1/data.pb.go b/types/psdb/data/v1/data.pb.go index 81f76b3..b26bc9b 100644 --- a/types/psdb/data/v1/data.pb.go +++ b/types/psdb/data/v1/data.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: psdb/data/v1/data.proto @@ -102,7 +102,7 @@ func file_psdb_data_v1_data_proto_rawDescGZIP() []byte { } var file_psdb_data_v1_data_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_psdb_data_v1_data_proto_goTypes = []interface{}{ +var file_psdb_data_v1_data_proto_goTypes = []any{ (Role)(0), // 0: psdb.data.v1.Role } var file_psdb_data_v1_data_proto_depIdxs = []int32{ diff --git a/types/psdb/v1alpha1/database.pb.go b/types/psdb/v1alpha1/database.pb.go index 9ae5a1f..a0a9e89 100644 --- a/types/psdb/v1alpha1/database.pb.go +++ b/types/psdb/v1alpha1/database.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: psdb/v1alpha1/database.proto @@ -8,9 +8,9 @@ package psdbv1alpha1 import ( v1 "github.com/planetscale/psdb/types/psdb/data/v1" - v16 "github.com/planetscale/vitess-types/gen/vitess/query/v16" - v162 "github.com/planetscale/vitess-types/gen/vitess/vtgate/v16" - v161 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v16" + v19 "github.com/planetscale/vitess-types/gen/vitess/query/v19" + v192 "github.com/planetscale/vitess-types/gen/vitess/vtgate/v19" + v191 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v19" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -195,7 +195,7 @@ type ExecuteRequest struct { Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - BindVariables map[string]*v16.BindVariable `protobuf:"bytes,3,rep,name=bind_variables,json=bindVariables,proto3" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BindVariables map[string]*v19.BindVariable `protobuf:"bytes,3,rep,name=bind_variables,json=bindVariables,proto3" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ExecuteRequest) Reset() { @@ -244,7 +244,7 @@ func (x *ExecuteRequest) GetQuery() string { return "" } -func (x *ExecuteRequest) GetBindVariables() map[string]*v16.BindVariable { +func (x *ExecuteRequest) GetBindVariables() map[string]*v19.BindVariable { if x != nil { return x.BindVariables } @@ -257,8 +257,8 @@ type ExecuteResponse struct { unknownFields protoimpl.UnknownFields Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` - Result *v16.QueryResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` - Error *v161.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Result *v19.QueryResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Error *v191.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // optional timing, in seconds, for the response, if empty or 0, this wasn't set // does not exist in the response from a StreamExecute. Timing float64 `protobuf:"fixed64,4,opt,name=timing,proto3" json:"timing,omitempty"` @@ -303,14 +303,14 @@ func (x *ExecuteResponse) GetSession() *Session { return nil } -func (x *ExecuteResponse) GetResult() *v16.QueryResult { +func (x *ExecuteResponse) GetResult() *v19.QueryResult { if x != nil { return x.Result } return nil } -func (x *ExecuteResponse) GetError() *v161.RPCError { +func (x *ExecuteResponse) GetError() *v191.RPCError { if x != nil { return x.Error } @@ -331,7 +331,7 @@ type PrepareRequest struct { Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - BindVariables map[string]*v16.BindVariable `protobuf:"bytes,3,rep,name=bind_variables,json=bindVariables,proto3" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BindVariables map[string]*v19.BindVariable `protobuf:"bytes,3,rep,name=bind_variables,json=bindVariables,proto3" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *PrepareRequest) Reset() { @@ -380,7 +380,7 @@ func (x *PrepareRequest) GetQuery() string { return "" } -func (x *PrepareRequest) GetBindVariables() map[string]*v16.BindVariable { +func (x *PrepareRequest) GetBindVariables() map[string]*v19.BindVariable { if x != nil { return x.BindVariables } @@ -393,8 +393,8 @@ type PrepareResponse struct { unknownFields protoimpl.UnknownFields Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` - Fields []*v16.Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` - Error *v161.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Fields []*v19.Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + Error *v191.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } func (x *PrepareResponse) Reset() { @@ -436,14 +436,14 @@ func (x *PrepareResponse) GetSession() *Session { return nil } -func (x *PrepareResponse) GetFields() []*v16.Field { +func (x *PrepareResponse) GetFields() []*v19.Field { if x != nil { return x.Fields } return nil } -func (x *PrepareResponse) GetError() *v161.RPCError { +func (x *PrepareResponse) GetError() *v191.RPCError { if x != nil { return x.Error } @@ -503,7 +503,7 @@ type CloseSessionResponse struct { unknownFields protoimpl.UnknownFields Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` - Error *v161.RPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Error *v191.RPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } func (x *CloseSessionResponse) Reset() { @@ -545,7 +545,7 @@ func (x *CloseSessionResponse) GetSession() *Session { return nil } -func (x *CloseSessionResponse) GetError() *v161.RPCError { +func (x *CloseSessionResponse) GetError() *v191.RPCError { if x != nil { return x.Error } @@ -558,7 +558,7 @@ type Session struct { unknownFields protoimpl.UnknownFields Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` - VitessSession *v162.Session `protobuf:"bytes,2,opt,name=vitess_session,json=vitessSession,proto3" json:"vitess_session,omitempty"` + VitessSession *v192.Session `protobuf:"bytes,2,opt,name=vitess_session,json=vitessSession,proto3" json:"vitess_session,omitempty"` } func (x *Session) Reset() { @@ -600,7 +600,7 @@ func (x *Session) GetSignature() []byte { return nil } -func (x *Session) GetVitessSession() *v162.Session { +func (x *Session) GetVitessSession() *v192.Session { if x != nil { return x.VitessSession } @@ -615,11 +615,11 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x70, 0x73, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x17, 0x70, 0x73, 0x64, 0x62, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, + 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x39, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x76, 0x74, 0x67, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x76, 0x74, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x39, 0x2f, 0x76, 0x74, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x76, 0x74, 0x72, - 0x70, 0x63, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x70, 0x63, 0x2f, 0x76, 0x31, 0x39, 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x73, 0x69, 0x64, 0x18, 0x02, @@ -652,7 +652,7 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x79, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, @@ -660,10 +660,10 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x73, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x52, 0x50, 0x43, + 0x73, 0x73, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x93, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, @@ -682,7 +682,7 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x36, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x31, 0x39, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa6, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, @@ -690,10 +690,10 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x36, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x76, 0x31, 0x39, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x31, 0x36, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x76, 0x31, 0x39, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x13, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x73, @@ -705,13 +705,13 @@ var file_psdb_v1alpha1_database_proto_rawDesc = []byte{ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x76, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x6a, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x73, 0x2e, 0x76, 0x74, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x53, 0x65, + 0x73, 0x73, 0x2e, 0x76, 0x74, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xaf, 0x03, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, @@ -760,7 +760,7 @@ func file_psdb_v1alpha1_database_proto_rawDescGZIP() []byte { } var file_psdb_v1alpha1_database_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_psdb_v1alpha1_database_proto_goTypes = []interface{}{ +var file_psdb_v1alpha1_database_proto_goTypes = []any{ (*User)(nil), // 0: psdb.v1alpha1.User (*CreateSessionRequest)(nil), // 1: psdb.v1alpha1.CreateSessionRequest (*CreateSessionResponse)(nil), // 2: psdb.v1alpha1.CreateSessionResponse @@ -774,11 +774,11 @@ var file_psdb_v1alpha1_database_proto_goTypes = []interface{}{ nil, // 10: psdb.v1alpha1.ExecuteRequest.BindVariablesEntry nil, // 11: psdb.v1alpha1.PrepareRequest.BindVariablesEntry (v1.Role)(0), // 12: psdb.data.v1.Role - (*v16.QueryResult)(nil), // 13: vitess.query.v16.QueryResult - (*v161.RPCError)(nil), // 14: vitess.vtrpc.v16.RPCError - (*v16.Field)(nil), // 15: vitess.query.v16.Field - (*v162.Session)(nil), // 16: vitess.vtgate.v16.Session - (*v16.BindVariable)(nil), // 17: vitess.query.v16.BindVariable + (*v19.QueryResult)(nil), // 13: vitess.query.v19.QueryResult + (*v191.RPCError)(nil), // 14: vitess.vtrpc.v19.RPCError + (*v19.Field)(nil), // 15: vitess.query.v19.Field + (*v192.Session)(nil), // 16: vitess.vtgate.v19.Session + (*v19.BindVariable)(nil), // 17: vitess.query.v19.BindVariable } var file_psdb_v1alpha1_database_proto_depIdxs = []int32{ 12, // 0: psdb.v1alpha1.User.role:type_name -> psdb.data.v1.Role @@ -787,19 +787,19 @@ var file_psdb_v1alpha1_database_proto_depIdxs = []int32{ 9, // 3: psdb.v1alpha1.ExecuteRequest.session:type_name -> psdb.v1alpha1.Session 10, // 4: psdb.v1alpha1.ExecuteRequest.bind_variables:type_name -> psdb.v1alpha1.ExecuteRequest.BindVariablesEntry 9, // 5: psdb.v1alpha1.ExecuteResponse.session:type_name -> psdb.v1alpha1.Session - 13, // 6: psdb.v1alpha1.ExecuteResponse.result:type_name -> vitess.query.v16.QueryResult - 14, // 7: psdb.v1alpha1.ExecuteResponse.error:type_name -> vitess.vtrpc.v16.RPCError + 13, // 6: psdb.v1alpha1.ExecuteResponse.result:type_name -> vitess.query.v19.QueryResult + 14, // 7: psdb.v1alpha1.ExecuteResponse.error:type_name -> vitess.vtrpc.v19.RPCError 9, // 8: psdb.v1alpha1.PrepareRequest.session:type_name -> psdb.v1alpha1.Session 11, // 9: psdb.v1alpha1.PrepareRequest.bind_variables:type_name -> psdb.v1alpha1.PrepareRequest.BindVariablesEntry 9, // 10: psdb.v1alpha1.PrepareResponse.session:type_name -> psdb.v1alpha1.Session - 15, // 11: psdb.v1alpha1.PrepareResponse.fields:type_name -> vitess.query.v16.Field - 14, // 12: psdb.v1alpha1.PrepareResponse.error:type_name -> vitess.vtrpc.v16.RPCError + 15, // 11: psdb.v1alpha1.PrepareResponse.fields:type_name -> vitess.query.v19.Field + 14, // 12: psdb.v1alpha1.PrepareResponse.error:type_name -> vitess.vtrpc.v19.RPCError 9, // 13: psdb.v1alpha1.CloseSessionRequest.session:type_name -> psdb.v1alpha1.Session 9, // 14: psdb.v1alpha1.CloseSessionResponse.session:type_name -> psdb.v1alpha1.Session - 14, // 15: psdb.v1alpha1.CloseSessionResponse.error:type_name -> vitess.vtrpc.v16.RPCError - 16, // 16: psdb.v1alpha1.Session.vitess_session:type_name -> vitess.vtgate.v16.Session - 17, // 17: psdb.v1alpha1.ExecuteRequest.BindVariablesEntry.value:type_name -> vitess.query.v16.BindVariable - 17, // 18: psdb.v1alpha1.PrepareRequest.BindVariablesEntry.value:type_name -> vitess.query.v16.BindVariable + 14, // 15: psdb.v1alpha1.CloseSessionResponse.error:type_name -> vitess.vtrpc.v19.RPCError + 16, // 16: psdb.v1alpha1.Session.vitess_session:type_name -> vitess.vtgate.v19.Session + 17, // 17: psdb.v1alpha1.ExecuteRequest.BindVariablesEntry.value:type_name -> vitess.query.v19.BindVariable + 17, // 18: psdb.v1alpha1.PrepareRequest.BindVariablesEntry.value:type_name -> vitess.query.v19.BindVariable 1, // 19: psdb.v1alpha1.Database.CreateSession:input_type -> psdb.v1alpha1.CreateSessionRequest 3, // 20: psdb.v1alpha1.Database.Execute:input_type -> psdb.v1alpha1.ExecuteRequest 3, // 21: psdb.v1alpha1.Database.StreamExecute:input_type -> psdb.v1alpha1.ExecuteRequest @@ -823,7 +823,7 @@ func file_psdb_v1alpha1_database_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_psdb_v1alpha1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state @@ -835,7 +835,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreateSessionRequest); i { case 0: return &v.state @@ -847,7 +847,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CreateSessionResponse); i { case 0: return &v.state @@ -859,7 +859,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExecuteRequest); i { case 0: return &v.state @@ -871,7 +871,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ExecuteResponse); i { case 0: return &v.state @@ -883,7 +883,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*PrepareRequest); i { case 0: return &v.state @@ -895,7 +895,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*PrepareResponse); i { case 0: return &v.state @@ -907,7 +907,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*CloseSessionRequest); i { case 0: return &v.state @@ -919,7 +919,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*CloseSessionResponse); i { case 0: return &v.state @@ -931,7 +931,7 @@ func file_psdb_v1alpha1_database_proto_init() { return nil } } - file_psdb_v1alpha1_database_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_psdb_v1alpha1_database_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Session); i { case 0: return &v.state diff --git a/types/psdb/v1alpha1/database_vtproto.pb.go b/types/psdb/v1alpha1/database_vtproto.pb.go index 48ea963..e9c6e70 100644 --- a/types/psdb/v1alpha1/database_vtproto.pb.go +++ b/types/psdb/v1alpha1/database_vtproto.pb.go @@ -8,9 +8,9 @@ import ( binary "encoding/binary" fmt "fmt" v1 "github.com/planetscale/psdb/types/psdb/data/v1" - v16 "github.com/planetscale/vitess-types/gen/vitess/query/v16" - v162 "github.com/planetscale/vitess-types/gen/vitess/vtgate/v16" - v161 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v16" + v19 "github.com/planetscale/vitess-types/gen/vitess/query/v19" + v192 "github.com/planetscale/vitess-types/gen/vitess/vtgate/v19" + v191 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v19" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" @@ -1436,10 +1436,10 @@ func (m *ExecuteRequest) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.BindVariables == nil { - m.BindVariables = make(map[string]*v16.BindVariable) + m.BindVariables = make(map[string]*v19.BindVariable) } var mapkey string - var mapvalue *v16.BindVariable + var mapvalue *v19.BindVariable for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -1513,7 +1513,7 @@ func (m *ExecuteRequest) UnmarshalVT(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &v16.BindVariable{} + mapvalue = &v19.BindVariable{} if unmarshal, ok := interface{}(mapvalue).(interface { UnmarshalVT([]byte) error }); ok { @@ -1660,7 +1660,7 @@ func (m *ExecuteResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Result == nil { - m.Result = &v16.QueryResult{} + m.Result = &v19.QueryResult{} } if unmarshal, ok := interface{}(m.Result).(interface { UnmarshalVT([]byte) error @@ -1704,7 +1704,7 @@ func (m *ExecuteResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &v161.RPCError{} + m.Error = &v191.RPCError{} } if unmarshal, ok := interface{}(m.Error).(interface { UnmarshalVT([]byte) error @@ -1878,10 +1878,10 @@ func (m *PrepareRequest) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.BindVariables == nil { - m.BindVariables = make(map[string]*v16.BindVariable) + m.BindVariables = make(map[string]*v19.BindVariable) } var mapkey string - var mapvalue *v16.BindVariable + var mapvalue *v19.BindVariable for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -1955,7 +1955,7 @@ func (m *PrepareRequest) UnmarshalVT(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &v16.BindVariable{} + mapvalue = &v19.BindVariable{} if unmarshal, ok := interface{}(mapvalue).(interface { UnmarshalVT([]byte) error }); ok { @@ -2101,7 +2101,7 @@ func (m *PrepareResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, &v16.Field{}) + m.Fields = append(m.Fields, &v19.Field{}) if unmarshal, ok := interface{}(m.Fields[len(m.Fields)-1]).(interface { UnmarshalVT([]byte) error }); ok { @@ -2144,7 +2144,7 @@ func (m *PrepareResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &v161.RPCError{} + m.Error = &v191.RPCError{} } if unmarshal, ok := interface{}(m.Error).(interface { UnmarshalVT([]byte) error @@ -2362,7 +2362,7 @@ func (m *CloseSessionResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &v161.RPCError{} + m.Error = &v191.RPCError{} } if unmarshal, ok := interface{}(m.Error).(interface { UnmarshalVT([]byte) error @@ -2491,7 +2491,7 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.VitessSession == nil { - m.VitessSession = &v162.Session{} + m.VitessSession = &v192.Session{} } if unmarshal, ok := interface{}(m.VitessSession).(interface { UnmarshalVT([]byte) error diff --git a/types/psdb/v1alpha1/psdbv1alpha1connect/database.connect.go b/types/psdb/v1alpha1/psdbv1alpha1connect/database.connect.go index d892654..37ef447 100644 --- a/types/psdb/v1alpha1/psdbv1alpha1connect/database.connect.go +++ b/types/psdb/v1alpha1/psdbv1alpha1connect/database.connect.go @@ -18,7 +18,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion1_13_0 const ( // DatabaseName is the fully-qualified name of the Database service. @@ -45,6 +45,16 @@ const ( DatabaseCloseSessionProcedure = "/psdb.v1alpha1.Database/CloseSession" ) +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + databaseServiceDescriptor = v1alpha1.File_psdb_v1alpha1_database_proto.Services().ByName("Database") + databaseCreateSessionMethodDescriptor = databaseServiceDescriptor.Methods().ByName("CreateSession") + databaseExecuteMethodDescriptor = databaseServiceDescriptor.Methods().ByName("Execute") + databaseStreamExecuteMethodDescriptor = databaseServiceDescriptor.Methods().ByName("StreamExecute") + databasePrepareMethodDescriptor = databaseServiceDescriptor.Methods().ByName("Prepare") + databaseCloseSessionMethodDescriptor = databaseServiceDescriptor.Methods().ByName("CloseSession") +) + // DatabaseClient is a client for the psdb.v1alpha1.Database service. type DatabaseClient interface { CreateSession(context.Context, *connect.Request[v1alpha1.CreateSessionRequest]) (*connect.Response[v1alpha1.CreateSessionResponse], error) @@ -67,27 +77,32 @@ func NewDatabaseClient(httpClient connect.HTTPClient, baseURL string, opts ...co createSession: connect.NewClient[v1alpha1.CreateSessionRequest, v1alpha1.CreateSessionResponse]( httpClient, baseURL+DatabaseCreateSessionProcedure, - opts..., + connect.WithSchema(databaseCreateSessionMethodDescriptor), + connect.WithClientOptions(opts...), ), execute: connect.NewClient[v1alpha1.ExecuteRequest, v1alpha1.ExecuteResponse]( httpClient, baseURL+DatabaseExecuteProcedure, - opts..., + connect.WithSchema(databaseExecuteMethodDescriptor), + connect.WithClientOptions(opts...), ), streamExecute: connect.NewClient[v1alpha1.ExecuteRequest, v1alpha1.ExecuteResponse]( httpClient, baseURL+DatabaseStreamExecuteProcedure, - opts..., + connect.WithSchema(databaseStreamExecuteMethodDescriptor), + connect.WithClientOptions(opts...), ), prepare: connect.NewClient[v1alpha1.PrepareRequest, v1alpha1.PrepareResponse]( httpClient, baseURL+DatabasePrepareProcedure, - opts..., + connect.WithSchema(databasePrepareMethodDescriptor), + connect.WithClientOptions(opts...), ), closeSession: connect.NewClient[v1alpha1.CloseSessionRequest, v1alpha1.CloseSessionResponse]( httpClient, baseURL+DatabaseCloseSessionProcedure, - opts..., + connect.WithSchema(databaseCloseSessionMethodDescriptor), + connect.WithClientOptions(opts...), ), } } @@ -144,27 +159,32 @@ func NewDatabaseHandler(svc DatabaseHandler, opts ...connect.HandlerOption) (str databaseCreateSessionHandler := connect.NewUnaryHandler( DatabaseCreateSessionProcedure, svc.CreateSession, - opts..., + connect.WithSchema(databaseCreateSessionMethodDescriptor), + connect.WithHandlerOptions(opts...), ) databaseExecuteHandler := connect.NewUnaryHandler( DatabaseExecuteProcedure, svc.Execute, - opts..., + connect.WithSchema(databaseExecuteMethodDescriptor), + connect.WithHandlerOptions(opts...), ) databaseStreamExecuteHandler := connect.NewServerStreamHandler( DatabaseStreamExecuteProcedure, svc.StreamExecute, - opts..., + connect.WithSchema(databaseStreamExecuteMethodDescriptor), + connect.WithHandlerOptions(opts...), ) databasePrepareHandler := connect.NewUnaryHandler( DatabasePrepareProcedure, svc.Prepare, - opts..., + connect.WithSchema(databasePrepareMethodDescriptor), + connect.WithHandlerOptions(opts...), ) databaseCloseSessionHandler := connect.NewUnaryHandler( DatabaseCloseSessionProcedure, svc.CloseSession, - opts..., + connect.WithSchema(databaseCloseSessionMethodDescriptor), + connect.WithHandlerOptions(opts...), ) return "/psdb.v1alpha1.Database/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { diff --git a/types/psdbconnect/v1alpha1/connect.pb.go b/types/psdbconnect/v1alpha1/connect.pb.go index eaa3d7d..bb05ea9 100644 --- a/types/psdbconnect/v1alpha1/connect.pb.go +++ b/types/psdbconnect/v1alpha1/connect.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: psdbconnect/v1alpha1/connect.proto package psdbconnectv1alpha1 import ( - v16 "github.com/planetscale/vitess-types/gen/vitess/query/v16" - v161 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v16" + v19 "github.com/planetscale/vitess-types/gen/vitess/query/v19" + v191 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v19" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -199,7 +199,7 @@ type DeletedRow struct { unknownFields protoimpl.UnknownFields // This result will contain only the primary keys from the deleted row. - Result *v16.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + Result *v19.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *DeletedRow) Reset() { @@ -234,7 +234,7 @@ func (*DeletedRow) Descriptor() ([]byte, []int) { return file_psdbconnect_v1alpha1_connect_proto_rawDescGZIP(), []int{1} } -func (x *DeletedRow) GetResult() *v16.QueryResult { +func (x *DeletedRow) GetResult() *v19.QueryResult { if x != nil { return x.Result } @@ -248,9 +248,9 @@ type UpdatedRow struct { unknownFields protoimpl.UnknownFields // All values of the table before the update was made. - Before *v16.QueryResult `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` + Before *v19.QueryResult `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` // All values of the table ater the update was made. - After *v16.QueryResult `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"` + After *v19.QueryResult `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"` } func (x *UpdatedRow) Reset() { @@ -285,14 +285,14 @@ func (*UpdatedRow) Descriptor() ([]byte, []int) { return file_psdbconnect_v1alpha1_connect_proto_rawDescGZIP(), []int{2} } -func (x *UpdatedRow) GetBefore() *v16.QueryResult { +func (x *UpdatedRow) GetBefore() *v19.QueryResult { if x != nil { return x.Before } return nil } -func (x *UpdatedRow) GetAfter() *v16.QueryResult { +func (x *UpdatedRow) GetAfter() *v19.QueryResult { if x != nil { return x.After } @@ -306,11 +306,11 @@ type SyncResponse struct { unknownFields protoimpl.UnknownFields // An array of rows that denote inserts into the table. - Result []*v16.QueryResult `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` + Result []*v19.QueryResult `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` // A state object to use that denotes the current state of the SyncResponse. Cursor *TableCursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` // Any errors encountered in streaming data from the table. - Error *v161.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Error *v191.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // An array of rows that denote deletes from the table. Deletes []*DeletedRow `protobuf:"bytes,4,rep,name=deletes,proto3" json:"deletes,omitempty"` // An array of rows that denote updates to the table. @@ -349,7 +349,7 @@ func (*SyncResponse) Descriptor() ([]byte, []int) { return file_psdbconnect_v1alpha1_connect_proto_rawDescGZIP(), []int{3} } -func (x *SyncResponse) GetResult() []*v16.QueryResult { +func (x *SyncResponse) GetResult() []*v19.QueryResult { if x != nil { return x.Result } @@ -363,7 +363,7 @@ func (x *SyncResponse) GetCursor() *TableCursor { return nil } -func (x *SyncResponse) GetError() *v161.RPCError { +func (x *SyncResponse) GetError() *v191.RPCError { if x != nil { return x.Error } @@ -402,7 +402,7 @@ type TableCursor struct { // the SyncRequest will fail. Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` // Any known last known primary key values from the a previous session. - LastKnownPk *v16.QueryResult `protobuf:"bytes,4,opt,name=last_known_pk,json=lastKnownPk,proto3" json:"last_known_pk,omitempty"` + LastKnownPk *v19.QueryResult `protobuf:"bytes,4,opt,name=last_known_pk,json=lastKnownPk,proto3" json:"last_known_pk,omitempty"` } func (x *TableCursor) Reset() { @@ -458,7 +458,7 @@ func (x *TableCursor) GetPosition() string { return "" } -func (x *TableCursor) GetLastKnownPk() *v16.QueryResult { +func (x *TableCursor) GetLastKnownPk() *v19.QueryResult { if x != nil { return x.LastKnownPk } @@ -472,9 +472,9 @@ var file_psdbconnect_v1alpha1_connect_proto_rawDesc = []byte{ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x70, 0x73, 0x64, 0x62, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x71, 0x75, 0x65, + 0x73, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x39, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x36, 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, + 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x39, 0x2f, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, @@ -499,27 +499,27 @@ var file_psdbconnect_v1alpha1_connect_proto_rawDesc = []byte{ 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x43, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, - 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x36, 0x2e, + 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x78, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x12, 0x35, 0x0a, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x36, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xaa, 0x02, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x36, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, + 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x73, 0x64, 0x62, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x36, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x31, 0x39, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x73, 0x64, 0x62, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, @@ -536,7 +536,7 @@ var file_psdbconnect_v1alpha1_connect_proto_rawDesc = []byte{ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x36, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, + 0x31, 0x39, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x6b, 0x2a, 0x31, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, @@ -569,28 +569,28 @@ func file_psdbconnect_v1alpha1_connect_proto_rawDescGZIP() []byte { var file_psdbconnect_v1alpha1_connect_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_psdbconnect_v1alpha1_connect_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_psdbconnect_v1alpha1_connect_proto_goTypes = []interface{}{ +var file_psdbconnect_v1alpha1_connect_proto_goTypes = []any{ (TabletType)(0), // 0: psdbconnect.v1alpha1.TabletType (*SyncRequest)(nil), // 1: psdbconnect.v1alpha1.SyncRequest (*DeletedRow)(nil), // 2: psdbconnect.v1alpha1.DeletedRow (*UpdatedRow)(nil), // 3: psdbconnect.v1alpha1.UpdatedRow (*SyncResponse)(nil), // 4: psdbconnect.v1alpha1.SyncResponse (*TableCursor)(nil), // 5: psdbconnect.v1alpha1.TableCursor - (*v16.QueryResult)(nil), // 6: vitess.query.v16.QueryResult - (*v161.RPCError)(nil), // 7: vitess.vtrpc.v16.RPCError + (*v19.QueryResult)(nil), // 6: vitess.query.v19.QueryResult + (*v191.RPCError)(nil), // 7: vitess.vtrpc.v19.RPCError } var file_psdbconnect_v1alpha1_connect_proto_depIdxs = []int32{ 5, // 0: psdbconnect.v1alpha1.SyncRequest.cursor:type_name -> psdbconnect.v1alpha1.TableCursor 0, // 1: psdbconnect.v1alpha1.SyncRequest.tablet_type:type_name -> psdbconnect.v1alpha1.TabletType - 6, // 2: psdbconnect.v1alpha1.DeletedRow.result:type_name -> vitess.query.v16.QueryResult - 6, // 3: psdbconnect.v1alpha1.UpdatedRow.before:type_name -> vitess.query.v16.QueryResult - 6, // 4: psdbconnect.v1alpha1.UpdatedRow.after:type_name -> vitess.query.v16.QueryResult - 6, // 5: psdbconnect.v1alpha1.SyncResponse.result:type_name -> vitess.query.v16.QueryResult + 6, // 2: psdbconnect.v1alpha1.DeletedRow.result:type_name -> vitess.query.v19.QueryResult + 6, // 3: psdbconnect.v1alpha1.UpdatedRow.before:type_name -> vitess.query.v19.QueryResult + 6, // 4: psdbconnect.v1alpha1.UpdatedRow.after:type_name -> vitess.query.v19.QueryResult + 6, // 5: psdbconnect.v1alpha1.SyncResponse.result:type_name -> vitess.query.v19.QueryResult 5, // 6: psdbconnect.v1alpha1.SyncResponse.cursor:type_name -> psdbconnect.v1alpha1.TableCursor - 7, // 7: psdbconnect.v1alpha1.SyncResponse.error:type_name -> vitess.vtrpc.v16.RPCError + 7, // 7: psdbconnect.v1alpha1.SyncResponse.error:type_name -> vitess.vtrpc.v19.RPCError 2, // 8: psdbconnect.v1alpha1.SyncResponse.deletes:type_name -> psdbconnect.v1alpha1.DeletedRow 3, // 9: psdbconnect.v1alpha1.SyncResponse.updates:type_name -> psdbconnect.v1alpha1.UpdatedRow - 6, // 10: psdbconnect.v1alpha1.TableCursor.last_known_pk:type_name -> vitess.query.v16.QueryResult + 6, // 10: psdbconnect.v1alpha1.TableCursor.last_known_pk:type_name -> vitess.query.v19.QueryResult 1, // 11: psdbconnect.v1alpha1.Connect.Sync:input_type -> psdbconnect.v1alpha1.SyncRequest 4, // 12: psdbconnect.v1alpha1.Connect.Sync:output_type -> psdbconnect.v1alpha1.SyncResponse 12, // [12:13] is the sub-list for method output_type @@ -606,7 +606,7 @@ func file_psdbconnect_v1alpha1_connect_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_psdbconnect_v1alpha1_connect_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_psdbconnect_v1alpha1_connect_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SyncRequest); i { case 0: return &v.state @@ -618,7 +618,7 @@ func file_psdbconnect_v1alpha1_connect_proto_init() { return nil } } - file_psdbconnect_v1alpha1_connect_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_psdbconnect_v1alpha1_connect_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DeletedRow); i { case 0: return &v.state @@ -630,7 +630,7 @@ func file_psdbconnect_v1alpha1_connect_proto_init() { return nil } } - file_psdbconnect_v1alpha1_connect_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_psdbconnect_v1alpha1_connect_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*UpdatedRow); i { case 0: return &v.state @@ -642,7 +642,7 @@ func file_psdbconnect_v1alpha1_connect_proto_init() { return nil } } - file_psdbconnect_v1alpha1_connect_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_psdbconnect_v1alpha1_connect_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SyncResponse); i { case 0: return &v.state @@ -654,7 +654,7 @@ func file_psdbconnect_v1alpha1_connect_proto_init() { return nil } } - file_psdbconnect_v1alpha1_connect_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_psdbconnect_v1alpha1_connect_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TableCursor); i { case 0: return &v.state diff --git a/types/psdbconnect/v1alpha1/connect_vtproto.pb.go b/types/psdbconnect/v1alpha1/connect_vtproto.pb.go index cb685c6..ed469df 100644 --- a/types/psdbconnect/v1alpha1/connect_vtproto.pb.go +++ b/types/psdbconnect/v1alpha1/connect_vtproto.pb.go @@ -6,8 +6,8 @@ package psdbconnectv1alpha1 import ( fmt "fmt" - v16 "github.com/planetscale/vitess-types/gen/vitess/query/v16" - v161 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v16" + v19 "github.com/planetscale/vitess-types/gen/vitess/query/v19" + v191 "github.com/planetscale/vitess-types/gen/vitess/vtrpc/v19" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" @@ -955,7 +955,7 @@ func (m *DeletedRow) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Result == nil { - m.Result = &v16.QueryResult{} + m.Result = &v19.QueryResult{} } if unmarshal, ok := interface{}(m.Result).(interface { UnmarshalVT([]byte) error @@ -1050,7 +1050,7 @@ func (m *UpdatedRow) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Before == nil { - m.Before = &v16.QueryResult{} + m.Before = &v19.QueryResult{} } if unmarshal, ok := interface{}(m.Before).(interface { UnmarshalVT([]byte) error @@ -1094,7 +1094,7 @@ func (m *UpdatedRow) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.After == nil { - m.After = &v16.QueryResult{} + m.After = &v19.QueryResult{} } if unmarshal, ok := interface{}(m.After).(interface { UnmarshalVT([]byte) error @@ -1188,7 +1188,7 @@ func (m *SyncResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Result = append(m.Result, &v16.QueryResult{}) + m.Result = append(m.Result, &v19.QueryResult{}) if unmarshal, ok := interface{}(m.Result[len(m.Result)-1]).(interface { UnmarshalVT([]byte) error }); ok { @@ -1267,7 +1267,7 @@ func (m *SyncResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &v161.RPCError{} + m.Error = &v191.RPCError{} } if unmarshal, ok := interface{}(m.Error).(interface { UnmarshalVT([]byte) error @@ -1526,7 +1526,7 @@ func (m *TableCursor) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.LastKnownPk == nil { - m.LastKnownPk = &v16.QueryResult{} + m.LastKnownPk = &v19.QueryResult{} } if unmarshal, ok := interface{}(m.LastKnownPk).(interface { UnmarshalVT([]byte) error diff --git a/types/psdbconnect/v1alpha1/psdbconnectv1alpha1connect/connect.connect.go b/types/psdbconnect/v1alpha1/psdbconnectv1alpha1connect/connect.connect.go index e388be4..c9d3e64 100644 --- a/types/psdbconnect/v1alpha1/psdbconnectv1alpha1connect/connect.connect.go +++ b/types/psdbconnect/v1alpha1/psdbconnectv1alpha1connect/connect.connect.go @@ -18,7 +18,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion1_13_0 const ( // ConnectName is the fully-qualified name of the Connect service. @@ -37,6 +37,12 @@ const ( ConnectSyncProcedure = "/psdbconnect.v1alpha1.Connect/Sync" ) +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + connectServiceDescriptor = v1alpha1.File_psdbconnect_v1alpha1_connect_proto.Services().ByName("Connect") + connectSyncMethodDescriptor = connectServiceDescriptor.Methods().ByName("Sync") +) + // ConnectClient is a client for the psdbconnect.v1alpha1.Connect service. type ConnectClient interface { // Sync will continuously stream data from a PlanetScale database given a table, keyspace and shard. @@ -61,7 +67,8 @@ func NewConnectClient(httpClient connect.HTTPClient, baseURL string, opts ...con sync: connect.NewClient[v1alpha1.SyncRequest, v1alpha1.SyncResponse]( httpClient, baseURL+ConnectSyncProcedure, - opts..., + connect.WithSchema(connectSyncMethodDescriptor), + connect.WithClientOptions(opts...), ), } } @@ -96,7 +103,8 @@ func NewConnectHandler(svc ConnectHandler, opts ...connect.HandlerOption) (strin connectSyncHandler := connect.NewServerStreamHandler( ConnectSyncProcedure, svc.Sync, - opts..., + connect.WithSchema(connectSyncMethodDescriptor), + connect.WithHandlerOptions(opts...), ) return "/psdbconnect.v1alpha1.Connect/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path {