From 85d3c2d5c4fb10b3e7004ce841804f5071472f78 Mon Sep 17 00:00:00 2001 From: aatarasoff Date: Thu, 7 Dec 2023 13:59:39 +0300 Subject: [PATCH] update proto files --- gen/pbuf-registry/v1/entities.pb.go | 881 +++++++++++++++++- gen/pbuf-registry/v1/metadata.pb.go | 241 +++++ gen/pbuf-registry/v1/metadata_grpc.pb.go | 109 +++ pbuf.yaml | 2 +- .../google/api/cloudquotas/v1/resources.proto | 37 +- third_party/pbuf-registry/v1/entities.proto | 124 +++ third_party/pbuf-registry/v1/metadata.proto | 31 + 7 files changed, 1399 insertions(+), 26 deletions(-) create mode 100644 gen/pbuf-registry/v1/metadata.pb.go create mode 100644 gen/pbuf-registry/v1/metadata_grpc.pb.go create mode 100644 third_party/pbuf-registry/v1/metadata.proto diff --git a/gen/pbuf-registry/v1/entities.pb.go b/gen/pbuf-registry/v1/entities.pb.go index 817a21f..d246ade 100644 --- a/gen/pbuf-registry/v1/entities.pb.go +++ b/gen/pbuf-registry/v1/entities.pb.go @@ -221,6 +221,655 @@ func (x *Dependency) GetTag() string { return "" } +// Package is a proto file package used in a module +type Package struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the package. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The proto files of the package. + ProtoFiles []*ParsedProtoFile `protobuf:"bytes,2,rep,name=proto_files,json=protoFiles,proto3" json:"proto_files,omitempty"` + // The dependencies of the package. + Dependencies []*PackageDependency `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` +} + +func (x *Package) Reset() { + *x = Package{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Package) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Package) ProtoMessage() {} + +func (x *Package) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 Package.ProtoReflect.Descriptor instead. +func (*Package) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{3} +} + +func (x *Package) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Package) GetProtoFiles() []*ParsedProtoFile { + if x != nil { + return x.ProtoFiles + } + return nil +} + +func (x *Package) GetDependencies() []*PackageDependency { + if x != nil { + return x.Dependencies + } + return nil +} + +// ParsedProtoFile is a proto file parsed by the registry +// contains information about messages and services in the proto file +type ParsedProtoFile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The filename of the proto file. + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + // The messages in the proto file. + Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` + // The services in the proto file. + Services []*Service `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"` +} + +func (x *ParsedProtoFile) Reset() { + *x = ParsedProtoFile{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedProtoFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedProtoFile) ProtoMessage() {} + +func (x *ParsedProtoFile) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 ParsedProtoFile.ProtoReflect.Descriptor instead. +func (*ParsedProtoFile) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{4} +} + +func (x *ParsedProtoFile) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *ParsedProtoFile) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +func (x *ParsedProtoFile) GetServices() []*Service { + if x != nil { + return x.Services + } + return nil +} + +// Message is a message in a proto file. +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the message. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The fields of the message. + Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + // The nested messages of the message. + NestedMessages []*Message `protobuf:"bytes,3,rep,name=nested_messages,json=nestedMessages,proto3" json:"nested_messages,omitempty"` + // The nested enums of the message. + NestedEnums []*Enum `protobuf:"bytes,4,rep,name=nested_enums,json=nestedEnums,proto3" json:"nested_enums,omitempty"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{5} +} + +func (x *Message) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Message) GetFields() []*Field { + if x != nil { + return x.Fields + } + return nil +} + +func (x *Message) GetNestedMessages() []*Message { + if x != nil { + return x.NestedMessages + } + return nil +} + +func (x *Message) GetNestedEnums() []*Enum { + if x != nil { + return x.NestedEnums + } + return nil +} + +// Field is a field in a message. +type Field struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the field. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The message_type of the field. + MessageType string `protobuf:"bytes,2,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` + // The tag of the field. + Tag int32 `protobuf:"varint,3,opt,name=tag,proto3" json:"tag,omitempty"` + // The repeated flag of the field. + Repeated bool `protobuf:"varint,4,opt,name=repeated,proto3" json:"repeated,omitempty"` + // The map flag of the field. + Map bool `protobuf:"varint,5,opt,name=map,proto3" json:"map,omitempty"` + // The oneof flag of the field. + Oneof bool `protobuf:"varint,6,opt,name=oneof,proto3" json:"oneof,omitempty"` + // The optional flag of the field. + Optional bool `protobuf:"varint,7,opt,name=optional,proto3" json:"optional,omitempty"` + // The required flag of the field. + Required bool `protobuf:"varint,8,opt,name=required,proto3" json:"required,omitempty"` + // The one of names of the field + OneofNames []string `protobuf:"bytes,9,rep,name=oneof_names,json=oneofNames,proto3" json:"oneof_names,omitempty"` + // The one of types of the field + OneofTypes []string `protobuf:"bytes,10,rep,name=oneof_types,json=oneofTypes,proto3" json:"oneof_types,omitempty"` + // The map key type of the field. + MapKeyType string `protobuf:"bytes,11,opt,name=map_key_type,json=mapKeyType,proto3" json:"map_key_type,omitempty"` + // The map value type of the field. + MapValueType string `protobuf:"bytes,12,opt,name=map_value_type,json=mapValueType,proto3" json:"map_value_type,omitempty"` +} + +func (x *Field) Reset() { + *x = Field{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field) ProtoMessage() {} + +func (x *Field) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 Field.ProtoReflect.Descriptor instead. +func (*Field) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{6} +} + +func (x *Field) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Field) GetMessageType() string { + if x != nil { + return x.MessageType + } + return "" +} + +func (x *Field) GetTag() int32 { + if x != nil { + return x.Tag + } + return 0 +} + +func (x *Field) GetRepeated() bool { + if x != nil { + return x.Repeated + } + return false +} + +func (x *Field) GetMap() bool { + if x != nil { + return x.Map + } + return false +} + +func (x *Field) GetOneof() bool { + if x != nil { + return x.Oneof + } + return false +} + +func (x *Field) GetOptional() bool { + if x != nil { + return x.Optional + } + return false +} + +func (x *Field) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *Field) GetOneofNames() []string { + if x != nil { + return x.OneofNames + } + return nil +} + +func (x *Field) GetOneofTypes() []string { + if x != nil { + return x.OneofTypes + } + return nil +} + +func (x *Field) GetMapKeyType() string { + if x != nil { + return x.MapKeyType + } + return "" +} + +func (x *Field) GetMapValueType() string { + if x != nil { + return x.MapValueType + } + return "" +} + +// Enum is an enum in a proto file. +type Enum struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the enum. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The values of the enum. + Values []*EnumValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *Enum) Reset() { + *x = Enum{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Enum) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Enum) ProtoMessage() {} + +func (x *Enum) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 Enum.ProtoReflect.Descriptor instead. +func (*Enum) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{7} +} + +func (x *Enum) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Enum) GetValues() []*EnumValue { + if x != nil { + return x.Values + } + return nil +} + +// EnumValue is a value in an enum. +type EnumValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the value. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The tag of the value. + Tag int32 `protobuf:"varint,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *EnumValue) Reset() { + *x = EnumValue{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumValue) ProtoMessage() {} + +func (x *EnumValue) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_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 EnumValue.ProtoReflect.Descriptor instead. +func (*EnumValue) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{8} +} + +func (x *EnumValue) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EnumValue) GetTag() int32 { + if x != nil { + return x.Tag + } + return 0 +} + +// Service is a service in a proto file. +type Service struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the service. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The methods of the service. + Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` +} + +func (x *Service) Reset() { + *x = Service{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Service) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Service) ProtoMessage() {} + +func (x *Service) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[9] + 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 Service.ProtoReflect.Descriptor instead. +func (*Service) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{9} +} + +func (x *Service) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Service) GetMethods() []*Method { + if x != nil { + return x.Methods + } + return nil +} + +// Method is a method in a service. +type Method struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the method. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The input type of the method. + InputType string `protobuf:"bytes,2,opt,name=input_type,json=inputType,proto3" json:"input_type,omitempty"` + // The output type of the method. + OutputType string `protobuf:"bytes,3,opt,name=output_type,json=outputType,proto3" json:"output_type,omitempty"` +} + +func (x *Method) Reset() { + *x = Method{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Method) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Method) ProtoMessage() {} + +func (x *Method) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[10] + 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 Method.ProtoReflect.Descriptor instead. +func (*Method) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{10} +} + +func (x *Method) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Method) GetInputType() string { + if x != nil { + return x.InputType + } + return "" +} + +func (x *Method) GetOutputType() string { + if x != nil { + return x.OutputType + } + return "" +} + +// PackageDependency is a dependency of a package. +type PackageDependency struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the dependency. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PackageDependency) Reset() { + *x = PackageDependency{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PackageDependency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageDependency) ProtoMessage() {} + +func (x *PackageDependency) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_entities_proto_msgTypes[11] + 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 PackageDependency.ProtoReflect.Descriptor instead. +func (*PackageDependency) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_entities_proto_rawDescGZIP(), []int{11} +} + +func (x *PackageDependency) GetName() string { + if x != nil { + return x.Name + } + return "" +} + var File_pbuf_registry_v1_entities_proto protoreflect.FileDescriptor var file_pbuf_registry_v1_entities_proto_rawDesc = []byte{ @@ -242,11 +891,87 @@ var file_pbuf_registry_v1_entities_proto_rawDesc = []byte{ 0x6e, 0x74, 0x22, 0x32, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x69, 0x6f, 0x2f, 0x70, 0x62, 0x75, 0x66, - 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0xa8, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, + 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x75, 0x66, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xca, 0x01, + 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, + 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, + 0x0f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x0e, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x12, 0x38, 0x0a, 0x0c, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x05, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, + 0x66, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, + 0x6f, 0x66, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, + 0x65, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6d, + 0x61, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, + 0x0e, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x4e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x32, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x22, 0x31, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x50, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, + 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x5c, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x62, + 0x75, 0x66, 0x69, 0x6f, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -261,18 +986,36 @@ func file_pbuf_registry_v1_entities_proto_rawDescGZIP() []byte { return file_pbuf_registry_v1_entities_proto_rawDescData } -var file_pbuf_registry_v1_entities_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_pbuf_registry_v1_entities_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_pbuf_registry_v1_entities_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: pbufregistry.v1.Module - (*ProtoFile)(nil), // 1: pbufregistry.v1.ProtoFile - (*Dependency)(nil), // 2: pbufregistry.v1.Dependency + (*Module)(nil), // 0: pbufregistry.v1.Module + (*ProtoFile)(nil), // 1: pbufregistry.v1.ProtoFile + (*Dependency)(nil), // 2: pbufregistry.v1.Dependency + (*Package)(nil), // 3: pbufregistry.v1.Package + (*ParsedProtoFile)(nil), // 4: pbufregistry.v1.ParsedProtoFile + (*Message)(nil), // 5: pbufregistry.v1.Message + (*Field)(nil), // 6: pbufregistry.v1.Field + (*Enum)(nil), // 7: pbufregistry.v1.Enum + (*EnumValue)(nil), // 8: pbufregistry.v1.EnumValue + (*Service)(nil), // 9: pbufregistry.v1.Service + (*Method)(nil), // 10: pbufregistry.v1.Method + (*PackageDependency)(nil), // 11: pbufregistry.v1.PackageDependency } var file_pbuf_registry_v1_entities_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 + 4, // 0: pbufregistry.v1.Package.proto_files:type_name -> pbufregistry.v1.ParsedProtoFile + 11, // 1: pbufregistry.v1.Package.dependencies:type_name -> pbufregistry.v1.PackageDependency + 5, // 2: pbufregistry.v1.ParsedProtoFile.messages:type_name -> pbufregistry.v1.Message + 9, // 3: pbufregistry.v1.ParsedProtoFile.services:type_name -> pbufregistry.v1.Service + 6, // 4: pbufregistry.v1.Message.fields:type_name -> pbufregistry.v1.Field + 5, // 5: pbufregistry.v1.Message.nested_messages:type_name -> pbufregistry.v1.Message + 7, // 6: pbufregistry.v1.Message.nested_enums:type_name -> pbufregistry.v1.Enum + 8, // 7: pbufregistry.v1.Enum.values:type_name -> pbufregistry.v1.EnumValue + 10, // 8: pbufregistry.v1.Service.methods:type_name -> pbufregistry.v1.Method + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_pbuf_registry_v1_entities_proto_init() } @@ -317,6 +1060,114 @@ func file_pbuf_registry_v1_entities_proto_init() { return nil } } + file_pbuf_registry_v1_entities_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Package); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedProtoFile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Enum); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Service); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Method); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_entities_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageDependency); 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{ @@ -324,7 +1175,7 @@ func file_pbuf_registry_v1_entities_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pbuf_registry_v1_entities_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/pbuf-registry/v1/metadata.pb.go b/gen/pbuf-registry/v1/metadata.pb.go new file mode 100644 index 0000000..ae01f51 --- /dev/null +++ b/gen/pbuf-registry/v1/metadata.pb.go @@ -0,0 +1,241 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: pbuf-registry/v1/metadata.proto + +package v1 + +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 GetMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The module to get metadata for + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The tag id to get metadata for + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *GetMetadataRequest) Reset() { + *x = GetMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataRequest) ProtoMessage() {} + +func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_metadata_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 GetMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetMetadataRequest) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *GetMetadataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetMetadataRequest) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type GetMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The packages in the module + Packages []*Package `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` +} + +func (x *GetMetadataResponse) Reset() { + *x = GetMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pbuf_registry_v1_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataResponse) ProtoMessage() {} + +func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_pbuf_registry_v1_metadata_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 GetMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetMetadataResponse) Descriptor() ([]byte, []int) { + return file_pbuf_registry_v1_metadata_proto_rawDescGZIP(), []int{1} +} + +func (x *GetMetadataResponse) GetPackages() []*Package { + if x != nil { + return x.Packages + } + return nil +} + +var File_pbuf_registry_v1_metadata_proto protoreflect.FileDescriptor + +var file_pbuf_registry_v1_metadata_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 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, 0x1f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x3a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x4b, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x32, 0x84, 0x01, 0x0a, 0x0f, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x2e, + 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x75, 0x66, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, + 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x62, 0x75, 0x66, 0x69, 0x6f, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x63, 0x6c, 0x69, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x75, 0x66, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbuf_registry_v1_metadata_proto_rawDescOnce sync.Once + file_pbuf_registry_v1_metadata_proto_rawDescData = file_pbuf_registry_v1_metadata_proto_rawDesc +) + +func file_pbuf_registry_v1_metadata_proto_rawDescGZIP() []byte { + file_pbuf_registry_v1_metadata_proto_rawDescOnce.Do(func() { + file_pbuf_registry_v1_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbuf_registry_v1_metadata_proto_rawDescData) + }) + return file_pbuf_registry_v1_metadata_proto_rawDescData +} + +var file_pbuf_registry_v1_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pbuf_registry_v1_metadata_proto_goTypes = []interface{}{ + (*GetMetadataRequest)(nil), // 0: pbufregistry.v1.GetMetadataRequest + (*GetMetadataResponse)(nil), // 1: pbufregistry.v1.GetMetadataResponse + (*Package)(nil), // 2: pbufregistry.v1.Package +} +var file_pbuf_registry_v1_metadata_proto_depIdxs = []int32{ + 2, // 0: pbufregistry.v1.GetMetadataResponse.packages:type_name -> pbufregistry.v1.Package + 0, // 1: pbufregistry.v1.MetadataService.GetMetadata:input_type -> pbufregistry.v1.GetMetadataRequest + 1, // 2: pbufregistry.v1.MetadataService.GetMetadata:output_type -> pbufregistry.v1.GetMetadataResponse + 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_pbuf_registry_v1_metadata_proto_init() } +func file_pbuf_registry_v1_metadata_proto_init() { + if File_pbuf_registry_v1_metadata_proto != nil { + return + } + file_pbuf_registry_v1_entities_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbuf_registry_v1_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbuf_registry_v1_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataResponse); 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_pbuf_registry_v1_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pbuf_registry_v1_metadata_proto_goTypes, + DependencyIndexes: file_pbuf_registry_v1_metadata_proto_depIdxs, + MessageInfos: file_pbuf_registry_v1_metadata_proto_msgTypes, + }.Build() + File_pbuf_registry_v1_metadata_proto = out.File + file_pbuf_registry_v1_metadata_proto_rawDesc = nil + file_pbuf_registry_v1_metadata_proto_goTypes = nil + file_pbuf_registry_v1_metadata_proto_depIdxs = nil +} diff --git a/gen/pbuf-registry/v1/metadata_grpc.pb.go b/gen/pbuf-registry/v1/metadata_grpc.pb.go new file mode 100644 index 0000000..134abc8 --- /dev/null +++ b/gen/pbuf-registry/v1/metadata_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: pbuf-registry/v1/metadata.proto + +package v1 + +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 + +const ( + MetadataService_GetMetadata_FullMethodName = "/pbufregistry.v1.MetadataService/GetMetadata" +) + +// MetadataServiceClient is the client API for MetadataService 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 MetadataServiceClient interface { + GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) +} + +type metadataServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMetadataServiceClient(cc grpc.ClientConnInterface) MetadataServiceClient { + return &metadataServiceClient{cc} +} + +func (c *metadataServiceClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { + out := new(GetMetadataResponse) + err := c.cc.Invoke(ctx, MetadataService_GetMetadata_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetadataServiceServer is the server API for MetadataService service. +// All implementations must embed UnimplementedMetadataServiceServer +// for forward compatibility +type MetadataServiceServer interface { + GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) + mustEmbedUnimplementedMetadataServiceServer() +} + +// UnimplementedMetadataServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMetadataServiceServer struct { +} + +func (UnimplementedMetadataServiceServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} +func (UnimplementedMetadataServiceServer) mustEmbedUnimplementedMetadataServiceServer() {} + +// UnsafeMetadataServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MetadataServiceServer will +// result in compilation errors. +type UnsafeMetadataServiceServer interface { + mustEmbedUnimplementedMetadataServiceServer() +} + +func RegisterMetadataServiceServer(s grpc.ServiceRegistrar, srv MetadataServiceServer) { + s.RegisterService(&MetadataService_ServiceDesc, srv) +} + +func _MetadataService_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetadataServiceServer).GetMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetadataService_GetMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetadataServiceServer).GetMetadata(ctx, req.(*GetMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MetadataService_ServiceDesc is the grpc.ServiceDesc for MetadataService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MetadataService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pbufregistry.v1.MetadataService", + HandlerType: (*MetadataServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMetadata", + Handler: _MetadataService_GetMetadata_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pbuf-registry/v1/metadata.proto", +} diff --git a/pbuf.yaml b/pbuf.yaml index b4c8e0a..9de56cd 100644 --- a/pbuf.yaml +++ b/pbuf.yaml @@ -5,7 +5,7 @@ registry: modules: - name: pbufio/pbuf-registry path: api/pbuf-registry - tag: v0.4.0-wip.2 + tag: v0.4.0 out: third_party/pbuf-registry gen_out: gen/pbuf-registry - name: googleapis diff --git a/third_party/google/api/cloudquotas/v1/resources.proto b/third_party/google/api/cloudquotas/v1/resources.proto index d75875c..62829fc 100644 --- a/third_party/google/api/cloudquotas/v1/resources.proto +++ b/third_party/google/api/cloudquotas/v1/resources.proto @@ -93,7 +93,7 @@ message QuotaInfo { // The reset time interval for the quota. Refresh interval applies to rate // quota only. - // Example: “minute” for per minute, “day” for per day, or “10 seconds” for + // Example: "minute" for per minute, "day" for per day, or "10 seconds" for // every 10 seconds. string refresh_interval = 6; @@ -109,7 +109,7 @@ message QuotaInfo { // The display name of the quota. string quota_display_name = 10; - // The unit in which the metric value is reported, e.g., “MByte”. + // The unit in which the metric value is reported, e.g., "MByte". string metric_unit = 11; // Whether it is eligible to request a higher quota value for this quota. @@ -146,8 +146,8 @@ message QuotaIncreaseEligibility { // Default value when is_eligible is true. INELIGIBILITY_REASON_UNSPECIFIED = 0; - // The container is not linked with a billing account. - NO_BILLING_ACCOUNT = 2; + // The container is not linked with a valid billing account. + NO_VALID_BILLING_ACCOUNT = 2; // Other reasons. OTHER = 3; @@ -181,7 +181,7 @@ message QuotaPreference { string name = 1; // The dimensions that this quota preference applies to. The key of the map - // entry is the name of a dimension, such as "region", "zone", “network_id”, + // entry is the name of a dimension, such as "region", "zone", "network_id", // and the value of the map entry is the dimension value. // // If a dimension is missing from the map of dimensions, the quota preference @@ -220,11 +220,28 @@ message QuotaPreference { // quota name is unique in the service. Example: `CpusPerProjectPerRegion` string quota_id = 8 [(google.api.field_behavior) = REQUIRED]; - // Output only. Is the quota preference pending GCP approval and fulfillment. + // Output only. Is the quota preference pending Google Cloud approval and + // fulfillment. bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // The reason / justification for this quota preference. string justification = 11; + + // Optional. Input only. An optional email address that can be used for quota + // related communication between the Google Cloud and the user in case the + // Google Cloud needs further information to make a decision on whether the + // user preferred quota can be granted. + // + // The Google account for the email address must have quota update permission + // for the project, folder or organization this quota preference is for. + // + // If no contact email address is provided, or the provided email address does + // not have the required quota update permission, the quota preference request + // will be denied in case further information is required to make a decision. + string contact_email = 12 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // The preferred quota configuration. @@ -252,10 +269,10 @@ message QuotaConfig { google.protobuf.Int64Value granted_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The trace id that the GCP uses to provision the requested - // quota. This trace id may be used by the client to contact Cloud support to - // track the state of a quota preference request. The trace id is only - // produced for increase requests and is unique for each request. The + // Output only. The trace id that the Google Cloud uses to provision the + // requested quota. This trace id may be used by the client to contact Cloud + // support to track the state of a quota preference request. The trace id is + // only produced for increase requests and is unique for each request. The // quota decrease requests do not have a trace id. string trace_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/third_party/pbuf-registry/v1/entities.proto b/third_party/pbuf-registry/v1/entities.proto index d20c9f1..e3cc749 100644 --- a/third_party/pbuf-registry/v1/entities.proto +++ b/third_party/pbuf-registry/v1/entities.proto @@ -38,4 +38,128 @@ message Dependency { // The tag of the dependency. string tag = 2; +} + +// Package is a proto file package used in a module +message Package { + // The name of the package. + string name = 1; + + // The proto files of the package. + repeated ParsedProtoFile proto_files = 2; + + // The dependencies of the package. + repeated PackageDependency dependencies = 3; +} + +// ParsedProtoFile is a proto file parsed by the registry +// contains information about messages and services in the proto file +message ParsedProtoFile { + // The filename of the proto file. + string filename = 1; + + // The messages in the proto file. + repeated Message messages = 2; + + // The services in the proto file. + repeated Service services = 3; +} + +// Message is a message in a proto file. +message Message { + // The name of the message. + string name = 1; + + // The fields of the message. + repeated Field fields = 2; + + // The nested messages of the message. + repeated Message nested_messages = 3; + + // The nested enums of the message. + repeated Enum nested_enums = 4; +} + +// Field is a field in a message. +message Field { + // The name of the field. + string name = 1; + + // The message_type of the field. + string message_type = 2; + + // The tag of the field. + int32 tag = 3; + + // The repeated flag of the field. + bool repeated = 4; + + // The map flag of the field. + bool map = 5; + + // The oneof flag of the field. + bool oneof = 6; + + // The optional flag of the field. + bool optional = 7; + + // The required flag of the field. + bool required = 8; + + // The one of names of the field + repeated string oneof_names = 9; + + // The one of types of the field + repeated string oneof_types = 10; + + // The map key type of the field. + string map_key_type = 11; + + // The map value type of the field. + string map_value_type = 12; +} + +// Enum is an enum in a proto file. +message Enum { + // The name of the enum. + string name = 1; + + // The values of the enum. + repeated EnumValue values = 2; +} + +// EnumValue is a value in an enum. +message EnumValue { + // The name of the value. + string name = 1; + + // The tag of the value. + int32 tag = 2; +} + +// Service is a service in a proto file. +message Service { + // The name of the service. + string name = 1; + + // The methods of the service. + repeated Method methods = 2; +} + +// Method is a method in a service. +message Method { + // The name of the method. + string name = 1; + + // The input type of the method. + string input_type = 2; + + // The output type of the method. + string output_type = 3; +} + +// PackageDependency is a dependency of a package. +message PackageDependency { + // The name of the dependency. + string name = 1; } \ No newline at end of file diff --git a/third_party/pbuf-registry/v1/metadata.proto b/third_party/pbuf-registry/v1/metadata.proto new file mode 100644 index 0000000..2fa1ad7 --- /dev/null +++ b/third_party/pbuf-registry/v1/metadata.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package pbufregistry.v1; + +import "google/api/annotations.proto"; +import "pbuf-registry/v1/entities.proto"; + +option go_package = "github.com/pbufio/pbuf-cli/gen/pbuf-registry/v1;v1"; + +// The metadata service must return parsed information +service MetadataService { + rpc GetMetadata(GetMetadataRequest) returns (GetMetadataResponse) { + option (google.api.http) = { + post: "/v1/metadata" + body: "*" + }; + } +} + +message GetMetadataRequest { + // The module to get metadata for + string name = 1; + + // The tag id to get metadata for + string tag = 2; +} + +message GetMetadataResponse { + // The packages in the module + repeated Package packages = 1; +} \ No newline at end of file