Ver código fonte

protocol options

shao 4 dias atrás
pai
commit
8ccea9ff2a

+ 0 - 14
dr_basic_idl.proto

@@ -1,14 +0,0 @@
-syntax = "proto3";
-
-option go_package = "dr_basic_pb/";
-
-package dr.basic;
-
-import "google/protobuf/any.proto";
-
-message HttpResponse {
-  string code = 1;
-  string description = 2;
-  string solution = 3;
-  google.protobuf.Any data = 4;
-}

+ 17 - 1
dr_protocol_idl.proto

@@ -4,7 +4,8 @@ option go_package = "dr_protocol_pb/";
 
 package dr.protocol;
 
-import "google/protobuf/struct.proto"; // 导入用于处理 JSON 的 struct.proto
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
 
 message EmptyRequest {}
 
@@ -13,8 +14,23 @@ message IDRequest {
   optional string instance_id = 2;
 }
 
+message OptionRequest {
+  string group = 1;
+  string flag = 2;
+}
+
+message Option {
+  string text = 1;
+  google.protobuf.Any value = 2;
+}
+
+message OptionReply {
+  repeated Option option = 1;
+}
+
 service Basic {
   rpc SoftwareInfo (EmptyRequest) returns (SoftwareInfoReply) {}
+  rpc GetOptions (OptionRequest) returns (OptionReply) {}
 }
 
 message SoftwareInfoReply {

+ 267 - 100
dr_protocol_pb/dr_protocol_idl.pb.go

@@ -9,6 +9,7 @@ package dr_protocol_pb
 import (
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	anypb "google.golang.org/protobuf/types/known/anypb"
 	structpb "google.golang.org/protobuf/types/known/structpb"
 	reflect "reflect"
 	sync "sync"
@@ -110,6 +111,154 @@ func (x *IDRequest) GetInstanceId() string {
 	return ""
 }
 
+type OptionRequest struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	Group         string                 `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
+	Flag          string                 `protobuf:"bytes,2,opt,name=flag,proto3" json:"flag,omitempty"`
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *OptionRequest) Reset() {
+	*x = OptionRequest{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[2]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *OptionRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OptionRequest) ProtoMessage() {}
+
+func (x *OptionRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[2]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OptionRequest.ProtoReflect.Descriptor instead.
+func (*OptionRequest) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *OptionRequest) GetGroup() string {
+	if x != nil {
+		return x.Group
+	}
+	return ""
+}
+
+func (x *OptionRequest) GetFlag() string {
+	if x != nil {
+		return x.Flag
+	}
+	return ""
+}
+
+type Option struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	Text          string                 `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
+	Value         *anypb.Any             `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *Option) Reset() {
+	*x = Option{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[3]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *Option) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Option) ProtoMessage() {}
+
+func (x *Option) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[3]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Option.ProtoReflect.Descriptor instead.
+func (*Option) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Option) GetText() string {
+	if x != nil {
+		return x.Text
+	}
+	return ""
+}
+
+func (x *Option) GetValue() *anypb.Any {
+	if x != nil {
+		return x.Value
+	}
+	return nil
+}
+
+type OptionReply struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	Option        []*Option              `protobuf:"bytes,1,rep,name=option,proto3" json:"option,omitempty"`
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *OptionReply) Reset() {
+	*x = OptionReply{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[4]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *OptionReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OptionReply) ProtoMessage() {}
+
+func (x *OptionReply) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[4]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OptionReply.ProtoReflect.Descriptor instead.
+func (*OptionReply) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *OptionReply) GetOption() []*Option {
+	if x != nil {
+		return x.Option
+	}
+	return nil
+}
+
 type SoftwareInfoReply struct {
 	state         protoimpl.MessageState `protogen:"open.v1"`
 	Module        string                 `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
@@ -122,7 +271,7 @@ type SoftwareInfoReply struct {
 
 func (x *SoftwareInfoReply) Reset() {
 	*x = SoftwareInfoReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[2]
+	mi := &file_dr_protocol_idl_proto_msgTypes[5]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -134,7 +283,7 @@ func (x *SoftwareInfoReply) String() string {
 func (*SoftwareInfoReply) ProtoMessage() {}
 
 func (x *SoftwareInfoReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[2]
+	mi := &file_dr_protocol_idl_proto_msgTypes[5]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -147,7 +296,7 @@ func (x *SoftwareInfoReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use SoftwareInfoReply.ProtoReflect.Descriptor instead.
 func (*SoftwareInfoReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{2}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{5}
 }
 
 func (x *SoftwareInfoReply) GetModule() string {
@@ -188,7 +337,7 @@ type PatientTypeRequest struct {
 
 func (x *PatientTypeRequest) Reset() {
 	*x = PatientTypeRequest{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[3]
+	mi := &file_dr_protocol_idl_proto_msgTypes[6]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -200,7 +349,7 @@ func (x *PatientTypeRequest) String() string {
 func (*PatientTypeRequest) ProtoMessage() {}
 
 func (x *PatientTypeRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[3]
+	mi := &file_dr_protocol_idl_proto_msgTypes[6]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -213,7 +362,7 @@ func (x *PatientTypeRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use PatientTypeRequest.ProtoReflect.Descriptor instead.
 func (*PatientTypeRequest) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{3}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{6}
 }
 
 func (x *PatientTypeRequest) GetIsEnabled() bool {
@@ -247,7 +396,7 @@ type PatientType struct {
 
 func (x *PatientType) Reset() {
 	*x = PatientType{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[4]
+	mi := &file_dr_protocol_idl_proto_msgTypes[7]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -259,7 +408,7 @@ func (x *PatientType) String() string {
 func (*PatientType) ProtoMessage() {}
 
 func (x *PatientType) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[4]
+	mi := &file_dr_protocol_idl_proto_msgTypes[7]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -272,7 +421,7 @@ func (x *PatientType) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use PatientType.ProtoReflect.Descriptor instead.
 func (*PatientType) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{4}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *PatientType) GetId() uint64 {
@@ -347,7 +496,7 @@ type PatientTypeReply struct {
 
 func (x *PatientTypeReply) Reset() {
 	*x = PatientTypeReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[5]
+	mi := &file_dr_protocol_idl_proto_msgTypes[8]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -359,7 +508,7 @@ func (x *PatientTypeReply) String() string {
 func (*PatientTypeReply) ProtoMessage() {}
 
 func (x *PatientTypeReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[5]
+	mi := &file_dr_protocol_idl_proto_msgTypes[8]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -372,7 +521,7 @@ func (x *PatientTypeReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use PatientTypeReply.ProtoReflect.Descriptor instead.
 func (*PatientTypeReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{5}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{8}
 }
 
 func (x *PatientTypeReply) GetPatientTypeList() []*PatientType {
@@ -394,7 +543,7 @@ type BodyPartRequest struct {
 
 func (x *BodyPartRequest) Reset() {
 	*x = BodyPartRequest{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[6]
+	mi := &file_dr_protocol_idl_proto_msgTypes[9]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -406,7 +555,7 @@ func (x *BodyPartRequest) String() string {
 func (*BodyPartRequest) ProtoMessage() {}
 
 func (x *BodyPartRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[6]
+	mi := &file_dr_protocol_idl_proto_msgTypes[9]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -419,7 +568,7 @@ func (x *BodyPartRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use BodyPartRequest.ProtoReflect.Descriptor instead.
 func (*BodyPartRequest) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{6}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{9}
 }
 
 func (x *BodyPartRequest) GetPatientType() string {
@@ -469,7 +618,7 @@ type BodyPart struct {
 
 func (x *BodyPart) Reset() {
 	*x = BodyPart{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[7]
+	mi := &file_dr_protocol_idl_proto_msgTypes[10]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -481,7 +630,7 @@ func (x *BodyPart) String() string {
 func (*BodyPart) ProtoMessage() {}
 
 func (x *BodyPart) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[7]
+	mi := &file_dr_protocol_idl_proto_msgTypes[10]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -494,7 +643,7 @@ func (x *BodyPart) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use BodyPart.ProtoReflect.Descriptor instead.
 func (*BodyPart) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{7}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *BodyPart) GetId() uint64 {
@@ -583,7 +732,7 @@ type BodyPartReply struct {
 
 func (x *BodyPartReply) Reset() {
 	*x = BodyPartReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[8]
+	mi := &file_dr_protocol_idl_proto_msgTypes[11]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -595,7 +744,7 @@ func (x *BodyPartReply) String() string {
 func (*BodyPartReply) ProtoMessage() {}
 
 func (x *BodyPartReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[8]
+	mi := &file_dr_protocol_idl_proto_msgTypes[11]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -608,7 +757,7 @@ func (x *BodyPartReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use BodyPartReply.ProtoReflect.Descriptor instead.
 func (*BodyPartReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{8}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{11}
 }
 
 func (x *BodyPartReply) GetBodyPartList() []*BodyPart {
@@ -631,7 +780,7 @@ type ProcedureRequest struct {
 
 func (x *ProcedureRequest) Reset() {
 	*x = ProcedureRequest{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[9]
+	mi := &file_dr_protocol_idl_proto_msgTypes[12]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -643,7 +792,7 @@ func (x *ProcedureRequest) String() string {
 func (*ProcedureRequest) ProtoMessage() {}
 
 func (x *ProcedureRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[9]
+	mi := &file_dr_protocol_idl_proto_msgTypes[12]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -656,7 +805,7 @@ func (x *ProcedureRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ProcedureRequest.ProtoReflect.Descriptor instead.
 func (*ProcedureRequest) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{9}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{12}
 }
 
 func (x *ProcedureRequest) GetPatientType() string {
@@ -721,7 +870,7 @@ type Procedure struct {
 
 func (x *Procedure) Reset() {
 	*x = Procedure{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[10]
+	mi := &file_dr_protocol_idl_proto_msgTypes[13]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -733,7 +882,7 @@ func (x *Procedure) String() string {
 func (*Procedure) ProtoMessage() {}
 
 func (x *Procedure) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[10]
+	mi := &file_dr_protocol_idl_proto_msgTypes[13]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -746,7 +895,7 @@ func (x *Procedure) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Procedure.ProtoReflect.Descriptor instead.
 func (*Procedure) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{10}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{13}
 }
 
 func (x *Procedure) GetId() uint64 {
@@ -891,7 +1040,7 @@ type ProcedureReply struct {
 
 func (x *ProcedureReply) Reset() {
 	*x = ProcedureReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[11]
+	mi := &file_dr_protocol_idl_proto_msgTypes[14]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -903,7 +1052,7 @@ func (x *ProcedureReply) String() string {
 func (*ProcedureReply) ProtoMessage() {}
 
 func (x *ProcedureReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[11]
+	mi := &file_dr_protocol_idl_proto_msgTypes[14]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -916,7 +1065,7 @@ func (x *ProcedureReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ProcedureReply.ProtoReflect.Descriptor instead.
 func (*ProcedureReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{11}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{14}
 }
 
 func (x *ProcedureReply) GetProcedureList() []*Procedure {
@@ -940,7 +1089,7 @@ type ViewRequest struct {
 
 func (x *ViewRequest) Reset() {
 	*x = ViewRequest{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[12]
+	mi := &file_dr_protocol_idl_proto_msgTypes[15]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -952,7 +1101,7 @@ func (x *ViewRequest) String() string {
 func (*ViewRequest) ProtoMessage() {}
 
 func (x *ViewRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[12]
+	mi := &file_dr_protocol_idl_proto_msgTypes[15]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -965,7 +1114,7 @@ func (x *ViewRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ViewRequest.ProtoReflect.Descriptor instead.
 func (*ViewRequest) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{12}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{15}
 }
 
 func (x *ViewRequest) GetPatientType() string {
@@ -1041,7 +1190,7 @@ type View struct {
 
 func (x *View) Reset() {
 	*x = View{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[13]
+	mi := &file_dr_protocol_idl_proto_msgTypes[16]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -1053,7 +1202,7 @@ func (x *View) String() string {
 func (*View) ProtoMessage() {}
 
 func (x *View) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[13]
+	mi := &file_dr_protocol_idl_proto_msgTypes[16]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1066,7 +1215,7 @@ func (x *View) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use View.ProtoReflect.Descriptor instead.
 func (*View) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{13}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{16}
 }
 
 func (x *View) GetInternalId() string {
@@ -1239,7 +1388,7 @@ type ViewReply struct {
 
 func (x *ViewReply) Reset() {
 	*x = ViewReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[14]
+	mi := &file_dr_protocol_idl_proto_msgTypes[17]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -1251,7 +1400,7 @@ func (x *ViewReply) String() string {
 func (*ViewReply) ProtoMessage() {}
 
 func (x *ViewReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[14]
+	mi := &file_dr_protocol_idl_proto_msgTypes[17]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1264,7 +1413,7 @@ func (x *ViewReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ViewReply.ProtoReflect.Descriptor instead.
 func (*ViewReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{14}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{17}
 }
 
 func (x *ViewReply) GetViewList() []*View {
@@ -1285,7 +1434,7 @@ type AprRequest struct {
 
 func (x *AprRequest) Reset() {
 	*x = AprRequest{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[15]
+	mi := &file_dr_protocol_idl_proto_msgTypes[18]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -1297,7 +1446,7 @@ func (x *AprRequest) String() string {
 func (*AprRequest) ProtoMessage() {}
 
 func (x *AprRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[15]
+	mi := &file_dr_protocol_idl_proto_msgTypes[18]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1310,7 +1459,7 @@ func (x *AprRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AprRequest.ProtoReflect.Descriptor instead.
 func (*AprRequest) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{15}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{18}
 }
 
 func (x *AprRequest) GetViewId() string {
@@ -1345,7 +1494,7 @@ type AprSub struct {
 
 func (x *AprSub) Reset() {
 	*x = AprSub{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[16]
+	mi := &file_dr_protocol_idl_proto_msgTypes[19]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -1357,7 +1506,7 @@ func (x *AprSub) String() string {
 func (*AprSub) ProtoMessage() {}
 
 func (x *AprSub) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[16]
+	mi := &file_dr_protocol_idl_proto_msgTypes[19]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1370,7 +1519,7 @@ func (x *AprSub) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AprSub.ProtoReflect.Descriptor instead.
 func (*AprSub) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{16}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{19}
 }
 
 func (x *AprSub) GetWorkStationId() int32 {
@@ -1415,7 +1564,7 @@ type AprReply struct {
 
 func (x *AprReply) Reset() {
 	*x = AprReply{}
-	mi := &file_dr_protocol_idl_proto_msgTypes[17]
+	mi := &file_dr_protocol_idl_proto_msgTypes[20]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -1427,7 +1576,7 @@ func (x *AprReply) String() string {
 func (*AprReply) ProtoMessage() {}
 
 func (x *AprReply) ProtoReflect() protoreflect.Message {
-	mi := &file_dr_protocol_idl_proto_msgTypes[17]
+	mi := &file_dr_protocol_idl_proto_msgTypes[20]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1440,7 +1589,7 @@ func (x *AprReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AprReply.ProtoReflect.Descriptor instead.
 func (*AprReply) Descriptor() ([]byte, []int) {
-	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{17}
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{20}
 }
 
 func (x *AprReply) GetAprId() string {
@@ -1538,14 +1687,22 @@ var File_dr_protocol_idl_proto protoreflect.FileDescriptor
 
 const file_dr_protocol_idl_proto_rawDesc = "" +
 	"\n" +
-	"\x15dr_protocol_idl.proto\x12\vdr.protocol\x1a\x1cgoogle/protobuf/struct.proto\"\x0e\n" +
+	"\x15dr_protocol_idl.proto\x12\vdr.protocol\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x0e\n" +
 	"\fEmptyRequest\"]\n" +
 	"\tIDRequest\x12\x13\n" +
 	"\x02id\x18\x01 \x01(\rH\x00R\x02id\x88\x01\x01\x12$\n" +
 	"\vinstance_id\x18\x02 \x01(\tH\x01R\n" +
 	"instanceId\x88\x01\x01B\x05\n" +
 	"\x03_idB\x0e\n" +
-	"\f_instance_id\"o\n" +
+	"\f_instance_id\"9\n" +
+	"\rOptionRequest\x12\x14\n" +
+	"\x05group\x18\x01 \x01(\tR\x05group\x12\x12\n" +
+	"\x04flag\x18\x02 \x01(\tR\x04flag\"H\n" +
+	"\x06Option\x12\x12\n" +
+	"\x04text\x18\x01 \x01(\tR\x04text\x12*\n" +
+	"\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value\":\n" +
+	"\vOptionReply\x12+\n" +
+	"\x06option\x18\x01 \x03(\v2\x13.dr.protocol.OptionR\x06option\"o\n" +
 	"\x11SoftwareInfoReply\x12\x16\n" +
 	"\x06module\x18\x01 \x01(\tR\x06module\x12\x12\n" +
 	"\x04desc\x18\x02 \x01(\tR\x04desc\x12\x14\n" +
@@ -1711,9 +1868,11 @@ const file_dr_protocol_idl_proto_rawDesc = "" +
 	"\n" +
 	"is_enabled\x18\v \x01(\bR\tisEnabled\x12\x18\n" +
 	"\aproduct\x18\f \x01(\tR\aproduct\x12$\n" +
-	"\x0eis_pre_install\x18\r \x01(\bR\fisPreInstall2T\n" +
+	"\x0eis_pre_install\x18\r \x01(\bR\fisPreInstall2\x9a\x01\n" +
 	"\x05Basic\x12K\n" +
-	"\fSoftwareInfo\x12\x19.dr.protocol.EmptyRequest\x1a\x1e.dr.protocol.SoftwareInfoReply\"\x002\xc0\x03\n" +
+	"\fSoftwareInfo\x12\x19.dr.protocol.EmptyRequest\x1a\x1e.dr.protocol.SoftwareInfoReply\"\x00\x12D\n" +
+	"\n" +
+	"GetOptions\x12\x1a.dr.protocol.OptionRequest\x1a\x18.dr.protocol.OptionReply\"\x002\xc0\x03\n" +
 	"\bProtocol\x12V\n" +
 	"\x12GetPatientTypeList\x12\x1f.dr.protocol.PatientTypeRequest\x1a\x1d.dr.protocol.PatientTypeReply\"\x00\x12M\n" +
 	"\x0fGetBodyPartList\x12\x1c.dr.protocol.BodyPartRequest\x1a\x1a.dr.protocol.BodyPartReply\"\x00\x12P\n" +
@@ -1736,57 +1895,65 @@ func file_dr_protocol_idl_proto_rawDescGZIP() []byte {
 	return file_dr_protocol_idl_proto_rawDescData
 }
 
-var file_dr_protocol_idl_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_dr_protocol_idl_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
 var file_dr_protocol_idl_proto_goTypes = []any{
 	(*EmptyRequest)(nil),       // 0: dr.protocol.EmptyRequest
 	(*IDRequest)(nil),          // 1: dr.protocol.IDRequest
-	(*SoftwareInfoReply)(nil),  // 2: dr.protocol.SoftwareInfoReply
-	(*PatientTypeRequest)(nil), // 3: dr.protocol.PatientTypeRequest
-	(*PatientType)(nil),        // 4: dr.protocol.PatientType
-	(*PatientTypeReply)(nil),   // 5: dr.protocol.PatientTypeReply
-	(*BodyPartRequest)(nil),    // 6: dr.protocol.BodyPartRequest
-	(*BodyPart)(nil),           // 7: dr.protocol.BodyPart
-	(*BodyPartReply)(nil),      // 8: dr.protocol.BodyPartReply
-	(*ProcedureRequest)(nil),   // 9: dr.protocol.ProcedureRequest
-	(*Procedure)(nil),          // 10: dr.protocol.Procedure
-	(*ProcedureReply)(nil),     // 11: dr.protocol.ProcedureReply
-	(*ViewRequest)(nil),        // 12: dr.protocol.ViewRequest
-	(*View)(nil),               // 13: dr.protocol.View
-	(*ViewReply)(nil),          // 14: dr.protocol.ViewReply
-	(*AprRequest)(nil),         // 15: dr.protocol.AprRequest
-	(*AprSub)(nil),             // 16: dr.protocol.AprSub
-	(*AprReply)(nil),           // 17: dr.protocol.AprReply
-	(*structpb.Struct)(nil),    // 18: google.protobuf.Struct
+	(*OptionRequest)(nil),      // 2: dr.protocol.OptionRequest
+	(*Option)(nil),             // 3: dr.protocol.Option
+	(*OptionReply)(nil),        // 4: dr.protocol.OptionReply
+	(*SoftwareInfoReply)(nil),  // 5: dr.protocol.SoftwareInfoReply
+	(*PatientTypeRequest)(nil), // 6: dr.protocol.PatientTypeRequest
+	(*PatientType)(nil),        // 7: dr.protocol.PatientType
+	(*PatientTypeReply)(nil),   // 8: dr.protocol.PatientTypeReply
+	(*BodyPartRequest)(nil),    // 9: dr.protocol.BodyPartRequest
+	(*BodyPart)(nil),           // 10: dr.protocol.BodyPart
+	(*BodyPartReply)(nil),      // 11: dr.protocol.BodyPartReply
+	(*ProcedureRequest)(nil),   // 12: dr.protocol.ProcedureRequest
+	(*Procedure)(nil),          // 13: dr.protocol.Procedure
+	(*ProcedureReply)(nil),     // 14: dr.protocol.ProcedureReply
+	(*ViewRequest)(nil),        // 15: dr.protocol.ViewRequest
+	(*View)(nil),               // 16: dr.protocol.View
+	(*ViewReply)(nil),          // 17: dr.protocol.ViewReply
+	(*AprRequest)(nil),         // 18: dr.protocol.AprRequest
+	(*AprSub)(nil),             // 19: dr.protocol.AprSub
+	(*AprReply)(nil),           // 20: dr.protocol.AprReply
+	(*anypb.Any)(nil),          // 21: google.protobuf.Any
+	(*structpb.Struct)(nil),    // 22: google.protobuf.Struct
 }
 var file_dr_protocol_idl_proto_depIdxs = []int32{
-	4,  // 0: dr.protocol.PatientTypeReply.patient_type_list:type_name -> dr.protocol.PatientType
-	7,  // 1: dr.protocol.BodyPartReply.body_part_list:type_name -> dr.protocol.BodyPart
-	10, // 2: dr.protocol.ProcedureReply.procedure_list:type_name -> dr.protocol.Procedure
-	18, // 3: dr.protocol.View.config_object:type_name -> google.protobuf.Struct
-	13, // 4: dr.protocol.ViewReply.view_list:type_name -> dr.protocol.View
-	18, // 5: dr.protocol.AprSub.config_object:type_name -> google.protobuf.Struct
-	16, // 6: dr.protocol.AprReply.sub:type_name -> dr.protocol.AprSub
-	0,  // 7: dr.protocol.Basic.SoftwareInfo:input_type -> dr.protocol.EmptyRequest
-	3,  // 8: dr.protocol.Protocol.GetPatientTypeList:input_type -> dr.protocol.PatientTypeRequest
-	6,  // 9: dr.protocol.Protocol.GetBodyPartList:input_type -> dr.protocol.BodyPartRequest
-	9,  // 10: dr.protocol.Protocol.GetProcedureList:input_type -> dr.protocol.ProcedureRequest
-	1,  // 11: dr.protocol.Protocol.GetProcedure:input_type -> dr.protocol.IDRequest
-	12, // 12: dr.protocol.Protocol.GetViewList:input_type -> dr.protocol.ViewRequest
-	1,  // 13: dr.protocol.Protocol.GetView:input_type -> dr.protocol.IDRequest
-	15, // 14: dr.protocol.Apr.GetApr:input_type -> dr.protocol.AprRequest
-	2,  // 15: dr.protocol.Basic.SoftwareInfo:output_type -> dr.protocol.SoftwareInfoReply
-	5,  // 16: dr.protocol.Protocol.GetPatientTypeList:output_type -> dr.protocol.PatientTypeReply
-	8,  // 17: dr.protocol.Protocol.GetBodyPartList:output_type -> dr.protocol.BodyPartReply
-	11, // 18: dr.protocol.Protocol.GetProcedureList:output_type -> dr.protocol.ProcedureReply
-	10, // 19: dr.protocol.Protocol.GetProcedure:output_type -> dr.protocol.Procedure
-	14, // 20: dr.protocol.Protocol.GetViewList:output_type -> dr.protocol.ViewReply
-	13, // 21: dr.protocol.Protocol.GetView:output_type -> dr.protocol.View
-	17, // 22: dr.protocol.Apr.GetApr:output_type -> dr.protocol.AprReply
-	15, // [15:23] is the sub-list for method output_type
-	7,  // [7:15] is the sub-list for method input_type
-	7,  // [7:7] is the sub-list for extension type_name
-	7,  // [7:7] is the sub-list for extension extendee
-	0,  // [0:7] is the sub-list for field type_name
+	21, // 0: dr.protocol.Option.value:type_name -> google.protobuf.Any
+	3,  // 1: dr.protocol.OptionReply.option:type_name -> dr.protocol.Option
+	7,  // 2: dr.protocol.PatientTypeReply.patient_type_list:type_name -> dr.protocol.PatientType
+	10, // 3: dr.protocol.BodyPartReply.body_part_list:type_name -> dr.protocol.BodyPart
+	13, // 4: dr.protocol.ProcedureReply.procedure_list:type_name -> dr.protocol.Procedure
+	22, // 5: dr.protocol.View.config_object:type_name -> google.protobuf.Struct
+	16, // 6: dr.protocol.ViewReply.view_list:type_name -> dr.protocol.View
+	22, // 7: dr.protocol.AprSub.config_object:type_name -> google.protobuf.Struct
+	19, // 8: dr.protocol.AprReply.sub:type_name -> dr.protocol.AprSub
+	0,  // 9: dr.protocol.Basic.SoftwareInfo:input_type -> dr.protocol.EmptyRequest
+	2,  // 10: dr.protocol.Basic.GetOptions:input_type -> dr.protocol.OptionRequest
+	6,  // 11: dr.protocol.Protocol.GetPatientTypeList:input_type -> dr.protocol.PatientTypeRequest
+	9,  // 12: dr.protocol.Protocol.GetBodyPartList:input_type -> dr.protocol.BodyPartRequest
+	12, // 13: dr.protocol.Protocol.GetProcedureList:input_type -> dr.protocol.ProcedureRequest
+	1,  // 14: dr.protocol.Protocol.GetProcedure:input_type -> dr.protocol.IDRequest
+	15, // 15: dr.protocol.Protocol.GetViewList:input_type -> dr.protocol.ViewRequest
+	1,  // 16: dr.protocol.Protocol.GetView:input_type -> dr.protocol.IDRequest
+	18, // 17: dr.protocol.Apr.GetApr:input_type -> dr.protocol.AprRequest
+	5,  // 18: dr.protocol.Basic.SoftwareInfo:output_type -> dr.protocol.SoftwareInfoReply
+	4,  // 19: dr.protocol.Basic.GetOptions:output_type -> dr.protocol.OptionReply
+	8,  // 20: dr.protocol.Protocol.GetPatientTypeList:output_type -> dr.protocol.PatientTypeReply
+	11, // 21: dr.protocol.Protocol.GetBodyPartList:output_type -> dr.protocol.BodyPartReply
+	14, // 22: dr.protocol.Protocol.GetProcedureList:output_type -> dr.protocol.ProcedureReply
+	13, // 23: dr.protocol.Protocol.GetProcedure:output_type -> dr.protocol.Procedure
+	17, // 24: dr.protocol.Protocol.GetViewList:output_type -> dr.protocol.ViewReply
+	16, // 25: dr.protocol.Protocol.GetView:output_type -> dr.protocol.View
+	20, // 26: dr.protocol.Apr.GetApr:output_type -> dr.protocol.AprReply
+	18, // [18:27] is the sub-list for method output_type
+	9,  // [9:18] 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_dr_protocol_idl_proto_init() }
@@ -1795,18 +1962,18 @@ func file_dr_protocol_idl_proto_init() {
 		return
 	}
 	file_dr_protocol_idl_proto_msgTypes[1].OneofWrappers = []any{}
-	file_dr_protocol_idl_proto_msgTypes[3].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[6].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[9].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[12].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[15].OneofWrappers = []any{}
+	file_dr_protocol_idl_proto_msgTypes[18].OneofWrappers = []any{}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_dr_protocol_idl_proto_rawDesc), len(file_dr_protocol_idl_proto_rawDesc)),
 			NumEnums:      0,
-			NumMessages:   18,
+			NumMessages:   21,
 			NumExtensions: 0,
 			NumServices:   3,
 		},

+ 38 - 0
dr_protocol_pb/dr_protocol_idl_grpc.pb.go

@@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
 
 const (
 	Basic_SoftwareInfo_FullMethodName = "/dr.protocol.Basic/SoftwareInfo"
+	Basic_GetOptions_FullMethodName   = "/dr.protocol.Basic/GetOptions"
 )
 
 // BasicClient is the client API for Basic service.
@@ -27,6 +28,7 @@ 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 BasicClient interface {
 	SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error)
+	GetOptions(ctx context.Context, in *OptionRequest, opts ...grpc.CallOption) (*OptionReply, error)
 }
 
 type basicClient struct {
@@ -47,11 +49,22 @@ func (c *basicClient) SoftwareInfo(ctx context.Context, in *EmptyRequest, opts .
 	return out, nil
 }
 
+func (c *basicClient) GetOptions(ctx context.Context, in *OptionRequest, opts ...grpc.CallOption) (*OptionReply, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(OptionReply)
+	err := c.cc.Invoke(ctx, Basic_GetOptions_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BasicServer is the server API for Basic service.
 // All implementations must embed UnimplementedBasicServer
 // for forward compatibility.
 type BasicServer interface {
 	SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error)
+	GetOptions(context.Context, *OptionRequest) (*OptionReply, error)
 	mustEmbedUnimplementedBasicServer()
 }
 
@@ -65,6 +78,9 @@ type UnimplementedBasicServer struct{}
 func (UnimplementedBasicServer) SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SoftwareInfo not implemented")
 }
+func (UnimplementedBasicServer) GetOptions(context.Context, *OptionRequest) (*OptionReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetOptions not implemented")
+}
 func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
 func (UnimplementedBasicServer) testEmbeddedByValue()               {}
 
@@ -104,6 +120,24 @@ func _Basic_SoftwareInfo_Handler(srv interface{}, ctx context.Context, dec func(
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Basic_GetOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(OptionRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BasicServer).GetOptions(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: Basic_GetOptions_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BasicServer).GetOptions(ctx, req.(*OptionRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -115,6 +149,10 @@ var Basic_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "SoftwareInfo",
 			Handler:    _Basic_SoftwareInfo_Handler,
 		},
+		{
+			MethodName: "GetOptions",
+			Handler:    _Basic_GetOptions_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "dr_protocol_idl.proto",