diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 054fe76..5a32ff0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,11 @@
-
+
-
+
+
+
@@ -144,7 +146,8 @@
-
+
+
true
diff --git a/pkg/grpc/proto/realms.pb.go b/pkg/grpc/proto/realms.pb.go
index 56cabc4..59d8a4b 100644
--- a/pkg/grpc/proto/realms.pb.go
+++ b/pkg/grpc/proto/realms.pb.go
@@ -144,11 +144,12 @@ type RealmResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- IsPublic bool `protobuf:"varint,4,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
- IsCommunity bool `protobuf:"varint,5,opt,name=is_community,json=isCommunity,proto3" json:"is_community,omitempty"`
+ Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+ Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ IsPublic bool `protobuf:"varint,5,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
+ IsCommunity bool `protobuf:"varint,6,opt,name=is_community,json=isCommunity,proto3" json:"is_community,omitempty"`
}
func (x *RealmResponse) Reset() {
@@ -183,6 +184,13 @@ func (*RealmResponse) Descriptor() ([]byte, []int) {
return file_realms_proto_rawDescGZIP(), []int{2}
}
+func (x *RealmResponse) GetId() uint64 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
func (x *RealmResponse) GetAlias() string {
if x != nil {
return x.Alias
@@ -451,16 +459,17 @@ var file_realms_proto_rawDesc = []byte{
0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x73,
- 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0x9b, 0x01, 0x0a, 0x0d, 0x52,
- 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
- 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69,
- 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x52,
+ 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
+ 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69,
+ 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 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, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x70,
- 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50,
+ 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
- 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x43,
+ 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x43,
0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0x3d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72,
diff --git a/pkg/grpc/proto/realms.proto b/pkg/grpc/proto/realms.proto
index 9918871..98a83cd 100644
--- a/pkg/grpc/proto/realms.proto
+++ b/pkg/grpc/proto/realms.proto
@@ -27,11 +27,12 @@ message RealmLookupRequest {
}
message RealmResponse {
- string alias = 1;
- string name = 2;
- string description = 3;
- bool is_public = 4;
- bool is_community = 5;
+ uint64 id = 1;
+ string alias = 2;
+ string name = 3;
+ string description = 4;
+ bool is_public = 5;
+ bool is_community = 6;
}
message ListRealmResponse {
diff --git a/pkg/grpc/realms.go b/pkg/grpc/realms.go
index f8c561d..f12daee 100644
--- a/pkg/grpc/realms.go
+++ b/pkg/grpc/realms.go
@@ -20,6 +20,7 @@ func (v *Server) ListCommunityRealm(ctx context.Context, empty *emptypb.Empty) (
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmResponse {
return &proto.RealmResponse{
+ Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
Description: item.Description,
@@ -43,6 +44,7 @@ func (v *Server) ListAvailableRealm(ctx context.Context, request *proto.RealmLoo
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmResponse {
return &proto.RealmResponse{
+ Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
Description: item.Description,
@@ -66,6 +68,7 @@ func (v *Server) ListOwnedRealm(ctx context.Context, request *proto.RealmLookupW
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmResponse {
return &proto.RealmResponse{
+ Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
Description: item.Description,
@@ -98,6 +101,7 @@ func (v *Server) GetRealm(ctx context.Context, request *proto.RealmLookupRequest
}
return &proto.RealmResponse{
+ Id: uint64(realm.ID),
Alias: realm.Alias,
Name: realm.Name,
Description: realm.Description,