From e16cc543b9bb875b02d10b4cfa015ebd3050ea22 Mon Sep 17 00:00:00 2001 From: Leonardo Cecchi Date: Wed, 17 Jan 2024 17:03:49 +0100 Subject: [PATCH] feat: add plugin metadata (#7) Closes: #4 Signed-off-by: Leonardo Cecchi Signed-off-by: Gabriele Bartolini Co-authored-by: Gabriele Bartolini --- pkg/identity/identity.pb.go | 293 +++++++++++++++++++++---------- pkg/identity/identity_grpc.pb.go | 34 ++-- proto/identity.proto | 39 +++- 3 files changed, 246 insertions(+), 120 deletions(-) diff --git a/pkg/identity/identity.pb.go b/pkg/identity/identity.pb.go index 74830e6..96d6a74 100644 --- a/pkg/identity/identity.pb.go +++ b/pkg/identity/identity.pb.go @@ -79,14 +79,14 @@ func (PluginCapability_Service_Type) EnumDescriptor() ([]byte, []int) { return file_proto_identity_proto_rawDescGZIP(), []int{4, 0, 0} } -type GetPluginInfoRequest struct { +type GetPluginMetadataRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *GetPluginInfoRequest) Reset() { - *x = GetPluginInfoRequest{} +func (x *GetPluginMetadataRequest) Reset() { + *x = GetPluginMetadataRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_identity_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -94,13 +94,13 @@ func (x *GetPluginInfoRequest) Reset() { } } -func (x *GetPluginInfoRequest) String() string { +func (x *GetPluginMetadataRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPluginInfoRequest) ProtoMessage() {} +func (*GetPluginMetadataRequest) ProtoMessage() {} -func (x *GetPluginInfoRequest) ProtoReflect() protoreflect.Message { +func (x *GetPluginMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_identity_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -112,12 +112,12 @@ func (x *GetPluginInfoRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPluginInfoRequest.ProtoReflect.Descriptor instead. -func (*GetPluginInfoRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPluginMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetPluginMetadataRequest) Descriptor() ([]byte, []int) { return file_proto_identity_proto_rawDescGZIP(), []int{0} } -type GetPluginInfoResponse struct { +type GetPluginMetadataResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -131,13 +131,31 @@ type GetPluginInfoResponse struct { // alphanumerics between. This field is REQUIRED. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // This field is REQUIRED. Value of this field is opaque. - VendorVersion string `protobuf:"bytes,2,opt,name=vendor_version,json=vendorVersion,proto3" json:"vendor_version,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // A name to display for the plugin. This field is REQUIRED. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // A description for the plugin. This field is REQUIRED. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // URL of the home page of the plugin project. + ProjectUrl string `protobuf:"bytes,5,opt,name=project_url,json=projectUrl,proto3" json:"project_url,omitempty"` + // URL of the source code repository for the plugin project. + RepositoryUrl string `protobuf:"bytes,6,opt,name=repository_url,json=repositoryUrl,proto3" json:"repository_url,omitempty"` + // License of the plugin. This field is REQUIRED. + License string `protobuf:"bytes,7,opt,name=license,proto3" json:"license,omitempty"` + // URL of the license of the plugin. This field is REQUIRED. + LicenseUrl string `protobuf:"bytes,8,opt,name=license_url,json=licenseUrl,proto3" json:"license_url,omitempty"` + // Maturity level (alpha, beta, stable) + Maturity string `protobuf:"bytes,9,opt,name=maturity,proto3" json:"maturity,omitempty"` + // Provider/vendor of the plugin, e.g. an organization + Vendor string `protobuf:"bytes,10,opt,name=vendor,proto3" json:"vendor,omitempty"` + // A list of human or organizational entities maintaining the plugin + Maintainers []string `protobuf:"bytes,11,rep,name=maintainers,proto3" json:"maintainers,omitempty"` // This field is OPTIONAL. Values are opaque. - Manifest map[string]string `protobuf:"bytes,3,rep,name=manifest,proto3" json:"manifest,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Manifest map[string]string `protobuf:"bytes,12,rep,name=manifest,proto3" json:"manifest,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *GetPluginInfoResponse) Reset() { - *x = GetPluginInfoResponse{} +func (x *GetPluginMetadataResponse) Reset() { + *x = GetPluginMetadataResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_identity_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -145,13 +163,13 @@ func (x *GetPluginInfoResponse) Reset() { } } -func (x *GetPluginInfoResponse) String() string { +func (x *GetPluginMetadataResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPluginInfoResponse) ProtoMessage() {} +func (*GetPluginMetadataResponse) ProtoMessage() {} -func (x *GetPluginInfoResponse) ProtoReflect() protoreflect.Message { +func (x *GetPluginMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_identity_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -163,26 +181,89 @@ func (x *GetPluginInfoResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPluginInfoResponse.ProtoReflect.Descriptor instead. -func (*GetPluginInfoResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPluginMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetPluginMetadataResponse) Descriptor() ([]byte, []int) { return file_proto_identity_proto_rawDescGZIP(), []int{1} } -func (x *GetPluginInfoResponse) GetName() string { +func (x *GetPluginMetadataResponse) GetName() string { if x != nil { return x.Name } return "" } -func (x *GetPluginInfoResponse) GetVendorVersion() string { +func (x *GetPluginMetadataResponse) GetVersion() string { if x != nil { - return x.VendorVersion + return x.Version } return "" } -func (x *GetPluginInfoResponse) GetManifest() map[string]string { +func (x *GetPluginMetadataResponse) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *GetPluginMetadataResponse) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *GetPluginMetadataResponse) GetProjectUrl() string { + if x != nil { + return x.ProjectUrl + } + return "" +} + +func (x *GetPluginMetadataResponse) GetRepositoryUrl() string { + if x != nil { + return x.RepositoryUrl + } + return "" +} + +func (x *GetPluginMetadataResponse) GetLicense() string { + if x != nil { + return x.License + } + return "" +} + +func (x *GetPluginMetadataResponse) GetLicenseUrl() string { + if x != nil { + return x.LicenseUrl + } + return "" +} + +func (x *GetPluginMetadataResponse) GetMaturity() string { + if x != nil { + return x.Maturity + } + return "" +} + +func (x *GetPluginMetadataResponse) GetVendor() string { + if x != nil { + return x.Vendor + } + return "" +} + +func (x *GetPluginMetadataResponse) GetMaintainers() []string { + if x != nil { + return x.Maintainers + } + return nil +} + +func (x *GetPluginMetadataResponse) GetManifest() map[string]string { if x != nil { return x.Manifest } @@ -484,75 +565,93 @@ var File_proto_identity_proto protoreflect.FileDescriptor var file_proto_identity_proto_rawDesc = []byte{ 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, - 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 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, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x18, + 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x74, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x20, 0x0a, + 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, + 0x56, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6e, + 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x84, + 0x02, 0x0a, 0x10, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x12, 0x47, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x9e, 0x01, 0x0a, + 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, + 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, + 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x42, 0x06, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0xc8, 0x02, 0x0a, + 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x70, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x47, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, - 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x63, 0x6e, 0x70, 0x67, - 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x4d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, - 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, - 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, - 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, - 0xbc, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x2e, - 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, - 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x4c, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6e, 0x70, 0x67, - 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6e, 0x70, - 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, - 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, 0x67, - 0x2d, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x05, 0x50, 0x72, 0x6f, + 0x62, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, 0x67, 0x2d, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -571,25 +670,25 @@ var file_proto_identity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proto_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_proto_identity_proto_goTypes = []interface{}{ (PluginCapability_Service_Type)(0), // 0: cnpgi.identity.v1.PluginCapability.Service.Type - (*GetPluginInfoRequest)(nil), // 1: cnpgi.identity.v1.GetPluginInfoRequest - (*GetPluginInfoResponse)(nil), // 2: cnpgi.identity.v1.GetPluginInfoResponse + (*GetPluginMetadataRequest)(nil), // 1: cnpgi.identity.v1.GetPluginMetadataRequest + (*GetPluginMetadataResponse)(nil), // 2: cnpgi.identity.v1.GetPluginMetadataResponse (*GetPluginCapabilitiesRequest)(nil), // 3: cnpgi.identity.v1.GetPluginCapabilitiesRequest (*GetPluginCapabilitiesResponse)(nil), // 4: cnpgi.identity.v1.GetPluginCapabilitiesResponse (*PluginCapability)(nil), // 5: cnpgi.identity.v1.PluginCapability (*ProbeRequest)(nil), // 6: cnpgi.identity.v1.ProbeRequest (*ProbeResponse)(nil), // 7: cnpgi.identity.v1.ProbeResponse - nil, // 8: cnpgi.identity.v1.GetPluginInfoResponse.ManifestEntry + nil, // 8: cnpgi.identity.v1.GetPluginMetadataResponse.ManifestEntry (*PluginCapability_Service)(nil), // 9: cnpgi.identity.v1.PluginCapability.Service } var file_proto_identity_proto_depIdxs = []int32{ - 8, // 0: cnpgi.identity.v1.GetPluginInfoResponse.manifest:type_name -> cnpgi.identity.v1.GetPluginInfoResponse.ManifestEntry + 8, // 0: cnpgi.identity.v1.GetPluginMetadataResponse.manifest:type_name -> cnpgi.identity.v1.GetPluginMetadataResponse.ManifestEntry 5, // 1: cnpgi.identity.v1.GetPluginCapabilitiesResponse.capabilities:type_name -> cnpgi.identity.v1.PluginCapability 9, // 2: cnpgi.identity.v1.PluginCapability.service:type_name -> cnpgi.identity.v1.PluginCapability.Service 0, // 3: cnpgi.identity.v1.PluginCapability.Service.type:type_name -> cnpgi.identity.v1.PluginCapability.Service.Type - 1, // 4: cnpgi.identity.v1.Identity.GetPluginInfo:input_type -> cnpgi.identity.v1.GetPluginInfoRequest + 1, // 4: cnpgi.identity.v1.Identity.GetPluginMetadata:input_type -> cnpgi.identity.v1.GetPluginMetadataRequest 3, // 5: cnpgi.identity.v1.Identity.GetPluginCapabilities:input_type -> cnpgi.identity.v1.GetPluginCapabilitiesRequest 6, // 6: cnpgi.identity.v1.Identity.Probe:input_type -> cnpgi.identity.v1.ProbeRequest - 2, // 7: cnpgi.identity.v1.Identity.GetPluginInfo:output_type -> cnpgi.identity.v1.GetPluginInfoResponse + 2, // 7: cnpgi.identity.v1.Identity.GetPluginMetadata:output_type -> cnpgi.identity.v1.GetPluginMetadataResponse 4, // 8: cnpgi.identity.v1.Identity.GetPluginCapabilities:output_type -> cnpgi.identity.v1.GetPluginCapabilitiesResponse 7, // 9: cnpgi.identity.v1.Identity.Probe:output_type -> cnpgi.identity.v1.ProbeResponse 7, // [7:10] is the sub-list for method output_type @@ -606,7 +705,7 @@ func file_proto_identity_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_identity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPluginInfoRequest); i { + switch v := v.(*GetPluginMetadataRequest); i { case 0: return &v.state case 1: @@ -618,7 +717,7 @@ func file_proto_identity_proto_init() { } } file_proto_identity_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPluginInfoResponse); i { + switch v := v.(*GetPluginMetadataResponse); i { case 0: return &v.state case 1: diff --git a/pkg/identity/identity_grpc.pb.go b/pkg/identity/identity_grpc.pb.go index b66d443..c3d609c 100644 --- a/pkg/identity/identity_grpc.pb.go +++ b/pkg/identity/identity_grpc.pb.go @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Identity_GetPluginInfo_FullMethodName = "/cnpgi.identity.v1.Identity/GetPluginInfo" + Identity_GetPluginMetadata_FullMethodName = "/cnpgi.identity.v1.Identity/GetPluginMetadata" Identity_GetPluginCapabilities_FullMethodName = "/cnpgi.identity.v1.Identity/GetPluginCapabilities" Identity_Probe_FullMethodName = "/cnpgi.identity.v1.Identity/Probe" ) @@ -28,8 +28,8 @@ const ( // // 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 IdentityClient interface { - // GetPluginInfo gets the plugin metadata - GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) + // GetPluginMetadata gets the plugin metadata + GetPluginMetadata(ctx context.Context, in *GetPluginMetadataRequest, opts ...grpc.CallOption) (*GetPluginMetadataResponse, error) // GetPluginCapabilities gets information about this plugin GetPluginCapabilities(ctx context.Context, in *GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*GetPluginCapabilitiesResponse, error) // Probe is used to tell if the plugin is ready to receive requests @@ -44,9 +44,9 @@ func NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient { return &identityClient{cc} } -func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) { - out := new(GetPluginInfoResponse) - err := c.cc.Invoke(ctx, Identity_GetPluginInfo_FullMethodName, in, out, opts...) +func (c *identityClient) GetPluginMetadata(ctx context.Context, in *GetPluginMetadataRequest, opts ...grpc.CallOption) (*GetPluginMetadataResponse, error) { + out := new(GetPluginMetadataResponse) + err := c.cc.Invoke(ctx, Identity_GetPluginMetadata_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -75,8 +75,8 @@ func (c *identityClient) Probe(ctx context.Context, in *ProbeRequest, opts ...gr // All implementations must embed UnimplementedIdentityServer // for forward compatibility type IdentityServer interface { - // GetPluginInfo gets the plugin metadata - GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error) + // GetPluginMetadata gets the plugin metadata + GetPluginMetadata(context.Context, *GetPluginMetadataRequest) (*GetPluginMetadataResponse, error) // GetPluginCapabilities gets information about this plugin GetPluginCapabilities(context.Context, *GetPluginCapabilitiesRequest) (*GetPluginCapabilitiesResponse, error) // Probe is used to tell if the plugin is ready to receive requests @@ -88,8 +88,8 @@ type IdentityServer interface { type UnimplementedIdentityServer struct { } -func (UnimplementedIdentityServer) GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPluginInfo not implemented") +func (UnimplementedIdentityServer) GetPluginMetadata(context.Context, *GetPluginMetadataRequest) (*GetPluginMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPluginMetadata not implemented") } func (UnimplementedIdentityServer) GetPluginCapabilities(context.Context, *GetPluginCapabilitiesRequest) (*GetPluginCapabilitiesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPluginCapabilities not implemented") @@ -110,20 +110,20 @@ func RegisterIdentityServer(s grpc.ServiceRegistrar, srv IdentityServer) { s.RegisterService(&Identity_ServiceDesc, srv) } -func _Identity_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPluginInfoRequest) +func _Identity_GetPluginMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPluginMetadataRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(IdentityServer).GetPluginInfo(ctx, in) + return srv.(IdentityServer).GetPluginMetadata(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Identity_GetPluginInfo_FullMethodName, + FullMethod: Identity_GetPluginMetadata_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdentityServer).GetPluginInfo(ctx, req.(*GetPluginInfoRequest)) + return srv.(IdentityServer).GetPluginMetadata(ctx, req.(*GetPluginMetadataRequest)) } return interceptor(ctx, in, info, handler) } @@ -172,8 +172,8 @@ var Identity_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*IdentityServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetPluginInfo", - Handler: _Identity_GetPluginInfo_Handler, + MethodName: "GetPluginMetadata", + Handler: _Identity_GetPluginMetadata_Handler, }, { MethodName: "GetPluginCapabilities", diff --git a/proto/identity.proto b/proto/identity.proto index a4ea742..c7945d0 100644 --- a/proto/identity.proto +++ b/proto/identity.proto @@ -3,8 +3,8 @@ package cnpgi.identity.v1; option go_package = "github.com/cloudnative-pg/cnpg-i/pkg/identity"; service Identity { - // GetPluginInfo gets the plugin metadata - rpc GetPluginInfo(GetPluginInfoRequest) returns (GetPluginInfoResponse) {} + // GetPluginMetadata gets the plugin metadata + rpc GetPluginMetadata(GetPluginMetadataRequest) returns (GetPluginMetadataResponse) {} // GetPluginCapabilities gets information about this plugin rpc GetPluginCapabilities(GetPluginCapabilitiesRequest) returns (GetPluginCapabilitiesResponse) {} @@ -13,11 +13,11 @@ service Identity { rpc Probe (ProbeRequest) returns (ProbeResponse) {} } -message GetPluginInfoRequest { +message GetPluginMetadataRequest { // Intentionally empty. } -message GetPluginInfoResponse { +message GetPluginMetadataResponse { // The name MUST follow domain name notation format // (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD // include the plugin's host company name and the plugin name, @@ -28,10 +28,37 @@ message GetPluginInfoResponse { string name = 1; // This field is REQUIRED. Value of this field is opaque. - string vendor_version = 2; + string version = 2; + + // A name to display for the plugin. This field is REQUIRED. + string display_name = 3; + + // A description for the plugin. This field is REQUIRED. + string description = 4; + + // URL of the home page of the plugin project. + string project_url = 5; + + // URL of the source code repository for the plugin project. + string repository_url = 6; + + // License of the plugin. This field is REQUIRED. + string license = 7; + + // URL of the license of the plugin. This field is REQUIRED. + string license_url = 8; + + // Maturity level (alpha, beta, stable) + string maturity = 9; + + // Provider/vendor of the plugin, e.g. an organization + string vendor = 10; + + // A list of human or organizational entities maintaining the plugin + repeated string maintainers = 11; // This field is OPTIONAL. Values are opaque. - map manifest = 3; + map manifest = 12; } message GetPluginCapabilitiesRequest {