From 9afdd3cee7fa5877602d99a3881d49c6d334eefe Mon Sep 17 00:00:00 2001 From: Tim Burks Date: Sat, 13 Jul 2024 10:10:35 -0700 Subject: [PATCH] remove unused rtree protos --- Makefile | 8 - apis/bobadojo/rtree/v1/rtree.proto | 32 --- pkg/rtreepb/rtree.pb.go | 403 ----------------------------- 3 files changed, 443 deletions(-) delete mode 100644 apis/bobadojo/rtree/v1/rtree.proto delete mode 100644 pkg/rtreepb/rtree.pb.go diff --git a/Makefile b/Makefile index 326375e..3c0cef1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,3 @@ all: go install ./... - -rpc: - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - mkdir -p pkg/rtreepb - protoc apis/bobadojo/rtree/v1/rtree.proto \ - --proto_path='apis' \ - --go_opt='module=github.com/bobadojo/stores-server/pkg/rtreepb' \ - --go_out='pkg/rtreepb' diff --git a/apis/bobadojo/rtree/v1/rtree.proto b/apis/bobadojo/rtree/v1/rtree.proto deleted file mode 100644 index d4a7c8d..0000000 --- a/apis/bobadojo/rtree/v1/rtree.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package bobadojo.rtree.v1; - -option go_package = "github.com/bobadojo/stores-server/pkg/rtreepb;rtreepb"; - -message Node { - BoundingBox bounds = 1; - repeated Node children = 2; - repeated Leaf leaves = 3; -} - -message Leaf { - string name = 1; - Location location = 2; -} - -// A location in terrestrial coordinates. -message Location { - // Latitude of the location. - float latitude = 1; - // Longitude of the location. - float longitude = 2; -} - -// A bounding box in terrestrial coordinates. -message BoundingBox { - // Maximum coordinate values. - Location max = 1; - // Minimum coordinate values. - Location min = 2; -} diff --git a/pkg/rtreepb/rtree.pb.go b/pkg/rtreepb/rtree.pb.go deleted file mode 100644 index 07f7a7c..0000000 --- a/pkg/rtreepb/rtree.pb.go +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: bobadojo/rtree/v1/rtree.proto - -package rtreepb - -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 Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bounds *BoundingBox `protobuf:"bytes,1,opt,name=bounds,proto3" json:"bounds,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` - Leaves []*Leaf `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"` -} - -func (x *Node) Reset() { - *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_bobadojo_rtree_v1_rtree_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Node) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Node) ProtoMessage() {} - -func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_bobadojo_rtree_v1_rtree_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 Node.ProtoReflect.Descriptor instead. -func (*Node) Descriptor() ([]byte, []int) { - return file_bobadojo_rtree_v1_rtree_proto_rawDescGZIP(), []int{0} -} - -func (x *Node) GetBounds() *BoundingBox { - if x != nil { - return x.Bounds - } - return nil -} - -func (x *Node) GetChildren() []*Node { - if x != nil { - return x.Children - } - return nil -} - -func (x *Node) GetLeaves() []*Leaf { - if x != nil { - return x.Leaves - } - return nil -} - -type Leaf struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` -} - -func (x *Leaf) Reset() { - *x = Leaf{} - if protoimpl.UnsafeEnabled { - mi := &file_bobadojo_rtree_v1_rtree_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Leaf) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Leaf) ProtoMessage() {} - -func (x *Leaf) ProtoReflect() protoreflect.Message { - mi := &file_bobadojo_rtree_v1_rtree_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 Leaf.ProtoReflect.Descriptor instead. -func (*Leaf) Descriptor() ([]byte, []int) { - return file_bobadojo_rtree_v1_rtree_proto_rawDescGZIP(), []int{1} -} - -func (x *Leaf) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Leaf) GetLocation() *Location { - if x != nil { - return x.Location - } - return nil -} - -// A location in terrestrial coordinates. -type Location struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Latitude of the location. - Latitude float32 `protobuf:"fixed32,1,opt,name=latitude,proto3" json:"latitude,omitempty"` - // Longitude of the location. - Longitude float32 `protobuf:"fixed32,2,opt,name=longitude,proto3" json:"longitude,omitempty"` -} - -func (x *Location) Reset() { - *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_bobadojo_rtree_v1_rtree_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Location) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Location) ProtoMessage() {} - -func (x *Location) ProtoReflect() protoreflect.Message { - mi := &file_bobadojo_rtree_v1_rtree_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 Location.ProtoReflect.Descriptor instead. -func (*Location) Descriptor() ([]byte, []int) { - return file_bobadojo_rtree_v1_rtree_proto_rawDescGZIP(), []int{2} -} - -func (x *Location) GetLatitude() float32 { - if x != nil { - return x.Latitude - } - return 0 -} - -func (x *Location) GetLongitude() float32 { - if x != nil { - return x.Longitude - } - return 0 -} - -// A bounding box in terrestrial coordinates. -type BoundingBox struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum coordinate values. - Max *Location `protobuf:"bytes,1,opt,name=max,proto3" json:"max,omitempty"` - // Minimum coordinate values. - Min *Location `protobuf:"bytes,2,opt,name=min,proto3" json:"min,omitempty"` -} - -func (x *BoundingBox) Reset() { - *x = BoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_bobadojo_rtree_v1_rtree_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BoundingBox) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoundingBox) ProtoMessage() {} - -func (x *BoundingBox) ProtoReflect() protoreflect.Message { - mi := &file_bobadojo_rtree_v1_rtree_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 BoundingBox.ProtoReflect.Descriptor instead. -func (*BoundingBox) Descriptor() ([]byte, []int) { - return file_bobadojo_rtree_v1_rtree_proto_rawDescGZIP(), []int{3} -} - -func (x *BoundingBox) GetMax() *Location { - if x != nil { - return x.Max - } - return nil -} - -func (x *BoundingBox) GetMin() *Location { - if x != nil { - return x.Min - } - return nil -} - -var File_bobadojo_rtree_v1_rtree_proto protoreflect.FileDescriptor - -var file_bobadojo_rtree_v1_rtree_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2f, 0x72, 0x74, 0x72, 0x65, 0x65, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x11, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, - 0x76, 0x31, 0x22, 0xa4, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x6f, - 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x52, 0x06, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, - 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x76, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x6f, 0x62, 0x61, 0x64, - 0x6f, 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, - 0x66, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x04, 0x4c, 0x65, 0x61, - 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, - 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, - 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x22, 0x6b, 0x0a, 0x0b, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x42, 0x6f, 0x78, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6d, - 0x61, 0x78, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2e, 0x72, 0x74, 0x72, 0x65, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6d, 0x69, - 0x6e, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x62, 0x6f, 0x62, 0x61, 0x64, 0x6f, 0x6a, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x2d, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x74, 0x72, 0x65, 0x65, - 0x70, 0x62, 0x3b, 0x72, 0x74, 0x72, 0x65, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_bobadojo_rtree_v1_rtree_proto_rawDescOnce sync.Once - file_bobadojo_rtree_v1_rtree_proto_rawDescData = file_bobadojo_rtree_v1_rtree_proto_rawDesc -) - -func file_bobadojo_rtree_v1_rtree_proto_rawDescGZIP() []byte { - file_bobadojo_rtree_v1_rtree_proto_rawDescOnce.Do(func() { - file_bobadojo_rtree_v1_rtree_proto_rawDescData = protoimpl.X.CompressGZIP(file_bobadojo_rtree_v1_rtree_proto_rawDescData) - }) - return file_bobadojo_rtree_v1_rtree_proto_rawDescData -} - -var file_bobadojo_rtree_v1_rtree_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_bobadojo_rtree_v1_rtree_proto_goTypes = []any{ - (*Node)(nil), // 0: bobadojo.rtree.v1.Node - (*Leaf)(nil), // 1: bobadojo.rtree.v1.Leaf - (*Location)(nil), // 2: bobadojo.rtree.v1.Location - (*BoundingBox)(nil), // 3: bobadojo.rtree.v1.BoundingBox -} -var file_bobadojo_rtree_v1_rtree_proto_depIdxs = []int32{ - 3, // 0: bobadojo.rtree.v1.Node.bounds:type_name -> bobadojo.rtree.v1.BoundingBox - 0, // 1: bobadojo.rtree.v1.Node.children:type_name -> bobadojo.rtree.v1.Node - 1, // 2: bobadojo.rtree.v1.Node.leaves:type_name -> bobadojo.rtree.v1.Leaf - 2, // 3: bobadojo.rtree.v1.Leaf.location:type_name -> bobadojo.rtree.v1.Location - 2, // 4: bobadojo.rtree.v1.BoundingBox.max:type_name -> bobadojo.rtree.v1.Location - 2, // 5: bobadojo.rtree.v1.BoundingBox.min:type_name -> bobadojo.rtree.v1.Location - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_bobadojo_rtree_v1_rtree_proto_init() } -func file_bobadojo_rtree_v1_rtree_proto_init() { - if File_bobadojo_rtree_v1_rtree_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_bobadojo_rtree_v1_rtree_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_bobadojo_rtree_v1_rtree_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Leaf); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_bobadojo_rtree_v1_rtree_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_bobadojo_rtree_v1_rtree_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBox); 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_bobadojo_rtree_v1_rtree_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_bobadojo_rtree_v1_rtree_proto_goTypes, - DependencyIndexes: file_bobadojo_rtree_v1_rtree_proto_depIdxs, - MessageInfos: file_bobadojo_rtree_v1_rtree_proto_msgTypes, - }.Build() - File_bobadojo_rtree_v1_rtree_proto = out.File - file_bobadojo_rtree_v1_rtree_proto_rawDesc = nil - file_bobadojo_rtree_v1_rtree_proto_goTypes = nil - file_bobadojo_rtree_v1_rtree_proto_depIdxs = nil -}