diff --git a/.github/workflows/deploy-ecr.yml b/.github/workflows/deploy-ecr.yml index e81184385..d1ea4aed7 100644 --- a/.github/workflows/deploy-ecr.yml +++ b/.github/workflows/deploy-ecr.yml @@ -14,8 +14,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + submodules: true + token: ${{ secrets.KWIL_MACH_SECRET }} + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: '3.x' + repo-token: ${{ secrets.KWIL_MACH_SECRET }} - # Setup Go - name: Setup Go uses: actions/setup-go@v3 with: @@ -26,6 +34,17 @@ jobs: run: | go version go get -u golang.org/x/lint/golint + go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway + go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 + go install google.golang.org/protobuf/cmd/protoc-gen-go + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + + - name: Install Task + uses: arduino/setup-task@v1 + + - name: Compile Protobufs + run: | + task pb:compile:all - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -52,7 +71,6 @@ jobs: id: vers run: echo "val=$(git describe)" >> $GITHUB_OUTPUT - - name: Build(KD), tag, and push docker image to Amazon ECR (used with ECS Fargate) env: DOCKER_BUILDKIT: 1 @@ -65,8 +83,8 @@ jobs: IMAGE_TAG: latest run: | # Build a docker container and push it to ECR - #docker build -f ./docker/kwild.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY1:kd$IMAGE_HASH_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY1:$IMAGE_TAG . - docker build -f ./docker/kwild.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY1:$IMAGE_TAG . + #docker build -f ./build/package/docker/kwild.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY1:kd$IMAGE_HASH_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY1:$IMAGE_TAG . + docker build -f ./build/package/docker/kwild.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY1:$IMAGE_TAG . echo "Pushing images to ECR..." docker push $ECR_REGISTRY/$ECR_REPOSITORY1 --all-tags echo "image=$ECR_REGISTRY/$ECR_REPOSITORY1 --all-tags" >> $GITHUB_OUTPUT @@ -83,7 +101,7 @@ jobs: IMAGE_TAG: latest run: | # Build a docker container and push it to ECR - docker build -f ./docker/kwil-gateway.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY2:$IMAGE_TAG . + docker build -f ./build/package/docker/kwil-gateway.dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY2:$IMAGE_TAG . echo "Pushing images to ECR..." docker push $ECR_REGISTRY/$ECR_REPOSITORY2 --all-tags echo "image=$ECR_REGISTRY/$ECR_REPOSITORY2 --all-tags" >> $GITHUB_OUTPUT diff --git a/.gitignore b/.gitignore index bfd8afb01..ecfda76fe 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ cmd/cmd _ignore .env proto +api/protobuf +api/openapi-spec/v0/api.swagger.json # helm charts deps deployments/helm/hasura/charts/ diff --git a/.gitmodules b/.gitmodules index d57ad8337..9d29f90e6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "proto"] path = proto - url = https://github.com/kwilteam/proto.git + url = https://github.com/kwilteam/proto diff --git a/api/Taskfile.yaml b/api/Taskfile.yaml index bd6f0b27a..49d242263 100644 --- a/api/Taskfile.yaml +++ b/api/Taskfile.yaml @@ -4,9 +4,11 @@ tasks: ## Compile all protobufs compile:all: desc: Compiles all protobufs - preconditions: - - sh: a="libprotoc 3.21.12";b=`protoc --version`;test "$a" = "$b" - msg: "Protobuf compiler version is not 3.21.12, please install the correct version" + # TODO: enforce after github action supprort new versionning scheme + # version above 3.21 is not supported by github actions, + # preconditions: + # - sh: a="libprotoc 3.21.12";b=`protoc --version`;test "$a" = "$b" + # msg: "Protobuf compiler version is not 3.21.12, please install the correct version" cmds: - | protoc -I ./proto \ diff --git a/api/protobuf/accounts/v0/service.pb.go b/api/protobuf/accounts/v0/service.pb.go deleted file mode 100644 index 3047ffea5..000000000 --- a/api/protobuf/accounts/v0/service.pb.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/account/v0/service.proto - -package accountspb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetAccountRequest) Reset() { - *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_account_v0_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountRequest) ProtoMessage() {} - -func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_account_v0_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return file_kwil_account_v0_service_proto_rawDescGZIP(), []int{0} -} - -func (x *GetAccountRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -type GetAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Account *v0.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *GetAccountResponse) Reset() { - *x = GetAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_account_v0_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountResponse) ProtoMessage() {} - -func (x *GetAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_account_v0_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead. -func (*GetAccountResponse) Descriptor() ([]byte, []int) { - return file_kwil_account_v0_service_proto_rawDescGZIP(), []int{1} -} - -func (x *GetAccountResponse) GetAccount() *v0.Account { - if x != nil { - return x.Account - } - return nil -} - -var File_kwil_account_v0_service_proto protoreflect.FileDescriptor - -var file_kwil_account_v0_service_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x7c, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x42, 0x2a, 0x5a, 0x28, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x76, 0x30, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_account_v0_service_proto_rawDescOnce sync.Once - file_kwil_account_v0_service_proto_rawDescData = file_kwil_account_v0_service_proto_rawDesc -) - -func file_kwil_account_v0_service_proto_rawDescGZIP() []byte { - file_kwil_account_v0_service_proto_rawDescOnce.Do(func() { - file_kwil_account_v0_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_account_v0_service_proto_rawDescData) - }) - return file_kwil_account_v0_service_proto_rawDescData -} - -var file_kwil_account_v0_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_account_v0_service_proto_goTypes = []interface{}{ - (*GetAccountRequest)(nil), // 0: accounts.GetAccountRequest - (*GetAccountResponse)(nil), // 1: accounts.GetAccountResponse - (*v0.Account)(nil), // 2: common.Account -} -var file_kwil_account_v0_service_proto_depIdxs = []int32{ - 2, // 0: accounts.GetAccountResponse.account:type_name -> common.Account - 0, // 1: accounts.AccountService.GetAccount:input_type -> accounts.GetAccountRequest - 1, // 2: accounts.AccountService.GetAccount:output_type -> accounts.GetAccountResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_account_v0_service_proto_init() } -func file_kwil_account_v0_service_proto_init() { - if File_kwil_account_v0_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_account_v0_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_account_v0_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_account_v0_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kwil_account_v0_service_proto_goTypes, - DependencyIndexes: file_kwil_account_v0_service_proto_depIdxs, - MessageInfos: file_kwil_account_v0_service_proto_msgTypes, - }.Build() - File_kwil_account_v0_service_proto = out.File - file_kwil_account_v0_service_proto_rawDesc = nil - file_kwil_account_v0_service_proto_goTypes = nil - file_kwil_account_v0_service_proto_depIdxs = nil -} diff --git a/api/protobuf/accounts/v0/service.pb.gw.go b/api/protobuf/accounts/v0/service.pb.gw.go deleted file mode 100644 index 5b1e6f3f3..000000000 --- a/api/protobuf/accounts/v0/service.pb.gw.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: kwil/account/v0/service.proto - -/* -Package accountspb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package accountspb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_AccountService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.GetAccount(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAccountServiceHandlerServer registers the http handlers for service AccountService to "mux". -// UnaryRPC :call AccountServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountServiceHandlerFromEndpoint instead. -func RegisterAccountServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServiceServer) error { - - mux.Handle("GET", pattern_AccountService_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/accounts.AccountService/GetAccount", runtime.WithHTTPPathPattern("/api/v0/{address}/account")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountService_GetAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAccountServiceHandlerFromEndpoint is same as RegisterAccountServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterAccountServiceHandler(ctx, mux, conn) -} - -// RegisterAccountServiceHandler registers the http handlers for service AccountService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAccountServiceHandlerClient(ctx, mux, NewAccountServiceClient(conn)) -} - -// RegisterAccountServiceHandlerClient registers the http handlers for service AccountService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccountServiceClient" to call the correct interceptors. -func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountServiceClient) error { - - mux.Handle("GET", pattern_AccountService_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/accounts.AccountService/GetAccount", runtime.WithHTTPPathPattern("/api/v0/{address}/account")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AccountService_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AccountService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"api", "v0", "address", "account"}, "")) -) - -var ( - forward_AccountService_GetAccount_0 = runtime.ForwardResponseMessage -) diff --git a/api/protobuf/accounts/v0/service_grpc.pb.go b/api/protobuf/accounts/v0/service_grpc.pb.go deleted file mode 100644 index 34ff2bdd5..000000000 --- a/api/protobuf/accounts/v0/service_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 -// source: kwil/account/v0/service.proto - -package accountspb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// AccountServiceClient is the client API for AccountService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AccountServiceClient interface { - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) -} - -type accountServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient { - return &accountServiceClient{cc} -} - -func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) { - out := new(GetAccountResponse) - err := c.cc.Invoke(ctx, "/accounts.AccountService/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountServiceServer is the server API for AccountService service. -// All implementations must embed UnimplementedAccountServiceServer -// for forward compatibility -type AccountServiceServer interface { - GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) - mustEmbedUnimplementedAccountServiceServer() -} - -// UnimplementedAccountServiceServer must be embedded to have forward compatible implementations. -type UnimplementedAccountServiceServer struct { -} - -func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {} - -// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AccountServiceServer will -// result in compilation errors. -type UnsafeAccountServiceServer interface { - mustEmbedUnimplementedAccountServiceServer() -} - -func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) { - s.RegisterService(&AccountService_ServiceDesc, srv) -} - -func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountServiceServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/accounts.AccountService/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AccountService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "accounts.AccountService", - HandlerType: (*AccountServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAccount", - Handler: _AccountService_GetAccount_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "kwil/account/v0/service.proto", -} diff --git a/api/protobuf/common/v0/account.pb.go b/api/protobuf/common/v0/account.pb.go deleted file mode 100644 index bf302357a..000000000 --- a/api/protobuf/common/v0/account.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/common/v0/account.proto - -package commonpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Account struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` - Spent string `protobuf:"bytes,3,opt,name=spent,proto3" json:"spent,omitempty"` - Nonce int64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *Account) Reset() { - *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_account_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Account) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Account) ProtoMessage() {} - -func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_account_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Account.ProtoReflect.Descriptor instead. -func (*Account) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_account_proto_rawDescGZIP(), []int{0} -} - -func (x *Account) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Account) GetBalance() string { - if x != nil { - return x.Balance - } - return "" -} - -func (x *Account) GetSpent() string { - if x != nil { - return x.Spent - } - return "" -} - -func (x *Account) GetNonce() int64 { - if x != nil { - return x.Nonce - } - return 0 -} - -var File_kwil_common_v0_account_proto protoreflect.FileDescriptor - -var file_kwil_common_v0_account_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x69, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x42, 0x26, 0x5a, 0x24, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_kwil_common_v0_account_proto_rawDescOnce sync.Once - file_kwil_common_v0_account_proto_rawDescData = file_kwil_common_v0_account_proto_rawDesc -) - -func file_kwil_common_v0_account_proto_rawDescGZIP() []byte { - file_kwil_common_v0_account_proto_rawDescOnce.Do(func() { - file_kwil_common_v0_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_common_v0_account_proto_rawDescData) - }) - return file_kwil_common_v0_account_proto_rawDescData -} - -var file_kwil_common_v0_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_kwil_common_v0_account_proto_goTypes = []interface{}{ - (*Account)(nil), // 0: common.Account -} -var file_kwil_common_v0_account_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_common_v0_account_proto_init() } -func file_kwil_common_v0_account_proto_init() { - if File_kwil_common_v0_account_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_common_v0_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_common_v0_account_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_common_v0_account_proto_goTypes, - DependencyIndexes: file_kwil_common_v0_account_proto_depIdxs, - MessageInfos: file_kwil_common_v0_account_proto_msgTypes, - }.Build() - File_kwil_common_v0_account_proto = out.File - file_kwil_common_v0_account_proto_rawDesc = nil - file_kwil_common_v0_account_proto_goTypes = nil - file_kwil_common_v0_account_proto_depIdxs = nil -} diff --git a/api/protobuf/common/v0/database.pb.go b/api/protobuf/common/v0/database.pb.go deleted file mode 100644 index 338e004eb..000000000 --- a/api/protobuf/common/v0/database.pb.go +++ /dev/null @@ -1,940 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/common/v0/database.proto - -package commonpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Database struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Tables []*Table `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"` - SqlQueries []*SQLQuery `protobuf:"bytes,4,rep,name=sql_queries,proto3" json:"sql_queries,omitempty"` - Roles []*Role `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` - Indexes []*Index `protobuf:"bytes,6,rep,name=indexes,proto3" json:"indexes,omitempty"` -} - -func (x *Database) Reset() { - *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Database) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Database) ProtoMessage() {} - -func (x *Database) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Database.ProtoReflect.Descriptor instead. -func (*Database) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{0} -} - -func (x *Database) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Database) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Database) GetTables() []*Table { - if x != nil { - return x.Tables - } - return nil -} - -func (x *Database) GetSqlQueries() []*SQLQuery { - if x != nil { - return x.SqlQueries - } - return nil -} - -func (x *Database) GetRoles() []*Role { - if x != nil { - return x.Roles - } - return nil -} - -func (x *Database) GetIndexes() []*Index { - if x != nil { - return x.Indexes - } - return nil -} - -type Table struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Columns []*Column `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` -} - -func (x *Table) Reset() { - *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Table) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Table) ProtoMessage() {} - -func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Table.ProtoReflect.Descriptor instead. -func (*Table) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{1} -} - -func (x *Table) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Table) GetColumns() []*Column { - if x != nil { - return x.Columns - } - return nil -} - -type Column struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type DataType `protobuf:"varint,2,opt,name=type,proto3,enum=common.DataType" json:"type,omitempty"` - Attributes []*Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *Column) Reset() { - *x = Column{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Column) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Column) ProtoMessage() {} - -func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Column.ProtoReflect.Descriptor instead. -func (*Column) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{2} -} - -func (x *Column) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Column) GetType() DataType { - if x != nil { - return x.Type - } - return DataType_INVALID_TYPE -} - -func (x *Column) GetAttributes() []*Attribute { - if x != nil { - return x.Attributes - } - return nil -} - -type Attribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type AttributeType `protobuf:"varint,1,opt,name=type,proto3,enum=common.AttributeType" json:"type,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Attribute) Reset() { - *x = Attribute{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Attribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Attribute) ProtoMessage() {} - -func (x *Attribute) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Attribute.ProtoReflect.Descriptor instead. -func (*Attribute) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{3} -} - -func (x *Attribute) GetType() AttributeType { - if x != nil { - return x.Type - } - return AttributeType_INVALID_ATTRIBUTE -} - -func (x *Attribute) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -type SQLQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type QueryType `protobuf:"varint,2,opt,name=type,proto3,enum=common.QueryType" json:"type,omitempty"` - Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` - Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` - Where []*WhereClause `protobuf:"bytes,5,rep,name=where,proto3" json:"where,omitempty"` -} - -func (x *SQLQuery) Reset() { - *x = SQLQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SQLQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SQLQuery) ProtoMessage() {} - -func (x *SQLQuery) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SQLQuery.ProtoReflect.Descriptor instead. -func (*SQLQuery) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{4} -} - -func (x *SQLQuery) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SQLQuery) GetType() QueryType { - if x != nil { - return x.Type - } - return QueryType_QUERY_INVALID -} - -func (x *SQLQuery) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -func (x *SQLQuery) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *SQLQuery) GetWhere() []*WhereClause { - if x != nil { - return x.Where - } - return nil -} - -type Parameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Column string `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` - Static bool `protobuf:"varint,3,opt,name=static,proto3" json:"static,omitempty"` - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` - Modifier ModifierType `protobuf:"varint,5,opt,name=modifier,proto3,enum=common.ModifierType" json:"modifier,omitempty"` -} - -func (x *Parameter) Reset() { - *x = Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Parameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Parameter) ProtoMessage() {} - -func (x *Parameter) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. -func (*Parameter) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{5} -} - -func (x *Parameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Parameter) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - -func (x *Parameter) GetStatic() bool { - if x != nil { - return x.Static - } - return false -} - -func (x *Parameter) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Parameter) GetModifier() ModifierType { - if x != nil { - return x.Modifier - } - return ModifierType_NO_MODIFIER -} - -type WhereClause struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Column string `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` - Static bool `protobuf:"varint,3,opt,name=static,proto3" json:"static,omitempty"` - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` - Modifier ModifierType `protobuf:"varint,5,opt,name=modifier,proto3,enum=common.ModifierType" json:"modifier,omitempty"` - Operator ComparisonOperator `protobuf:"varint,6,opt,name=operator,proto3,enum=common.ComparisonOperator" json:"operator,omitempty"` -} - -func (x *WhereClause) Reset() { - *x = WhereClause{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WhereClause) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WhereClause) ProtoMessage() {} - -func (x *WhereClause) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WhereClause.ProtoReflect.Descriptor instead. -func (*WhereClause) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{6} -} - -func (x *WhereClause) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WhereClause) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - -func (x *WhereClause) GetStatic() bool { - if x != nil { - return x.Static - } - return false -} - -func (x *WhereClause) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *WhereClause) GetModifier() ModifierType { - if x != nil { - return x.Modifier - } - return ModifierType_NO_MODIFIER -} - -func (x *WhereClause) GetOperator() ComparisonOperator { - if x != nil { - return x.Operator - } - return ComparisonOperator_OPERATOR_INVALID -} - -type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty"` - Permissions []string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (x *Role) Reset() { - *x = Role{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Role) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Role) ProtoMessage() {} - -func (x *Role) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Role.ProtoReflect.Descriptor instead. -func (*Role) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{7} -} - -func (x *Role) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Role) GetDefault() bool { - if x != nil { - return x.Default - } - return false -} - -func (x *Role) GetPermissions() []string { - if x != nil { - return x.Permissions - } - return nil -} - -type Index struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` - Columns []string `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"` - Using IndexType `protobuf:"varint,4,opt,name=using,proto3,enum=common.IndexType" json:"using,omitempty"` -} - -func (x *Index) Reset() { - *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_database_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Index) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Index) ProtoMessage() {} - -func (x *Index) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_database_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Index.ProtoReflect.Descriptor instead. -func (*Index) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_database_proto_rawDescGZIP(), []int{8} -} - -func (x *Index) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Index) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -func (x *Index) GetColumns() []string { - if x != nil { - return x.Columns - } - return nil -} - -func (x *Index) GetUsing() IndexType { - if x != nil { - return x.Using - } - return IndexType_INVALID_INDEX -} - -var File_kwil_common_v0_database_proto protoreflect.FileDescriptor - -var file_kwil_common_v0_database_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x6f, - 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x73, 0x22, 0x45, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x75, 0x0a, 0x06, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x22, 0x4c, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x29, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb9, - 0x01, 0x0a, 0x08, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x29, 0x0a, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, - 0x75, 0x73, 0x65, 0x52, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, - 0x61, 0x75, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x30, - 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x36, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x56, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, - 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x74, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x27, 0x0a, - 0x05, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x05, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x5a, 0x24, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_common_v0_database_proto_rawDescOnce sync.Once - file_kwil_common_v0_database_proto_rawDescData = file_kwil_common_v0_database_proto_rawDesc -) - -func file_kwil_common_v0_database_proto_rawDescGZIP() []byte { - file_kwil_common_v0_database_proto_rawDescOnce.Do(func() { - file_kwil_common_v0_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_common_v0_database_proto_rawDescData) - }) - return file_kwil_common_v0_database_proto_rawDescData -} - -var file_kwil_common_v0_database_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_kwil_common_v0_database_proto_goTypes = []interface{}{ - (*Database)(nil), // 0: common.Database - (*Table)(nil), // 1: common.Table - (*Column)(nil), // 2: common.Column - (*Attribute)(nil), // 3: common.Attribute - (*SQLQuery)(nil), // 4: common.SQLQuery - (*Parameter)(nil), // 5: common.Parameter - (*WhereClause)(nil), // 6: common.WhereClause - (*Role)(nil), // 7: common.Role - (*Index)(nil), // 8: common.Index - (DataType)(0), // 9: common.DataType - (AttributeType)(0), // 10: common.AttributeType - (QueryType)(0), // 11: common.QueryType - (ModifierType)(0), // 12: common.ModifierType - (ComparisonOperator)(0), // 13: common.ComparisonOperator - (IndexType)(0), // 14: common.IndexType -} -var file_kwil_common_v0_database_proto_depIdxs = []int32{ - 1, // 0: common.Database.tables:type_name -> common.Table - 4, // 1: common.Database.sql_queries:type_name -> common.SQLQuery - 7, // 2: common.Database.roles:type_name -> common.Role - 8, // 3: common.Database.indexes:type_name -> common.Index - 2, // 4: common.Table.columns:type_name -> common.Column - 9, // 5: common.Column.type:type_name -> common.DataType - 3, // 6: common.Column.attributes:type_name -> common.Attribute - 10, // 7: common.Attribute.type:type_name -> common.AttributeType - 11, // 8: common.SQLQuery.type:type_name -> common.QueryType - 5, // 9: common.SQLQuery.parameters:type_name -> common.Parameter - 6, // 10: common.SQLQuery.where:type_name -> common.WhereClause - 12, // 11: common.Parameter.modifier:type_name -> common.ModifierType - 12, // 12: common.WhereClause.modifier:type_name -> common.ModifierType - 13, // 13: common.WhereClause.operator:type_name -> common.ComparisonOperator - 14, // 14: common.Index.using:type_name -> common.IndexType - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_kwil_common_v0_database_proto_init() } -func file_kwil_common_v0_database_proto_init() { - if File_kwil_common_v0_database_proto != nil { - return - } - file_kwil_common_v0_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_kwil_common_v0_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Column); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Attribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SQLQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WhereClause); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Role); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_database_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_common_v0_database_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_common_v0_database_proto_goTypes, - DependencyIndexes: file_kwil_common_v0_database_proto_depIdxs, - MessageInfos: file_kwil_common_v0_database_proto_msgTypes, - }.Build() - File_kwil_common_v0_database_proto = out.File - file_kwil_common_v0_database_proto_rawDesc = nil - file_kwil_common_v0_database_proto_goTypes = nil - file_kwil_common_v0_database_proto_depIdxs = nil -} diff --git a/api/protobuf/common/v0/query.pb.go b/api/protobuf/common/v0/query.pb.go deleted file mode 100644 index 29e82017a..000000000 --- a/api/protobuf/common/v0/query.pb.go +++ /dev/null @@ -1,303 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/common/v0/query.proto - -package commonpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type QuerySignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Args []*Arg `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` -} - -func (x *QuerySignature) Reset() { - *x = QuerySignature{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySignature) ProtoMessage() {} - -func (x *QuerySignature) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuerySignature.ProtoReflect.Descriptor instead. -func (*QuerySignature) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QuerySignature) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *QuerySignature) GetArgs() []*Arg { - if x != nil { - return x.Args - } - return nil -} - -type UserInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *UserInput) Reset() { - *x = UserInput{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInput) ProtoMessage() {} - -func (x *UserInput) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserInput.ProtoReflect.Descriptor instead. -func (*UserInput) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_query_proto_rawDescGZIP(), []int{1} -} - -func (x *UserInput) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UserInput) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -type Arg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type DataType `protobuf:"varint,2,opt,name=type,proto3,enum=common.DataType" json:"type,omitempty"` -} - -func (x *Arg) Reset() { - *x = Arg{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Arg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Arg) ProtoMessage() {} - -func (x *Arg) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Arg.ProtoReflect.Descriptor instead. -func (*Arg) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_query_proto_rawDescGZIP(), []int{2} -} - -func (x *Arg) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Arg) GetType() DataType { - if x != nil { - return x.Type - } - return DataType_INVALID_TYPE -} - -var File_kwil_common_v0_query_proto protoreflect.FileDescriptor - -var file_kwil_common_v0_query_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x45, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x72, - 0x67, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x35, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3f, - 0x0a, 0x03, 0x41, 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x26, 0x5a, 0x24, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x3b, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_common_v0_query_proto_rawDescOnce sync.Once - file_kwil_common_v0_query_proto_rawDescData = file_kwil_common_v0_query_proto_rawDesc -) - -func file_kwil_common_v0_query_proto_rawDescGZIP() []byte { - file_kwil_common_v0_query_proto_rawDescOnce.Do(func() { - file_kwil_common_v0_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_common_v0_query_proto_rawDescData) - }) - return file_kwil_common_v0_query_proto_rawDescData -} - -var file_kwil_common_v0_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_kwil_common_v0_query_proto_goTypes = []interface{}{ - (*QuerySignature)(nil), // 0: common.QuerySignature - (*UserInput)(nil), // 1: common.UserInput - (*Arg)(nil), // 2: common.Arg - (DataType)(0), // 3: common.DataType -} -var file_kwil_common_v0_query_proto_depIdxs = []int32{ - 2, // 0: common.QuerySignature.args:type_name -> common.Arg - 3, // 1: common.Arg.type:type_name -> common.DataType - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_kwil_common_v0_query_proto_init() } -func file_kwil_common_v0_query_proto_init() { - if File_kwil_common_v0_query_proto != nil { - return - } - file_kwil_common_v0_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_kwil_common_v0_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Arg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_common_v0_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_common_v0_query_proto_goTypes, - DependencyIndexes: file_kwil_common_v0_query_proto_depIdxs, - MessageInfos: file_kwil_common_v0_query_proto_msgTypes, - }.Build() - File_kwil_common_v0_query_proto = out.File - file_kwil_common_v0_query_proto_rawDesc = nil - file_kwil_common_v0_query_proto_goTypes = nil - file_kwil_common_v0_query_proto_depIdxs = nil -} diff --git a/api/protobuf/common/v0/tx.pb.go b/api/protobuf/common/v0/tx.pb.go deleted file mode 100644 index 2665b08e3..000000000 --- a/api/protobuf/common/v0/tx.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/common/v0/tx.proto - -package commonpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PayloadType int32 - -const ( - PayloadType_INVALID_PAYLOAD_TYPE PayloadType = 0 - PayloadType_DEPLOY_DATABASE PayloadType = 1 - PayloadType_MODIFY_DATABASE PayloadType = 2 - PayloadType_DELETE_DATABASE PayloadType = 3 - PayloadType_EXECUTE_QUERY PayloadType = 4 - PayloadType_WITHDRAW PayloadType = 5 -) - -// Enum value maps for PayloadType. -var ( - PayloadType_name = map[int32]string{ - 0: "INVALID_PAYLOAD_TYPE", - 1: "DEPLOY_DATABASE", - 2: "MODIFY_DATABASE", - 3: "DELETE_DATABASE", - 4: "EXECUTE_QUERY", - 5: "WITHDRAW", - } - PayloadType_value = map[string]int32{ - "INVALID_PAYLOAD_TYPE": 0, - "DEPLOY_DATABASE": 1, - "MODIFY_DATABASE": 2, - "DELETE_DATABASE": 3, - "EXECUTE_QUERY": 4, - "WITHDRAW": 5, - } -) - -func (x PayloadType) Enum() *PayloadType { - p := new(PayloadType) - *p = x - return p -} - -func (x PayloadType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PayloadType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_tx_proto_enumTypes[0].Descriptor() -} - -func (PayloadType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_tx_proto_enumTypes[0] -} - -func (x PayloadType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PayloadType.Descriptor instead. -func (PayloadType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_tx_proto_rawDescGZIP(), []int{0} -} - -type SignatureType int32 - -const ( - SignatureType_INVALID_SINATURE_TYPE SignatureType = 0 - SignatureType_PK_SECP256K1_UNCOMPRESSED SignatureType = 1 - SignatureType_ACCOUNT_SECP256K1_UNCOMPRESSED SignatureType = 2 - SignatureType_END_SIGNATURE_TYPE SignatureType = 3 -) - -// Enum value maps for SignatureType. -var ( - SignatureType_name = map[int32]string{ - 0: "INVALID_SINATURE_TYPE", - 1: "PK_SECP256K1_UNCOMPRESSED", - 2: "ACCOUNT_SECP256K1_UNCOMPRESSED", - 3: "END_SIGNATURE_TYPE", - } - SignatureType_value = map[string]int32{ - "INVALID_SINATURE_TYPE": 0, - "PK_SECP256K1_UNCOMPRESSED": 1, - "ACCOUNT_SECP256K1_UNCOMPRESSED": 2, - "END_SIGNATURE_TYPE": 3, - } -) - -func (x SignatureType) Enum() *SignatureType { - p := new(SignatureType) - *p = x - return p -} - -func (x SignatureType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SignatureType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_tx_proto_enumTypes[1].Descriptor() -} - -func (SignatureType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_tx_proto_enumTypes[1] -} - -func (x SignatureType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SignatureType.Descriptor instead. -func (SignatureType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_tx_proto_rawDescGZIP(), []int{1} -} - -type Tx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - PayloadType PayloadType `protobuf:"varint,2,opt,name=payload_type,proto3,enum=common.PayloadType" json:"payload_type,omitempty"` - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` - Nonce int64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` - Signature *Signature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` - Fee string `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` - Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` -} - -func (x *Tx) Reset() { - *x = Tx{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tx) ProtoMessage() {} - -func (x *Tx) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tx.ProtoReflect.Descriptor instead. -func (*Tx) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *Tx) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *Tx) GetPayloadType() PayloadType { - if x != nil { - return x.PayloadType - } - return PayloadType_INVALID_PAYLOAD_TYPE -} - -func (x *Tx) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -func (x *Tx) GetNonce() int64 { - if x != nil { - return x.Nonce - } - return 0 -} - -func (x *Tx) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Tx) GetFee() string { - if x != nil { - return x.Fee - } - return "" -} - -func (x *Tx) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -type Signature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignatureBytes []byte `protobuf:"bytes,1,opt,name=signature_bytes,proto3" json:"signature_bytes,omitempty"` - SignatureType SignatureType `protobuf:"varint,2,opt,name=signature_type,proto3,enum=common.SignatureType" json:"signature_type,omitempty"` -} - -func (x *Signature) Reset() { - *x = Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_common_v0_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Signature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Signature) ProtoMessage() {} - -func (x *Signature) ProtoReflect() protoreflect.Message { - mi := &file_kwil_common_v0_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Signature.ProtoReflect.Descriptor instead. -func (*Signature) Descriptor() ([]byte, []int) { - return file_kwil_common_v0_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *Signature) GetSignatureBytes() []byte { - if x != nil { - return x.SignatureBytes - } - return nil -} - -func (x *Signature) GetSignatureType() SignatureType { - if x != nil { - return x.SignatureType - } - return SignatureType_INVALID_SINATURE_TYPE -} - -var File_kwil_common_v0_tx_proto protoreflect.FileDescriptor - -var file_kwil_common_v0_tx_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x22, 0xdc, 0x01, 0x0a, 0x02, 0x54, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x37, 0x0a, 0x0c, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x22, 0x74, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x28, 0x0a, - 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x87, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, - 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, - 0x41, 0x53, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, - 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x12, - 0x11, 0x0a, 0x0d, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x10, 0x05, - 0x2a, 0x85, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x49, - 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x1d, 0x0a, - 0x19, 0x50, 0x4b, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, 0x31, 0x5f, 0x55, 0x4e, - 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, - 0x31, 0x5f, 0x55, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x03, 0x42, 0x26, 0x5a, 0x24, 0x6b, 0x77, 0x69, 0x6c, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_common_v0_tx_proto_rawDescOnce sync.Once - file_kwil_common_v0_tx_proto_rawDescData = file_kwil_common_v0_tx_proto_rawDesc -) - -func file_kwil_common_v0_tx_proto_rawDescGZIP() []byte { - file_kwil_common_v0_tx_proto_rawDescOnce.Do(func() { - file_kwil_common_v0_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_common_v0_tx_proto_rawDescData) - }) - return file_kwil_common_v0_tx_proto_rawDescData -} - -var file_kwil_common_v0_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_kwil_common_v0_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_common_v0_tx_proto_goTypes = []interface{}{ - (PayloadType)(0), // 0: common.PayloadType - (SignatureType)(0), // 1: common.SignatureType - (*Tx)(nil), // 2: common.Tx - (*Signature)(nil), // 3: common.Signature -} -var file_kwil_common_v0_tx_proto_depIdxs = []int32{ - 0, // 0: common.Tx.payload_type:type_name -> common.PayloadType - 3, // 1: common.Tx.signature:type_name -> common.Signature - 1, // 2: common.Signature.signature_type:type_name -> common.SignatureType - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_kwil_common_v0_tx_proto_init() } -func file_kwil_common_v0_tx_proto_init() { - if File_kwil_common_v0_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_common_v0_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_common_v0_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_common_v0_tx_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_common_v0_tx_proto_goTypes, - DependencyIndexes: file_kwil_common_v0_tx_proto_depIdxs, - EnumInfos: file_kwil_common_v0_tx_proto_enumTypes, - MessageInfos: file_kwil_common_v0_tx_proto_msgTypes, - }.Build() - File_kwil_common_v0_tx_proto = out.File - file_kwil_common_v0_tx_proto_rawDesc = nil - file_kwil_common_v0_tx_proto_goTypes = nil - file_kwil_common_v0_tx_proto_depIdxs = nil -} diff --git a/api/protobuf/common/v0/types.pb.go b/api/protobuf/common/v0/types.pb.go deleted file mode 100644 index 8a130b407..000000000 --- a/api/protobuf/common/v0/types.pb.go +++ /dev/null @@ -1,454 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/common/v0/types.proto - -package commonpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type DataType int32 - -const ( - DataType_INVALID_TYPE DataType = 0 - DataType_NULL DataType = 1 - DataType_STRING DataType = 2 - DataType_INT32 DataType = 3 - DataType_INT64 DataType = 4 - DataType_BOOLEAN DataType = 5 -) - -// Enum value maps for DataType. -var ( - DataType_name = map[int32]string{ - 0: "INVALID_TYPE", - 1: "NULL", - 2: "STRING", - 3: "INT32", - 4: "INT64", - 5: "BOOLEAN", - } - DataType_value = map[string]int32{ - "INVALID_TYPE": 0, - "NULL": 1, - "STRING": 2, - "INT32": 3, - "INT64": 4, - "BOOLEAN": 5, - } -) - -func (x DataType) Enum() *DataType { - p := new(DataType) - *p = x - return p -} - -func (x DataType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DataType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[0].Descriptor() -} - -func (DataType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[0] -} - -func (x DataType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DataType.Descriptor instead. -func (DataType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{0} -} - -type AttributeType int32 - -const ( - AttributeType_INVALID_ATTRIBUTE AttributeType = 0 - AttributeType_PRIMARY_KEY AttributeType = 1 - AttributeType_UNIQUE AttributeType = 2 - AttributeType_NOT_NULL AttributeType = 3 - AttributeType_DEFAULT AttributeType = 4 - AttributeType_MIN AttributeType = 5 - AttributeType_MAX AttributeType = 6 - AttributeType_MIN_LENGTH AttributeType = 7 - AttributeType_MAX_LENGTH AttributeType = 8 -) - -// Enum value maps for AttributeType. -var ( - AttributeType_name = map[int32]string{ - 0: "INVALID_ATTRIBUTE", - 1: "PRIMARY_KEY", - 2: "UNIQUE", - 3: "NOT_NULL", - 4: "DEFAULT", - 5: "MIN", - 6: "MAX", - 7: "MIN_LENGTH", - 8: "MAX_LENGTH", - } - AttributeType_value = map[string]int32{ - "INVALID_ATTRIBUTE": 0, - "PRIMARY_KEY": 1, - "UNIQUE": 2, - "NOT_NULL": 3, - "DEFAULT": 4, - "MIN": 5, - "MAX": 6, - "MIN_LENGTH": 7, - "MAX_LENGTH": 8, - } -) - -func (x AttributeType) Enum() *AttributeType { - p := new(AttributeType) - *p = x - return p -} - -func (x AttributeType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AttributeType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[1].Descriptor() -} - -func (AttributeType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[1] -} - -func (x AttributeType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AttributeType.Descriptor instead. -func (AttributeType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{1} -} - -type IndexType int32 - -const ( - IndexType_INVALID_INDEX IndexType = 0 - IndexType_BTREE IndexType = 1 -) - -// Enum value maps for IndexType. -var ( - IndexType_name = map[int32]string{ - 0: "INVALID_INDEX", - 1: "BTREE", - } - IndexType_value = map[string]int32{ - "INVALID_INDEX": 0, - "BTREE": 1, - } -) - -func (x IndexType) Enum() *IndexType { - p := new(IndexType) - *p = x - return p -} - -func (x IndexType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IndexType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[2].Descriptor() -} - -func (IndexType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[2] -} - -func (x IndexType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IndexType.Descriptor instead. -func (IndexType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{2} -} - -type ModifierType int32 - -const ( - ModifierType_NO_MODIFIER ModifierType = 0 - ModifierType_CALLER ModifierType = 1 -) - -// Enum value maps for ModifierType. -var ( - ModifierType_name = map[int32]string{ - 0: "NO_MODIFIER", - 1: "CALLER", - } - ModifierType_value = map[string]int32{ - "NO_MODIFIER": 0, - "CALLER": 1, - } -) - -func (x ModifierType) Enum() *ModifierType { - p := new(ModifierType) - *p = x - return p -} - -func (x ModifierType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ModifierType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[3].Descriptor() -} - -func (ModifierType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[3] -} - -func (x ModifierType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ModifierType.Descriptor instead. -func (ModifierType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{3} -} - -type ComparisonOperator int32 - -const ( - ComparisonOperator_OPERATOR_INVALID ComparisonOperator = 0 - ComparisonOperator_OPERATOR_EQUAL ComparisonOperator = 1 - ComparisonOperator_OPERATOR_NOT_EQUAL ComparisonOperator = 2 - ComparisonOperator_OPERATOR_GREATER_THAN ComparisonOperator = 3 - ComparisonOperator_OPERATOR_GREATER_THAN_OR_EQUAL ComparisonOperator = 4 - ComparisonOperator_OPERATOR_LESS_THAN ComparisonOperator = 5 - ComparisonOperator_OPERATOR_LESS_THAN_OR_EQUAL ComparisonOperator = 6 -) - -// Enum value maps for ComparisonOperator. -var ( - ComparisonOperator_name = map[int32]string{ - 0: "OPERATOR_INVALID", - 1: "OPERATOR_EQUAL", - 2: "OPERATOR_NOT_EQUAL", - 3: "OPERATOR_GREATER_THAN", - 4: "OPERATOR_GREATER_THAN_OR_EQUAL", - 5: "OPERATOR_LESS_THAN", - 6: "OPERATOR_LESS_THAN_OR_EQUAL", - } - ComparisonOperator_value = map[string]int32{ - "OPERATOR_INVALID": 0, - "OPERATOR_EQUAL": 1, - "OPERATOR_NOT_EQUAL": 2, - "OPERATOR_GREATER_THAN": 3, - "OPERATOR_GREATER_THAN_OR_EQUAL": 4, - "OPERATOR_LESS_THAN": 5, - "OPERATOR_LESS_THAN_OR_EQUAL": 6, - } -) - -func (x ComparisonOperator) Enum() *ComparisonOperator { - p := new(ComparisonOperator) - *p = x - return p -} - -func (x ComparisonOperator) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ComparisonOperator) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[4].Descriptor() -} - -func (ComparisonOperator) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[4] -} - -func (x ComparisonOperator) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ComparisonOperator.Descriptor instead. -func (ComparisonOperator) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{4} -} - -type QueryType int32 - -const ( - QueryType_QUERY_INVALID QueryType = 0 - QueryType_QUERY_INSERT QueryType = 1 - QueryType_QUERY_UPDATE QueryType = 2 - QueryType_QUERY_DELETE QueryType = 3 -) - -// Enum value maps for QueryType. -var ( - QueryType_name = map[int32]string{ - 0: "QUERY_INVALID", - 1: "QUERY_INSERT", - 2: "QUERY_UPDATE", - 3: "QUERY_DELETE", - } - QueryType_value = map[string]int32{ - "QUERY_INVALID": 0, - "QUERY_INSERT": 1, - "QUERY_UPDATE": 2, - "QUERY_DELETE": 3, - } -) - -func (x QueryType) Enum() *QueryType { - p := new(QueryType) - *p = x - return p -} - -func (x QueryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (QueryType) Descriptor() protoreflect.EnumDescriptor { - return file_kwil_common_v0_types_proto_enumTypes[5].Descriptor() -} - -func (QueryType) Type() protoreflect.EnumType { - return &file_kwil_common_v0_types_proto_enumTypes[5] -} - -func (x QueryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use QueryType.Descriptor instead. -func (QueryType) EnumDescriptor() ([]byte, []int) { - return file_kwil_common_v0_types_proto_rawDescGZIP(), []int{5} -} - -var File_kwil_common_v0_types_proto protoreflect.FileDescriptor - -var file_kwil_common_v0_types_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2a, 0x55, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, - 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0b, - 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x05, 0x2a, 0x90, 0x01, 0x0a, 0x0d, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, - 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, - 0x54, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, - 0x4b, 0x45, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, - 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x03, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, - 0x4d, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x58, 0x10, 0x06, 0x12, 0x0e, - 0x0a, 0x0a, 0x4d, 0x49, 0x4e, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x07, 0x12, 0x0e, - 0x0a, 0x0a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x08, 0x2a, 0x29, - 0x0a, 0x09, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x42, 0x54, 0x52, 0x45, 0x45, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, - 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, - 0x4c, 0x4c, 0x45, 0x52, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x61, - 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, - 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x45, 0x52, 0x41, - 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x12, - 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x47, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, - 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x16, - 0x0a, 0x12, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x45, 0x53, 0x53, 0x5f, - 0x54, 0x48, 0x41, 0x4e, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, - 0x4f, 0x52, 0x5f, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x06, 0x2a, 0x54, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x51, 0x55, 0x45, 0x52, 0x59, - 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x51, 0x55, 0x45, - 0x52, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x51, - 0x55, 0x45, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x42, 0x26, 0x5a, - 0x24, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x3b, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_common_v0_types_proto_rawDescOnce sync.Once - file_kwil_common_v0_types_proto_rawDescData = file_kwil_common_v0_types_proto_rawDesc -) - -func file_kwil_common_v0_types_proto_rawDescGZIP() []byte { - file_kwil_common_v0_types_proto_rawDescOnce.Do(func() { - file_kwil_common_v0_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_common_v0_types_proto_rawDescData) - }) - return file_kwil_common_v0_types_proto_rawDescData -} - -var file_kwil_common_v0_types_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_kwil_common_v0_types_proto_goTypes = []interface{}{ - (DataType)(0), // 0: common.DataType - (AttributeType)(0), // 1: common.AttributeType - (IndexType)(0), // 2: common.IndexType - (ModifierType)(0), // 3: common.ModifierType - (ComparisonOperator)(0), // 4: common.ComparisonOperator - (QueryType)(0), // 5: common.QueryType -} -var file_kwil_common_v0_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_common_v0_types_proto_init() } -func file_kwil_common_v0_types_proto_init() { - if File_kwil_common_v0_types_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_common_v0_types_proto_rawDesc, - NumEnums: 6, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_common_v0_types_proto_goTypes, - DependencyIndexes: file_kwil_common_v0_types_proto_depIdxs, - EnumInfos: file_kwil_common_v0_types_proto_enumTypes, - }.Build() - File_kwil_common_v0_types_proto = out.File - file_kwil_common_v0_types_proto_rawDesc = nil - file_kwil_common_v0_types_proto_goTypes = nil - file_kwil_common_v0_types_proto_depIdxs = nil -} diff --git a/api/protobuf/config/v0/service.pb.go b/api/protobuf/config/v0/service.pb.go deleted file mode 100644 index 0ebde079b..000000000 --- a/api/protobuf/config/v0/service.pb.go +++ /dev/null @@ -1,494 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/config/v0/service.proto - -package configpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetCfgRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetCfgRequest) Reset() { - *x = GetCfgRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetCfgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCfgRequest) ProtoMessage() {} - -func (x *GetCfgRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCfgRequest.ProtoReflect.Descriptor instead. -func (*GetCfgRequest) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{0} -} - -type GetCfgResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Funding *GetFundingCfgResponse `protobuf:"bytes,1,opt,name=funding,proto3" json:"funding,omitempty"` - Gateway *GetGatewayCfgResponse `protobuf:"bytes,2,opt,name=gateway,proto3" json:"gateway,omitempty"` -} - -func (x *GetCfgResponse) Reset() { - *x = GetCfgResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetCfgResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCfgResponse) ProtoMessage() {} - -func (x *GetCfgResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCfgResponse.ProtoReflect.Descriptor instead. -func (*GetCfgResponse) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{1} -} - -func (x *GetCfgResponse) GetFunding() *GetFundingCfgResponse { - if x != nil { - return x.Funding - } - return nil -} - -func (x *GetCfgResponse) GetGateway() *GetGatewayCfgResponse { - if x != nil { - return x.Gateway - } - return nil -} - -type GetFundingCfgRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetFundingCfgRequest) Reset() { - *x = GetFundingCfgRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFundingCfgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFundingCfgRequest) ProtoMessage() {} - -func (x *GetFundingCfgRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFundingCfgRequest.ProtoReflect.Descriptor instead. -func (*GetFundingCfgRequest) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{2} -} - -type GetFundingCfgResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainCode int64 `protobuf:"varint,1,opt,name=chain_code,proto3" json:"chain_code,omitempty"` - ProviderAddress string `protobuf:"bytes,2,opt,name=provider_address,proto3" json:"provider_address,omitempty"` - PoolAddress string `protobuf:"bytes,3,opt,name=pool_address,proto3" json:"pool_address,omitempty"` -} - -func (x *GetFundingCfgResponse) Reset() { - *x = GetFundingCfgResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFundingCfgResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFundingCfgResponse) ProtoMessage() {} - -func (x *GetFundingCfgResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetFundingCfgResponse.ProtoReflect.Descriptor instead. -func (*GetFundingCfgResponse) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{3} -} - -func (x *GetFundingCfgResponse) GetChainCode() int64 { - if x != nil { - return x.ChainCode - } - return 0 -} - -func (x *GetFundingCfgResponse) GetProviderAddress() string { - if x != nil { - return x.ProviderAddress - } - return "" -} - -func (x *GetFundingCfgResponse) GetPoolAddress() string { - if x != nil { - return x.PoolAddress - } - return "" -} - -type GetGatewayCfgRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetGatewayCfgRequest) Reset() { - *x = GetGatewayCfgRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGatewayCfgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGatewayCfgRequest) ProtoMessage() {} - -func (x *GetGatewayCfgRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGatewayCfgRequest.ProtoReflect.Descriptor instead. -func (*GetGatewayCfgRequest) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{4} -} - -type GetGatewayCfgResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GraphqlUrl string `protobuf:"bytes,1,opt,name=graphql_url,proto3" json:"graphql_url,omitempty"` -} - -func (x *GetGatewayCfgResponse) Reset() { - *x = GetGatewayCfgResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_config_v0_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGatewayCfgResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGatewayCfgResponse) ProtoMessage() {} - -func (x *GetGatewayCfgResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_config_v0_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGatewayCfgResponse.ProtoReflect.Descriptor instead. -func (*GetGatewayCfgResponse) Descriptor() ([]byte, []int) { - return file_kwil_config_v0_service_proto_rawDescGZIP(), []int{5} -} - -func (x *GetGatewayCfgResponse) GetGraphqlUrl() string { - if x != nil { - return x.GraphqlUrl - } - return "" -} - -var File_kwil_config_v0_service_proto protoreflect.FileDescriptor - -var file_kwil_config_v0_service_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x30, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x66, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x66, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x66, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x66, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x37, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x66, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x66, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x87, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x66, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x10, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x16, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x66, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x39, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x43, 0x66, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x32, - 0xb6, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x15, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x66, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x66, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x69, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x43, 0x66, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x43, 0x66, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x69, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x1c, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, - 0x66, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x66, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x26, 0x5a, 0x24, 0x6b, 0x77, 0x69, 0x6c, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x30, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_config_v0_service_proto_rawDescOnce sync.Once - file_kwil_config_v0_service_proto_rawDescData = file_kwil_config_v0_service_proto_rawDesc -) - -func file_kwil_config_v0_service_proto_rawDescGZIP() []byte { - file_kwil_config_v0_service_proto_rawDescOnce.Do(func() { - file_kwil_config_v0_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_config_v0_service_proto_rawDescData) - }) - return file_kwil_config_v0_service_proto_rawDescData -} - -var file_kwil_config_v0_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_kwil_config_v0_service_proto_goTypes = []interface{}{ - (*GetCfgRequest)(nil), // 0: config.GetCfgRequest - (*GetCfgResponse)(nil), // 1: config.GetCfgResponse - (*GetFundingCfgRequest)(nil), // 2: config.GetFundingCfgRequest - (*GetFundingCfgResponse)(nil), // 3: config.GetFundingCfgResponse - (*GetGatewayCfgRequest)(nil), // 4: config.GetGatewayCfgRequest - (*GetGatewayCfgResponse)(nil), // 5: config.GetGatewayCfgResponse -} -var file_kwil_config_v0_service_proto_depIdxs = []int32{ - 3, // 0: config.GetCfgResponse.funding:type_name -> config.GetFundingCfgResponse - 5, // 1: config.GetCfgResponse.gateway:type_name -> config.GetGatewayCfgResponse - 0, // 2: config.ConfigService.GetAll:input_type -> config.GetCfgRequest - 2, // 3: config.ConfigService.GetFunding:input_type -> config.GetFundingCfgRequest - 4, // 4: config.ConfigService.GetGateway:input_type -> config.GetGatewayCfgRequest - 1, // 5: config.ConfigService.GetAll:output_type -> config.GetCfgResponse - 3, // 6: config.ConfigService.GetFunding:output_type -> config.GetFundingCfgResponse - 5, // 7: config.ConfigService.GetGateway:output_type -> config.GetGatewayCfgResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_kwil_config_v0_service_proto_init() } -func file_kwil_config_v0_service_proto_init() { - if File_kwil_config_v0_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_config_v0_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCfgRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_config_v0_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCfgResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_config_v0_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFundingCfgRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_config_v0_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFundingCfgResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_config_v0_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGatewayCfgRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_config_v0_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGatewayCfgResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_config_v0_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kwil_config_v0_service_proto_goTypes, - DependencyIndexes: file_kwil_config_v0_service_proto_depIdxs, - MessageInfos: file_kwil_config_v0_service_proto_msgTypes, - }.Build() - File_kwil_config_v0_service_proto = out.File - file_kwil_config_v0_service_proto_rawDesc = nil - file_kwil_config_v0_service_proto_goTypes = nil - file_kwil_config_v0_service_proto_depIdxs = nil -} diff --git a/api/protobuf/config/v0/service.pb.gw.go b/api/protobuf/config/v0/service.pb.gw.go deleted file mode 100644 index e597347ff..000000000 --- a/api/protobuf/config/v0/service.pb.gw.go +++ /dev/null @@ -1,293 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: kwil/config/v0/service.proto - -/* -Package configpb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package configpb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_ConfigService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCfgRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ConfigService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCfgRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ConfigService_GetFunding_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFundingCfgRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetFunding(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ConfigService_GetFunding_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetFundingCfgRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetFunding(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ConfigService_GetGateway_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGatewayCfgRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetGateway(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ConfigService_GetGateway_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGatewayCfgRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetGateway(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux". -// UnaryRPC :call ConfigServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigServiceHandlerFromEndpoint instead. -func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error { - - mux.Handle("GET", pattern_ConfigService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/config.ConfigService/GetAll", runtime.WithHTTPPathPattern("/api/v0/config")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ConfigService_GetAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ConfigService_GetFunding_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/config.ConfigService/GetFunding", runtime.WithHTTPPathPattern("/api/v0/config/funding")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ConfigService_GetFunding_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetFunding_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ConfigService_GetGateway_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/config.ConfigService/GetGateway", runtime.WithHTTPPathPattern("/api/v0/config/gateway")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ConfigService_GetGateway_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetGateway_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterConfigServiceHandler(ctx, mux, conn) -} - -// RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterConfigServiceHandlerClient(ctx, mux, NewConfigServiceClient(conn)) -} - -// RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ConfigServiceClient" to call the correct interceptors. -func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error { - - mux.Handle("GET", pattern_ConfigService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/config.ConfigService/GetAll", runtime.WithHTTPPathPattern("/api/v0/config")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ConfigService_GetAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ConfigService_GetFunding_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/config.ConfigService/GetFunding", runtime.WithHTTPPathPattern("/api/v0/config/funding")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ConfigService_GetFunding_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetFunding_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ConfigService_GetGateway_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/config.ConfigService/GetGateway", runtime.WithHTTPPathPattern("/api/v0/config/gateway")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ConfigService_GetGateway_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetGateway_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ConfigService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v0", "config"}, "")) - - pattern_ConfigService_GetFunding_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v0", "config", "funding"}, "")) - - pattern_ConfigService_GetGateway_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v0", "config", "gateway"}, "")) -) - -var ( - forward_ConfigService_GetAll_0 = runtime.ForwardResponseMessage - - forward_ConfigService_GetFunding_0 = runtime.ForwardResponseMessage - - forward_ConfigService_GetGateway_0 = runtime.ForwardResponseMessage -) diff --git a/api/protobuf/config/v0/service_grpc.pb.go b/api/protobuf/config/v0/service_grpc.pb.go deleted file mode 100644 index f4e0ab05c..000000000 --- a/api/protobuf/config/v0/service_grpc.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 -// source: kwil/config/v0/service.proto - -package configpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ConfigServiceClient is the client API for ConfigService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ConfigServiceClient interface { - GetAll(ctx context.Context, in *GetCfgRequest, opts ...grpc.CallOption) (*GetCfgResponse, error) - GetFunding(ctx context.Context, in *GetFundingCfgRequest, opts ...grpc.CallOption) (*GetFundingCfgResponse, error) - GetGateway(ctx context.Context, in *GetGatewayCfgRequest, opts ...grpc.CallOption) (*GetGatewayCfgResponse, error) -} - -type configServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient { - return &configServiceClient{cc} -} - -func (c *configServiceClient) GetAll(ctx context.Context, in *GetCfgRequest, opts ...grpc.CallOption) (*GetCfgResponse, error) { - out := new(GetCfgResponse) - err := c.cc.Invoke(ctx, "/config.ConfigService/GetAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceClient) GetFunding(ctx context.Context, in *GetFundingCfgRequest, opts ...grpc.CallOption) (*GetFundingCfgResponse, error) { - out := new(GetFundingCfgResponse) - err := c.cc.Invoke(ctx, "/config.ConfigService/GetFunding", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configServiceClient) GetGateway(ctx context.Context, in *GetGatewayCfgRequest, opts ...grpc.CallOption) (*GetGatewayCfgResponse, error) { - out := new(GetGatewayCfgResponse) - err := c.cc.Invoke(ctx, "/config.ConfigService/GetGateway", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConfigServiceServer is the server API for ConfigService service. -// All implementations must embed UnimplementedConfigServiceServer -// for forward compatibility -type ConfigServiceServer interface { - GetAll(context.Context, *GetCfgRequest) (*GetCfgResponse, error) - GetFunding(context.Context, *GetFundingCfgRequest) (*GetFundingCfgResponse, error) - GetGateway(context.Context, *GetGatewayCfgRequest) (*GetGatewayCfgResponse, error) - mustEmbedUnimplementedConfigServiceServer() -} - -// UnimplementedConfigServiceServer must be embedded to have forward compatible implementations. -type UnimplementedConfigServiceServer struct { -} - -func (UnimplementedConfigServiceServer) GetAll(context.Context, *GetCfgRequest) (*GetCfgResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented") -} -func (UnimplementedConfigServiceServer) GetFunding(context.Context, *GetFundingCfgRequest) (*GetFundingCfgResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFunding not implemented") -} -func (UnimplementedConfigServiceServer) GetGateway(context.Context, *GetGatewayCfgRequest) (*GetGatewayCfgResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGateway not implemented") -} -func (UnimplementedConfigServiceServer) mustEmbedUnimplementedConfigServiceServer() {} - -// UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ConfigServiceServer will -// result in compilation errors. -type UnsafeConfigServiceServer interface { - mustEmbedUnimplementedConfigServiceServer() -} - -func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer) { - s.RegisterService(&ConfigService_ServiceDesc, srv) -} - -func _ConfigService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCfgRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceServer).GetAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/config.ConfigService/GetAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceServer).GetAll(ctx, req.(*GetCfgRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigService_GetFunding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFundingCfgRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceServer).GetFunding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/config.ConfigService/GetFunding", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceServer).GetFunding(ctx, req.(*GetFundingCfgRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ConfigService_GetGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGatewayCfgRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceServer).GetGateway(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/config.ConfigService/GetGateway", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceServer).GetGateway(ctx, req.(*GetGatewayCfgRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ConfigService_ServiceDesc is the grpc.ServiceDesc for ConfigService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ConfigService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "config.ConfigService", - HandlerType: (*ConfigServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAll", - Handler: _ConfigService_GetAll_Handler, - }, - { - MethodName: "GetFunding", - Handler: _ConfigService_GetFunding_Handler, - }, - { - MethodName: "GetGateway", - Handler: _ConfigService_GetGateway_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "kwil/config/v0/service.proto", -} diff --git a/api/protobuf/pricing/v0/pricing.pb.go b/api/protobuf/pricing/v0/pricing.pb.go deleted file mode 100644 index a48cb1b15..000000000 --- a/api/protobuf/pricing/v0/pricing.pb.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/pricing/v0/pricing.proto - -package pricingpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EstimateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tx *v0.Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (x *EstimateRequest) Reset() { - *x = EstimateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_pricing_v0_pricing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EstimateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EstimateRequest) ProtoMessage() {} - -func (x *EstimateRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_pricing_v0_pricing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EstimateRequest.ProtoReflect.Descriptor instead. -func (*EstimateRequest) Descriptor() ([]byte, []int) { - return file_kwil_pricing_v0_pricing_proto_rawDescGZIP(), []int{0} -} - -func (x *EstimateRequest) GetTx() *v0.Tx { - if x != nil { - return x.Tx - } - return nil -} - -type EstimateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cost string `protobuf:"bytes,1,opt,name=cost,proto3" json:"cost,omitempty"` -} - -func (x *EstimateResponse) Reset() { - *x = EstimateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_pricing_v0_pricing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EstimateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EstimateResponse) ProtoMessage() {} - -func (x *EstimateResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_pricing_v0_pricing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EstimateResponse.ProtoReflect.Descriptor instead. -func (*EstimateResponse) Descriptor() ([]byte, []int) { - return file_kwil_pricing_v0_pricing_proto_rawDescGZIP(), []int{1} -} - -func (x *EstimateResponse) GetCost() string { - if x != nil { - return x.Cost - } - return "" -} - -var File_kwil_pricing_v0_pricing_proto protoreflect.FileDescriptor - -var file_kwil_pricing_v0_pricing_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x30, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x1a, 0x17, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2d, 0x0a, 0x0f, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x78, 0x52, 0x02, 0x74, 0x78, - 0x22, 0x26, 0x0a, 0x10, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x42, 0x28, 0x5a, 0x26, 0x6b, 0x77, 0x69, 0x6c, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, - 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x30, 0x3b, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_pricing_v0_pricing_proto_rawDescOnce sync.Once - file_kwil_pricing_v0_pricing_proto_rawDescData = file_kwil_pricing_v0_pricing_proto_rawDesc -) - -func file_kwil_pricing_v0_pricing_proto_rawDescGZIP() []byte { - file_kwil_pricing_v0_pricing_proto_rawDescOnce.Do(func() { - file_kwil_pricing_v0_pricing_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_pricing_v0_pricing_proto_rawDescData) - }) - return file_kwil_pricing_v0_pricing_proto_rawDescData -} - -var file_kwil_pricing_v0_pricing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_pricing_v0_pricing_proto_goTypes = []interface{}{ - (*EstimateRequest)(nil), // 0: pricing.EstimateRequest - (*EstimateResponse)(nil), // 1: pricing.EstimateResponse - (*v0.Tx)(nil), // 2: common.Tx -} -var file_kwil_pricing_v0_pricing_proto_depIdxs = []int32{ - 2, // 0: pricing.EstimateRequest.tx:type_name -> common.Tx - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_pricing_v0_pricing_proto_init() } -func file_kwil_pricing_v0_pricing_proto_init() { - if File_kwil_pricing_v0_pricing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_pricing_v0_pricing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_pricing_v0_pricing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_pricing_v0_pricing_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_pricing_v0_pricing_proto_goTypes, - DependencyIndexes: file_kwil_pricing_v0_pricing_proto_depIdxs, - MessageInfos: file_kwil_pricing_v0_pricing_proto_msgTypes, - }.Build() - File_kwil_pricing_v0_pricing_proto = out.File - file_kwil_pricing_v0_pricing_proto_rawDesc = nil - file_kwil_pricing_v0_pricing_proto_goTypes = nil - file_kwil_pricing_v0_pricing_proto_depIdxs = nil -} diff --git a/api/protobuf/pricing/v0/service.pb.go b/api/protobuf/pricing/v0/service.pb.go deleted file mode 100644 index 8802cb733..000000000 --- a/api/protobuf/pricing/v0/service.pb.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/pricing/v0/service.proto - -package pricingpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_kwil_pricing_v0_service_proto protoreflect.FileDescriptor - -var file_kwil_pricing_v0_service_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x70, 0x72, 0x69, - 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x30, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x7a, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, - 0x67, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x73, 0x74, 0x69, - 0x6d, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x70, 0x72, - 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x3a, 0x01, - 0x2a, 0x42, 0x28, 0x5a, 0x26, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x30, 0x3b, 0x70, 0x72, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var file_kwil_pricing_v0_service_proto_goTypes = []interface{}{ - (*EstimateRequest)(nil), // 0: pricing.EstimateRequest - (*EstimateResponse)(nil), // 1: pricing.EstimateResponse -} -var file_kwil_pricing_v0_service_proto_depIdxs = []int32{ - 0, // 0: pricing.PricingService.EstimateCost:input_type -> pricing.EstimateRequest - 1, // 1: pricing.PricingService.EstimateCost:output_type -> pricing.EstimateResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_pricing_v0_service_proto_init() } -func file_kwil_pricing_v0_service_proto_init() { - if File_kwil_pricing_v0_service_proto != nil { - return - } - file_kwil_pricing_v0_pricing_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_pricing_v0_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kwil_pricing_v0_service_proto_goTypes, - DependencyIndexes: file_kwil_pricing_v0_service_proto_depIdxs, - }.Build() - File_kwil_pricing_v0_service_proto = out.File - file_kwil_pricing_v0_service_proto_rawDesc = nil - file_kwil_pricing_v0_service_proto_goTypes = nil - file_kwil_pricing_v0_service_proto_depIdxs = nil -} diff --git a/api/protobuf/pricing/v0/service.pb.gw.go b/api/protobuf/pricing/v0/service.pb.gw.go deleted file mode 100644 index fbd5ab6a8..000000000 --- a/api/protobuf/pricing/v0/service.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: kwil/pricing/v0/service.proto - -/* -Package pricingpb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pricingpb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_PricingService_EstimateCost_0(ctx context.Context, marshaler runtime.Marshaler, client PricingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EstimateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EstimateCost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PricingService_EstimateCost_0(ctx context.Context, marshaler runtime.Marshaler, server PricingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EstimateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EstimateCost(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterPricingServiceHandlerServer registers the http handlers for service PricingService to "mux". -// UnaryRPC :call PricingServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPricingServiceHandlerFromEndpoint instead. -func RegisterPricingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PricingServiceServer) error { - - mux.Handle("POST", pattern_PricingService_EstimateCost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pricing.PricingService/EstimateCost", runtime.WithHTTPPathPattern("/api/v0/pricing/estimate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PricingService_EstimateCost_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PricingService_EstimateCost_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterPricingServiceHandlerFromEndpoint is same as RegisterPricingServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPricingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterPricingServiceHandler(ctx, mux, conn) -} - -// RegisterPricingServiceHandler registers the http handlers for service PricingService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterPricingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPricingServiceHandlerClient(ctx, mux, NewPricingServiceClient(conn)) -} - -// RegisterPricingServiceHandlerClient registers the http handlers for service PricingService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PricingServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PricingServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PricingServiceClient" to call the correct interceptors. -func RegisterPricingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PricingServiceClient) error { - - mux.Handle("POST", pattern_PricingService_EstimateCost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pricing.PricingService/EstimateCost", runtime.WithHTTPPathPattern("/api/v0/pricing/estimate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PricingService_EstimateCost_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PricingService_EstimateCost_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_PricingService_EstimateCost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v0", "pricing", "estimate"}, "")) -) - -var ( - forward_PricingService_EstimateCost_0 = runtime.ForwardResponseMessage -) diff --git a/api/protobuf/pricing/v0/service_grpc.pb.go b/api/protobuf/pricing/v0/service_grpc.pb.go deleted file mode 100644 index 79e026885..000000000 --- a/api/protobuf/pricing/v0/service_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 -// source: kwil/pricing/v0/service.proto - -package pricingpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// PricingServiceClient is the client API for PricingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type PricingServiceClient interface { - EstimateCost(ctx context.Context, in *EstimateRequest, opts ...grpc.CallOption) (*EstimateResponse, error) -} - -type pricingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPricingServiceClient(cc grpc.ClientConnInterface) PricingServiceClient { - return &pricingServiceClient{cc} -} - -func (c *pricingServiceClient) EstimateCost(ctx context.Context, in *EstimateRequest, opts ...grpc.CallOption) (*EstimateResponse, error) { - out := new(EstimateResponse) - err := c.cc.Invoke(ctx, "/pricing.PricingService/EstimateCost", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PricingServiceServer is the server API for PricingService service. -// All implementations must embed UnimplementedPricingServiceServer -// for forward compatibility -type PricingServiceServer interface { - EstimateCost(context.Context, *EstimateRequest) (*EstimateResponse, error) - mustEmbedUnimplementedPricingServiceServer() -} - -// UnimplementedPricingServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPricingServiceServer struct { -} - -func (UnimplementedPricingServiceServer) EstimateCost(context.Context, *EstimateRequest) (*EstimateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EstimateCost not implemented") -} -func (UnimplementedPricingServiceServer) mustEmbedUnimplementedPricingServiceServer() {} - -// UnsafePricingServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PricingServiceServer will -// result in compilation errors. -type UnsafePricingServiceServer interface { - mustEmbedUnimplementedPricingServiceServer() -} - -func RegisterPricingServiceServer(s grpc.ServiceRegistrar, srv PricingServiceServer) { - s.RegisterService(&PricingService_ServiceDesc, srv) -} - -func _PricingService_EstimateCost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EstimateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PricingServiceServer).EstimateCost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pricing.PricingService/EstimateCost", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PricingServiceServer).EstimateCost(ctx, req.(*EstimateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// PricingService_ServiceDesc is the grpc.ServiceDesc for PricingService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PricingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pricing.PricingService", - HandlerType: (*PricingServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EstimateCost", - Handler: _PricingService_EstimateCost_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "kwil/pricing/v0/service.proto", -} diff --git a/api/protobuf/tx/v0/address.pb.go b/api/protobuf/tx/v0/address.pb.go deleted file mode 100644 index 37a0d7547..000000000 --- a/api/protobuf/tx/v0/address.pb.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/address.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetAddressRequest) Reset() { - *x = GetAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_address_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAddressRequest) ProtoMessage() {} - -func (x *GetAddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_address_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAddressRequest.ProtoReflect.Descriptor instead. -func (*GetAddressRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_address_proto_rawDescGZIP(), []int{0} -} - -type GetAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetAddressResponse) Reset() { - *x = GetAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_address_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAddressResponse) ProtoMessage() {} - -func (x *GetAddressResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_address_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAddressResponse.ProtoReflect.Descriptor instead. -func (*GetAddressResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_address_proto_rawDescGZIP(), []int{1} -} - -func (x *GetAddressResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -var File_kwil_tx_v0_address_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_address_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x22, 0x13, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, - 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_address_proto_rawDescOnce sync.Once - file_kwil_tx_v0_address_proto_rawDescData = file_kwil_tx_v0_address_proto_rawDesc -) - -func file_kwil_tx_v0_address_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_address_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_address_proto_rawDescData) - }) - return file_kwil_tx_v0_address_proto_rawDescData -} - -var file_kwil_tx_v0_address_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_address_proto_goTypes = []interface{}{ - (*GetAddressRequest)(nil), // 0: tx.GetAddressRequest - (*GetAddressResponse)(nil), // 1: tx.GetAddressResponse -} -var file_kwil_tx_v0_address_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_address_proto_init() } -func file_kwil_tx_v0_address_proto_init() { - if File_kwil_tx_v0_address_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_address_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_address_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_address_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_address_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_address_proto_msgTypes, - }.Build() - File_kwil_tx_v0_address_proto = out.File - file_kwil_tx_v0_address_proto_rawDesc = nil - file_kwil_tx_v0_address_proto_goTypes = nil - file_kwil_tx_v0_address_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/broadcast.pb.go b/api/protobuf/tx/v0/broadcast.pb.go deleted file mode 100644 index d349a7040..000000000 --- a/api/protobuf/tx/v0/broadcast.pb.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/broadcast.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type BroadcastRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tx *v0.Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (x *BroadcastRequest) Reset() { - *x = BroadcastRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_broadcast_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastRequest) ProtoMessage() {} - -func (x *BroadcastRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_broadcast_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BroadcastRequest.ProtoReflect.Descriptor instead. -func (*BroadcastRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_broadcast_proto_rawDescGZIP(), []int{0} -} - -func (x *BroadcastRequest) GetTx() *v0.Tx { - if x != nil { - return x.Tx - } - return nil -} - -type BroadcastResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Fee string `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (x *BroadcastResponse) Reset() { - *x = BroadcastResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_broadcast_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastResponse) ProtoMessage() {} - -func (x *BroadcastResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_broadcast_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BroadcastResponse.ProtoReflect.Descriptor instead. -func (*BroadcastResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_broadcast_proto_rawDescGZIP(), []int{1} -} - -func (x *BroadcastResponse) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *BroadcastResponse) GetFee() string { - if x != nil { - return x.Fee - } - return "" -} - -var File_kwil_tx_v0_broadcast_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_broadcast_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x62, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, - 0x1a, 0x17, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, - 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x10, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, - 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x54, 0x78, 0x52, 0x02, 0x74, 0x78, 0x22, 0x39, 0x0a, 0x11, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x66, 0x65, 0x65, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, - 0x74, 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_broadcast_proto_rawDescOnce sync.Once - file_kwil_tx_v0_broadcast_proto_rawDescData = file_kwil_tx_v0_broadcast_proto_rawDesc -) - -func file_kwil_tx_v0_broadcast_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_broadcast_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_broadcast_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_broadcast_proto_rawDescData) - }) - return file_kwil_tx_v0_broadcast_proto_rawDescData -} - -var file_kwil_tx_v0_broadcast_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_broadcast_proto_goTypes = []interface{}{ - (*BroadcastRequest)(nil), // 0: tx.BroadcastRequest - (*BroadcastResponse)(nil), // 1: tx.BroadcastResponse - (*v0.Tx)(nil), // 2: common.Tx -} -var file_kwil_tx_v0_broadcast_proto_depIdxs = []int32{ - 2, // 0: tx.BroadcastRequest.tx:type_name -> common.Tx - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_broadcast_proto_init() } -func file_kwil_tx_v0_broadcast_proto_init() { - if File_kwil_tx_v0_broadcast_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_broadcast_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_broadcast_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_broadcast_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_broadcast_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_broadcast_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_broadcast_proto_msgTypes, - }.Build() - File_kwil_tx_v0_broadcast_proto = out.File - file_kwil_tx_v0_broadcast_proto_rawDesc = nil - file_kwil_tx_v0_broadcast_proto_goTypes = nil - file_kwil_tx_v0_broadcast_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/executables.pb.go b/api/protobuf/tx/v0/executables.pb.go deleted file mode 100644 index c8bfdb8fb..000000000 --- a/api/protobuf/tx/v0/executables.pb.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/executables.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetQueriesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetQueriesRequest) Reset() { - *x = GetQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_executables_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetQueriesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetQueriesRequest) ProtoMessage() {} - -func (x *GetQueriesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_executables_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetQueriesRequest.ProtoReflect.Descriptor instead. -func (*GetQueriesRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_executables_proto_rawDescGZIP(), []int{0} -} - -func (x *GetQueriesRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetQueriesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Queries []*v0.QuerySignature `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` -} - -func (x *GetQueriesResponse) Reset() { - *x = GetQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_executables_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetQueriesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetQueriesResponse) ProtoMessage() {} - -func (x *GetQueriesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_executables_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetQueriesResponse.ProtoReflect.Descriptor instead. -func (*GetQueriesResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_executables_proto_rawDescGZIP(), []int{1} -} - -func (x *GetQueriesResponse) GetQueries() []*v0.QuerySignature { - if x != nil { - return x.Queries - } - return nil -} - -var File_kwil_tx_v0_executables_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_executables_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, - 0x74, 0x78, 0x1a, 0x1a, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x76, 0x30, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, - 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_executables_proto_rawDescOnce sync.Once - file_kwil_tx_v0_executables_proto_rawDescData = file_kwil_tx_v0_executables_proto_rawDesc -) - -func file_kwil_tx_v0_executables_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_executables_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_executables_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_executables_proto_rawDescData) - }) - return file_kwil_tx_v0_executables_proto_rawDescData -} - -var file_kwil_tx_v0_executables_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_executables_proto_goTypes = []interface{}{ - (*GetQueriesRequest)(nil), // 0: tx.GetQueriesRequest - (*GetQueriesResponse)(nil), // 1: tx.GetQueriesResponse - (*v0.QuerySignature)(nil), // 2: common.QuerySignature -} -var file_kwil_tx_v0_executables_proto_depIdxs = []int32{ - 2, // 0: tx.GetQueriesResponse.queries:type_name -> common.QuerySignature - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_executables_proto_init() } -func file_kwil_tx_v0_executables_proto_init() { - if File_kwil_tx_v0_executables_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_executables_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_executables_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_executables_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_executables_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_executables_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_executables_proto_msgTypes, - }.Build() - File_kwil_tx_v0_executables_proto = out.File - file_kwil_tx_v0_executables_proto_rawDesc = nil - file_kwil_tx_v0_executables_proto_goTypes = nil - file_kwil_tx_v0_executables_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/list_db.pb.go b/api/protobuf/tx/v0/list_db.pb.go deleted file mode 100644 index 188e20855..000000000 --- a/api/protobuf/tx/v0/list_db.pb.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/list_db.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ListDatabasesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *ListDatabasesRequest) Reset() { - *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_list_db_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDatabasesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDatabasesRequest) ProtoMessage() {} - -func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_list_db_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead. -func (*ListDatabasesRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_list_db_proto_rawDescGZIP(), []int{0} -} - -func (x *ListDatabasesRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -type ListDatabasesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` -} - -func (x *ListDatabasesResponse) Reset() { - *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_list_db_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDatabasesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDatabasesResponse) ProtoMessage() {} - -func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_list_db_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead. -func (*ListDatabasesResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_list_db_proto_rawDescGZIP(), []int{1} -} - -func (x *ListDatabasesResponse) GetDatabases() []string { - if x != nil { - return x.Databases - } - return nil -} - -var File_kwil_tx_v0_list_db_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_list_db_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x6c, 0x69, 0x73, - 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x22, 0x2c, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x15, - 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, - 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_list_db_proto_rawDescOnce sync.Once - file_kwil_tx_v0_list_db_proto_rawDescData = file_kwil_tx_v0_list_db_proto_rawDesc -) - -func file_kwil_tx_v0_list_db_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_list_db_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_list_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_list_db_proto_rawDescData) - }) - return file_kwil_tx_v0_list_db_proto_rawDescData -} - -var file_kwil_tx_v0_list_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_list_db_proto_goTypes = []interface{}{ - (*ListDatabasesRequest)(nil), // 0: tx.ListDatabasesRequest - (*ListDatabasesResponse)(nil), // 1: tx.ListDatabasesResponse -} -var file_kwil_tx_v0_list_db_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_list_db_proto_init() } -func file_kwil_tx_v0_list_db_proto_init() { - if File_kwil_tx_v0_list_db_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_list_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_list_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_list_db_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_list_db_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_list_db_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_list_db_proto_msgTypes, - }.Build() - File_kwil_tx_v0_list_db_proto = out.File - file_kwil_tx_v0_list_db_proto_rawDesc = nil - file_kwil_tx_v0_list_db_proto_goTypes = nil - file_kwil_tx_v0_list_db_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/ping.pb.go b/api/protobuf/tx/v0/ping.pb.go deleted file mode 100644 index 2c953b321..000000000 --- a/api/protobuf/tx/v0/ping.pb.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/ping.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *PingRequest) Reset() { - *x = PingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_ping_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest) ProtoMessage() {} - -func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_ping_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_ping_proto_rawDescGZIP(), []int{0} -} - -func (x *PingRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type PongResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *PongResponse) Reset() { - *x = PongResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_ping_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PongResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PongResponse) ProtoMessage() {} - -func (x *PongResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_ping_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PongResponse.ProtoReflect.Descriptor instead. -func (*PongResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_ping_proto_rawDescGZIP(), []int{1} -} - -func (x *PongResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_kwil_tx_v0_ping_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_ping_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x70, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x22, 0x27, 0x0a, 0x0b, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x1e, - 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, 0x78, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_ping_proto_rawDescOnce sync.Once - file_kwil_tx_v0_ping_proto_rawDescData = file_kwil_tx_v0_ping_proto_rawDesc -) - -func file_kwil_tx_v0_ping_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_ping_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_ping_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_ping_proto_rawDescData) - }) - return file_kwil_tx_v0_ping_proto_rawDescData -} - -var file_kwil_tx_v0_ping_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_ping_proto_goTypes = []interface{}{ - (*PingRequest)(nil), // 0: tx.PingRequest - (*PongResponse)(nil), // 1: tx.PongResponse -} -var file_kwil_tx_v0_ping_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_ping_proto_init() } -func file_kwil_tx_v0_ping_proto_init() { - if File_kwil_tx_v0_ping_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_ping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_ping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PongResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_ping_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_ping_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_ping_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_ping_proto_msgTypes, - }.Build() - File_kwil_tx_v0_ping_proto = out.File - file_kwil_tx_v0_ping_proto_rawDesc = nil - file_kwil_tx_v0_ping_proto_goTypes = nil - file_kwil_tx_v0_ping_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/schema.pb.go b/api/protobuf/tx/v0/schema.pb.go deleted file mode 100644 index b7db3a4f4..000000000 --- a/api/protobuf/tx/v0/schema.pb.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/schema.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetSchemaRequest) Reset() { - *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaRequest) ProtoMessage() {} - -func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. -func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_schema_proto_rawDescGZIP(), []int{0} -} - -func (x *GetSchemaRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database *v0.Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` -} - -func (x *GetSchemaResponse) Reset() { - *x = GetSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaResponse) ProtoMessage() {} - -func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead. -func (*GetSchemaResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_schema_proto_rawDescGZIP(), []int{1} -} - -func (x *GetSchemaResponse) GetDatabase() *v0.Database { - if x != nil { - return x.Database - } - return nil -} - -var File_kwil_tx_v0_schema_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_schema_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x1a, 0x1d, 0x6b, - 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x2f, 0x64, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x41, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, - 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_schema_proto_rawDescOnce sync.Once - file_kwil_tx_v0_schema_proto_rawDescData = file_kwil_tx_v0_schema_proto_rawDesc -) - -func file_kwil_tx_v0_schema_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_schema_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_schema_proto_rawDescData) - }) - return file_kwil_tx_v0_schema_proto_rawDescData -} - -var file_kwil_tx_v0_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_schema_proto_goTypes = []interface{}{ - (*GetSchemaRequest)(nil), // 0: tx.GetSchemaRequest - (*GetSchemaResponse)(nil), // 1: tx.GetSchemaResponse - (*v0.Database)(nil), // 2: common.Database -} -var file_kwil_tx_v0_schema_proto_depIdxs = []int32{ - 2, // 0: tx.GetSchemaResponse.database:type_name -> common.Database - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_schema_proto_init() } -func file_kwil_tx_v0_schema_proto_init() { - if File_kwil_tx_v0_schema_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_schema_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_schema_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_schema_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_schema_proto_msgTypes, - }.Build() - File_kwil_tx_v0_schema_proto = out.File - file_kwil_tx_v0_schema_proto_rawDesc = nil - file_kwil_tx_v0_schema_proto_goTypes = nil - file_kwil_tx_v0_schema_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/service.pb.go b/api/protobuf/tx/v0/service.pb.go deleted file mode 100644 index 3953561d3..000000000 --- a/api/protobuf/tx/v0/service.pb.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/service.proto - -package txpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_kwil_tx_v0_service_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_service_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6b, 0x77, - 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, - 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x30, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6b, 0x77, 0x69, 0x6c, 0x2f, - 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, - 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6b, 0x77, 0x69, - 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x82, 0x05, 0x0a, 0x09, 0x54, 0x78, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, - 0x12, 0x14, 0x2e, 0x74, 0x78, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x74, 0x78, 0x2e, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x62, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x55, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x2e, 0x74, 0x78, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x74, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x67, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x74, 0x78, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x74, 0x78, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x7b, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x74, 0x78, 0x2e, 0x47, - 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x74, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, - 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x2e, 0x74, 0x78, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x74, 0x78, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, - 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x3f, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x0f, 0x2e, 0x74, 0x78, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x74, - 0x78, 0x2e, 0x50, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x70, 0x69, 0x6e, 0x67, 0x12, 0x54, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x15, 0x2e, 0x74, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x78, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, - 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x78, 0x2f, 0x76, 0x30, 0x3b, 0x74, 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var file_kwil_tx_v0_service_proto_goTypes = []interface{}{ - (*BroadcastRequest)(nil), // 0: tx.BroadcastRequest - (*GetSchemaRequest)(nil), // 1: tx.GetSchemaRequest - (*ListDatabasesRequest)(nil), // 2: tx.ListDatabasesRequest - (*GetQueriesRequest)(nil), // 3: tx.GetQueriesRequest - (*ValidateSchemaRequest)(nil), // 4: tx.ValidateSchemaRequest - (*PingRequest)(nil), // 5: tx.PingRequest - (*GetAddressRequest)(nil), // 6: tx.GetAddressRequest - (*BroadcastResponse)(nil), // 7: tx.BroadcastResponse - (*GetSchemaResponse)(nil), // 8: tx.GetSchemaResponse - (*ListDatabasesResponse)(nil), // 9: tx.ListDatabasesResponse - (*GetQueriesResponse)(nil), // 10: tx.GetQueriesResponse - (*ValidateSchemaResponse)(nil), // 11: tx.ValidateSchemaResponse - (*PongResponse)(nil), // 12: tx.PongResponse - (*GetAddressResponse)(nil), // 13: tx.GetAddressResponse -} -var file_kwil_tx_v0_service_proto_depIdxs = []int32{ - 0, // 0: tx.TxService.Broadcast:input_type -> tx.BroadcastRequest - 1, // 1: tx.TxService.GetSchema:input_type -> tx.GetSchemaRequest - 2, // 2: tx.TxService.ListDatabases:input_type -> tx.ListDatabasesRequest - 3, // 3: tx.TxService.GetQueries:input_type -> tx.GetQueriesRequest - 4, // 4: tx.TxService.ValidateSchema:input_type -> tx.ValidateSchemaRequest - 5, // 5: tx.TxService.Ping:input_type -> tx.PingRequest - 6, // 6: tx.TxService.GetAddress:input_type -> tx.GetAddressRequest - 7, // 7: tx.TxService.Broadcast:output_type -> tx.BroadcastResponse - 8, // 8: tx.TxService.GetSchema:output_type -> tx.GetSchemaResponse - 9, // 9: tx.TxService.ListDatabases:output_type -> tx.ListDatabasesResponse - 10, // 10: tx.TxService.GetQueries:output_type -> tx.GetQueriesResponse - 11, // 11: tx.TxService.ValidateSchema:output_type -> tx.ValidateSchemaResponse - 12, // 12: tx.TxService.Ping:output_type -> tx.PongResponse - 13, // 13: tx.TxService.GetAddress:output_type -> tx.GetAddressResponse - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_service_proto_init() } -func file_kwil_tx_v0_service_proto_init() { - if File_kwil_tx_v0_service_proto != nil { - return - } - file_kwil_tx_v0_broadcast_proto_init() - file_kwil_tx_v0_executables_proto_init() - file_kwil_tx_v0_list_db_proto_init() - file_kwil_tx_v0_schema_proto_init() - file_kwil_tx_v0_validate_proto_init() - file_kwil_tx_v0_ping_proto_init() - file_kwil_tx_v0_address_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kwil_tx_v0_service_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_service_proto_depIdxs, - }.Build() - File_kwil_tx_v0_service_proto = out.File - file_kwil_tx_v0_service_proto_rawDesc = nil - file_kwil_tx_v0_service_proto_goTypes = nil - file_kwil_tx_v0_service_proto_depIdxs = nil -} diff --git a/api/protobuf/tx/v0/service.pb.gw.go b/api/protobuf/tx/v0/service.pb.gw.go deleted file mode 100644 index 2a3be3b0b..000000000 --- a/api/protobuf/tx/v0/service.pb.gw.go +++ /dev/null @@ -1,721 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: kwil/tx/v0/service.proto - -/* -Package txpb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package txpb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_TxService_Broadcast_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BroadcastRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Broadcast(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_Broadcast_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BroadcastRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Broadcast(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TxService_GetSchema_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_GetSchema_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetSchema(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TxService_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDatabasesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["owner"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") - } - - protoReq.Owner, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) - } - - msg, err := client.ListDatabases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDatabasesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["owner"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") - } - - protoReq.Owner, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) - } - - msg, err := server.ListDatabases(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TxService_GetQueries_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetQueriesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetQueries(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_GetQueries_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetQueriesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetQueries(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TxService_ValidateSchema_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateSchemaRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ValidateSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_ValidateSchema_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateSchemaRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ValidateSchema(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_TxService_Ping_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_TxService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PingRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TxService_Ping_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Ping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PingRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TxService_Ping_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Ping(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TxService_GetAddress_0(ctx context.Context, marshaler runtime.Marshaler, client TxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAddressRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TxService_GetAddress_0(ctx context.Context, marshaler runtime.Marshaler, server TxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAddressRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetAddress(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterTxServiceHandlerServer registers the http handlers for service TxService to "mux". -// UnaryRPC :call TxServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTxServiceHandlerFromEndpoint instead. -func RegisterTxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TxServiceServer) error { - - mux.Handle("POST", pattern_TxService_Broadcast_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/Broadcast", runtime.WithHTTPPathPattern("/api/v0/broadcast")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_Broadcast_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_Broadcast_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/GetSchema", runtime.WithHTTPPathPattern("/api/v0/{id}/schema")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_GetSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/ListDatabases", runtime.WithHTTPPathPattern("/api/v0/{owner}/databases")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_ListDatabases_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/GetQueries", runtime.WithHTTPPathPattern("/api/v0/{id}/queries")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_GetQueries_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetQueries_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TxService_ValidateSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/ValidateSchema", runtime.WithHTTPPathPattern("/api/v0/schema/validate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_ValidateSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_ValidateSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_Ping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/Ping", runtime.WithHTTPPathPattern("/api/v0/ping")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_Ping_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tx.TxService/GetAddress", runtime.WithHTTPPathPattern("/api/v0/address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TxService_GetAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterTxServiceHandlerFromEndpoint is same as RegisterTxServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterTxServiceHandler(ctx, mux, conn) -} - -// RegisterTxServiceHandler registers the http handlers for service TxService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTxServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTxServiceHandlerClient(ctx, mux, NewTxServiceClient(conn)) -} - -// RegisterTxServiceHandlerClient registers the http handlers for service TxService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TxServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TxServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TxServiceClient" to call the correct interceptors. -func RegisterTxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TxServiceClient) error { - - mux.Handle("POST", pattern_TxService_Broadcast_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/Broadcast", runtime.WithHTTPPathPattern("/api/v0/broadcast")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_Broadcast_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_Broadcast_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/GetSchema", runtime.WithHTTPPathPattern("/api/v0/{id}/schema")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_GetSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/ListDatabases", runtime.WithHTTPPathPattern("/api/v0/{owner}/databases")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_ListDatabases_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/GetQueries", runtime.WithHTTPPathPattern("/api/v0/{id}/queries")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_GetQueries_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetQueries_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TxService_ValidateSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/ValidateSchema", runtime.WithHTTPPathPattern("/api/v0/schema/validate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_ValidateSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_ValidateSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_Ping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/Ping", runtime.WithHTTPPathPattern("/api/v0/ping")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_Ping_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_TxService_GetAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tx.TxService/GetAddress", runtime.WithHTTPPathPattern("/api/v0/address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TxService_GetAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TxService_GetAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_TxService_Broadcast_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v0", "broadcast"}, "")) - - pattern_TxService_GetSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"api", "v0", "id", "schema"}, "")) - - pattern_TxService_ListDatabases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"api", "v0", "owner", "databases"}, "")) - - pattern_TxService_GetQueries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"api", "v0", "id", "queries"}, "")) - - pattern_TxService_ValidateSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v0", "schema", "validate"}, "")) - - pattern_TxService_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v0", "ping"}, "")) - - pattern_TxService_GetAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v0", "address"}, "")) -) - -var ( - forward_TxService_Broadcast_0 = runtime.ForwardResponseMessage - - forward_TxService_GetSchema_0 = runtime.ForwardResponseMessage - - forward_TxService_ListDatabases_0 = runtime.ForwardResponseMessage - - forward_TxService_GetQueries_0 = runtime.ForwardResponseMessage - - forward_TxService_ValidateSchema_0 = runtime.ForwardResponseMessage - - forward_TxService_Ping_0 = runtime.ForwardResponseMessage - - forward_TxService_GetAddress_0 = runtime.ForwardResponseMessage -) diff --git a/api/protobuf/tx/v0/service_grpc.pb.go b/api/protobuf/tx/v0/service_grpc.pb.go deleted file mode 100644 index 5dc200d90..000000000 --- a/api/protobuf/tx/v0/service_grpc.pb.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 -// source: kwil/tx/v0/service.proto - -package txpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TxServiceClient is the client API for TxService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TxServiceClient interface { - Broadcast(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) - GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) - ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) - GetQueries(ctx context.Context, in *GetQueriesRequest, opts ...grpc.CallOption) (*GetQueriesResponse, error) - ValidateSchema(ctx context.Context, in *ValidateSchemaRequest, opts ...grpc.CallOption) (*ValidateSchemaResponse, error) - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) - GetAddress(ctx context.Context, in *GetAddressRequest, opts ...grpc.CallOption) (*GetAddressResponse, error) -} - -type txServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTxServiceClient(cc grpc.ClientConnInterface) TxServiceClient { - return &txServiceClient{cc} -} - -func (c *txServiceClient) Broadcast(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) { - out := new(BroadcastResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/Broadcast", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) { - out := new(GetSchemaResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/GetSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) { - out := new(ListDatabasesResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/ListDatabases", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) GetQueries(ctx context.Context, in *GetQueriesRequest, opts ...grpc.CallOption) (*GetQueriesResponse, error) { - out := new(GetQueriesResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/GetQueries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) ValidateSchema(ctx context.Context, in *ValidateSchemaRequest, opts ...grpc.CallOption) (*ValidateSchemaResponse, error) { - out := new(ValidateSchemaResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/ValidateSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) { - out := new(PongResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/Ping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *txServiceClient) GetAddress(ctx context.Context, in *GetAddressRequest, opts ...grpc.CallOption) (*GetAddressResponse, error) { - out := new(GetAddressResponse) - err := c.cc.Invoke(ctx, "/tx.TxService/GetAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TxServiceServer is the server API for TxService service. -// All implementations must embed UnimplementedTxServiceServer -// for forward compatibility -type TxServiceServer interface { - Broadcast(context.Context, *BroadcastRequest) (*BroadcastResponse, error) - GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) - ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) - GetQueries(context.Context, *GetQueriesRequest) (*GetQueriesResponse, error) - ValidateSchema(context.Context, *ValidateSchemaRequest) (*ValidateSchemaResponse, error) - Ping(context.Context, *PingRequest) (*PongResponse, error) - GetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error) - mustEmbedUnimplementedTxServiceServer() -} - -// UnimplementedTxServiceServer must be embedded to have forward compatible implementations. -type UnimplementedTxServiceServer struct { -} - -func (UnimplementedTxServiceServer) Broadcast(context.Context, *BroadcastRequest) (*BroadcastResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Broadcast not implemented") -} -func (UnimplementedTxServiceServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented") -} -func (UnimplementedTxServiceServer) ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDatabases not implemented") -} -func (UnimplementedTxServiceServer) GetQueries(context.Context, *GetQueriesRequest) (*GetQueriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetQueries not implemented") -} -func (UnimplementedTxServiceServer) ValidateSchema(context.Context, *ValidateSchemaRequest) (*ValidateSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateSchema not implemented") -} -func (UnimplementedTxServiceServer) Ping(context.Context, *PingRequest) (*PongResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (UnimplementedTxServiceServer) GetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAddress not implemented") -} -func (UnimplementedTxServiceServer) mustEmbedUnimplementedTxServiceServer() {} - -// UnsafeTxServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TxServiceServer will -// result in compilation errors. -type UnsafeTxServiceServer interface { - mustEmbedUnimplementedTxServiceServer() -} - -func RegisterTxServiceServer(s grpc.ServiceRegistrar, srv TxServiceServer) { - s.RegisterService(&TxService_ServiceDesc, srv) -} - -func _TxService_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).Broadcast(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/Broadcast", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).Broadcast(ctx, req.(*BroadcastRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).GetSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/GetSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).GetSchema(ctx, req.(*GetSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_ListDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDatabasesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).ListDatabases(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/ListDatabases", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).ListDatabases(ctx, req.(*ListDatabasesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_GetQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetQueriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).GetQueries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/GetQueries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).GetQueries(ctx, req.(*GetQueriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_ValidateSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).ValidateSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/ValidateSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).ValidateSchema(ctx, req.(*ValidateSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/Ping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TxService_GetAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TxServiceServer).GetAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tx.TxService/GetAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TxServiceServer).GetAddress(ctx, req.(*GetAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TxService_ServiceDesc is the grpc.ServiceDesc for TxService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TxService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "tx.TxService", - HandlerType: (*TxServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Broadcast", - Handler: _TxService_Broadcast_Handler, - }, - { - MethodName: "GetSchema", - Handler: _TxService_GetSchema_Handler, - }, - { - MethodName: "ListDatabases", - Handler: _TxService_ListDatabases_Handler, - }, - { - MethodName: "GetQueries", - Handler: _TxService_GetQueries_Handler, - }, - { - MethodName: "ValidateSchema", - Handler: _TxService_ValidateSchema_Handler, - }, - { - MethodName: "Ping", - Handler: _TxService_Ping_Handler, - }, - { - MethodName: "GetAddress", - Handler: _TxService_GetAddress_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "kwil/tx/v0/service.proto", -} diff --git a/api/protobuf/tx/v0/validate.pb.go b/api/protobuf/tx/v0/validate.pb.go deleted file mode 100644 index a2cddbafb..000000000 --- a/api/protobuf/tx/v0/validate.pb.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: kwil/tx/v0/validate.proto - -package txpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - v0 "kwil/api/protobuf/common/v0" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ValidateSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Schema *v0.Database `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` -} - -func (x *ValidateSchemaRequest) Reset() { - *x = ValidateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_validate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateSchemaRequest) ProtoMessage() {} - -func (x *ValidateSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_validate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateSchemaRequest.ProtoReflect.Descriptor instead. -func (*ValidateSchemaRequest) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_validate_proto_rawDescGZIP(), []int{0} -} - -func (x *ValidateSchemaRequest) GetSchema() *v0.Database { - if x != nil { - return x.Schema - } - return nil -} - -type ValidateSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ValidateSchemaResponse) Reset() { - *x = ValidateSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kwil_tx_v0_validate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateSchemaResponse) ProtoMessage() {} - -func (x *ValidateSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_kwil_tx_v0_validate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateSchemaResponse.ProtoReflect.Descriptor instead. -func (*ValidateSchemaResponse) Descriptor() ([]byte, []int) { - return file_kwil_tx_v0_validate_proto_rawDescGZIP(), []int{1} -} - -func (x *ValidateSchemaResponse) GetValid() bool { - if x != nil { - return x.Valid - } - return false -} - -func (x *ValidateSchemaResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -var File_kwil_tx_v0_validate_proto protoreflect.FileDescriptor - -var file_kwil_tx_v0_validate_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x30, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x74, 0x78, 0x1a, - 0x1d, 0x6b, 0x77, 0x69, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x30, 0x2f, - 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, - 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x22, 0x44, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x1e, 0x5a, 0x1c, 0x6b, 0x77, 0x69, 0x6c, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x30, 0x3b, 0x74, 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kwil_tx_v0_validate_proto_rawDescOnce sync.Once - file_kwil_tx_v0_validate_proto_rawDescData = file_kwil_tx_v0_validate_proto_rawDesc -) - -func file_kwil_tx_v0_validate_proto_rawDescGZIP() []byte { - file_kwil_tx_v0_validate_proto_rawDescOnce.Do(func() { - file_kwil_tx_v0_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_kwil_tx_v0_validate_proto_rawDescData) - }) - return file_kwil_tx_v0_validate_proto_rawDescData -} - -var file_kwil_tx_v0_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kwil_tx_v0_validate_proto_goTypes = []interface{}{ - (*ValidateSchemaRequest)(nil), // 0: tx.ValidateSchemaRequest - (*ValidateSchemaResponse)(nil), // 1: tx.ValidateSchemaResponse - (*v0.Database)(nil), // 2: common.Database -} -var file_kwil_tx_v0_validate_proto_depIdxs = []int32{ - 2, // 0: tx.ValidateSchemaRequest.schema:type_name -> common.Database - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_kwil_tx_v0_validate_proto_init() } -func file_kwil_tx_v0_validate_proto_init() { - if File_kwil_tx_v0_validate_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_kwil_tx_v0_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kwil_tx_v0_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kwil_tx_v0_validate_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_kwil_tx_v0_validate_proto_goTypes, - DependencyIndexes: file_kwil_tx_v0_validate_proto_depIdxs, - MessageInfos: file_kwil_tx_v0_validate_proto_msgTypes, - }.Build() - File_kwil_tx_v0_validate_proto = out.File - file_kwil_tx_v0_validate_proto_rawDesc = nil - file_kwil_tx_v0_validate_proto_goTypes = nil - file_kwil_tx_v0_validate_proto_depIdxs = nil -}