From 65bae6321efb06afdb16268e12f1d83ab11db06e Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Mon, 2 Dec 2024 10:38:48 +0100 Subject: [PATCH] rename userapi grpc package and change relative proto path (#1037) --- internal/userapi/userapi.go | 2 - internal/userapi/userapi.pb.go | 222 +++++++++++++++------------- internal/userapi/userapi.proto | 2 +- internal/userapi/userapi_grpc.pb.go | 12 +- packages/scripts.nix | 2 + 5 files changed, 126 insertions(+), 114 deletions(-) diff --git a/internal/userapi/userapi.go b/internal/userapi/userapi.go index fe48599a1f..bca946b923 100644 --- a/internal/userapi/userapi.go +++ b/internal/userapi/userapi.go @@ -3,7 +3,5 @@ package userapi -//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative userapi.proto - // Port is the port of the coordinator API. const Port = "1313" diff --git a/internal/userapi/userapi.pb.go b/internal/userapi/userapi.pb.go index 57147be1c9..5559708d75 100644 --- a/internal/userapi/userapi.pb.go +++ b/internal/userapi/userapi.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.35.1 // protoc v5.28.3 -// source: userapi.proto +// source: internal/userapi/userapi.proto package userapi @@ -31,7 +31,7 @@ type SetManifestRequest struct { func (x *SetManifestRequest) Reset() { *x = SetManifestRequest{} - mi := &file_userapi_proto_msgTypes[0] + mi := &file_internal_userapi_userapi_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +43,7 @@ func (x *SetManifestRequest) String() string { func (*SetManifestRequest) ProtoMessage() {} func (x *SetManifestRequest) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[0] + mi := &file_internal_userapi_userapi_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +56,7 @@ func (x *SetManifestRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetManifestRequest.ProtoReflect.Descriptor instead. func (*SetManifestRequest) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{0} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{0} } func (x *SetManifestRequest) GetManifest() []byte { @@ -88,7 +88,7 @@ type SetManifestResponse struct { func (x *SetManifestResponse) Reset() { *x = SetManifestResponse{} - mi := &file_userapi_proto_msgTypes[1] + mi := &file_internal_userapi_userapi_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +100,7 @@ func (x *SetManifestResponse) String() string { func (*SetManifestResponse) ProtoMessage() {} func (x *SetManifestResponse) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[1] + mi := &file_internal_userapi_userapi_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +113,7 @@ func (x *SetManifestResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetManifestResponse.ProtoReflect.Descriptor instead. func (*SetManifestResponse) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{1} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{1} } func (x *SetManifestResponse) GetRootCA() []byte { @@ -148,7 +148,7 @@ type SeedShareDocument struct { func (x *SeedShareDocument) Reset() { *x = SeedShareDocument{} - mi := &file_userapi_proto_msgTypes[2] + mi := &file_internal_userapi_userapi_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -160,7 +160,7 @@ func (x *SeedShareDocument) String() string { func (*SeedShareDocument) ProtoMessage() {} func (x *SeedShareDocument) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[2] + mi := &file_internal_userapi_userapi_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -173,7 +173,7 @@ func (x *SeedShareDocument) ProtoReflect() protoreflect.Message { // Deprecated: Use SeedShareDocument.ProtoReflect.Descriptor instead. func (*SeedShareDocument) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{2} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{2} } func (x *SeedShareDocument) GetSeedShares() []*SeedShare { @@ -201,7 +201,7 @@ type SeedShare struct { func (x *SeedShare) Reset() { *x = SeedShare{} - mi := &file_userapi_proto_msgTypes[3] + mi := &file_internal_userapi_userapi_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -213,7 +213,7 @@ func (x *SeedShare) String() string { func (*SeedShare) ProtoMessage() {} func (x *SeedShare) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[3] + mi := &file_internal_userapi_userapi_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -226,7 +226,7 @@ func (x *SeedShare) ProtoReflect() protoreflect.Message { // Deprecated: Use SeedShare.ProtoReflect.Descriptor instead. func (*SeedShare) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{3} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{3} } func (x *SeedShare) GetPublicKey() string { @@ -251,7 +251,7 @@ type GetManifestsRequest struct { func (x *GetManifestsRequest) Reset() { *x = GetManifestsRequest{} - mi := &file_userapi_proto_msgTypes[4] + mi := &file_internal_userapi_userapi_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -263,7 +263,7 @@ func (x *GetManifestsRequest) String() string { func (*GetManifestsRequest) ProtoMessage() {} func (x *GetManifestsRequest) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[4] + mi := &file_internal_userapi_userapi_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -276,7 +276,7 @@ func (x *GetManifestsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetManifestsRequest.ProtoReflect.Descriptor instead. func (*GetManifestsRequest) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{4} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{4} } type GetManifestsResponse struct { @@ -294,7 +294,7 @@ type GetManifestsResponse struct { func (x *GetManifestsResponse) Reset() { *x = GetManifestsResponse{} - mi := &file_userapi_proto_msgTypes[5] + mi := &file_internal_userapi_userapi_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -306,7 +306,7 @@ func (x *GetManifestsResponse) String() string { func (*GetManifestsResponse) ProtoMessage() {} func (x *GetManifestsResponse) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[5] + mi := &file_internal_userapi_userapi_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -319,7 +319,7 @@ func (x *GetManifestsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetManifestsResponse.ProtoReflect.Descriptor instead. func (*GetManifestsResponse) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{5} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{5} } func (x *GetManifestsResponse) GetManifests() [][]byte { @@ -361,7 +361,7 @@ type RecoverRequest struct { func (x *RecoverRequest) Reset() { *x = RecoverRequest{} - mi := &file_userapi_proto_msgTypes[6] + mi := &file_internal_userapi_userapi_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -373,7 +373,7 @@ func (x *RecoverRequest) String() string { func (*RecoverRequest) ProtoMessage() {} func (x *RecoverRequest) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[6] + mi := &file_internal_userapi_userapi_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -386,7 +386,7 @@ func (x *RecoverRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RecoverRequest.ProtoReflect.Descriptor instead. func (*RecoverRequest) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{6} + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{6} } func (x *RecoverRequest) GetSeed() []byte { @@ -411,7 +411,7 @@ type RecoverResponse struct { func (x *RecoverResponse) Reset() { *x = RecoverResponse{} - mi := &file_userapi_proto_msgTypes[7] + mi := &file_internal_userapi_userapi_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -423,7 +423,7 @@ func (x *RecoverResponse) String() string { func (*RecoverResponse) ProtoMessage() {} func (x *RecoverResponse) ProtoReflect() protoreflect.Message { - mi := &file_userapi_proto_msgTypes[7] + mi := &file_internal_userapi_userapi_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -436,30 +436,35 @@ func (x *RecoverResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RecoverResponse.ProtoReflect.Descriptor instead. func (*RecoverResponse) Descriptor() ([]byte, []int) { - return file_userapi_proto_rawDescGZIP(), []int{7} -} - -var File_userapi_proto protoreflect.FileDescriptor - -var file_userapi_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x22, 0x4c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x41, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x65, 0x73, 0x68, 0x43, 0x41, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x4d, 0x65, 0x73, 0x68, 0x43, 0x41, 0x12, 0x40, - 0x0a, 0x0d, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x6f, 0x63, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x0d, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x6f, 0x63, - 0x22, 0x5b, 0x0a, 0x11, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x0a, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, - 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, + return file_internal_userapi_userapi_proto_rawDescGZIP(), []int{7} +} + +var File_internal_userapi_userapi_proto protoreflect.FileDescriptor + +var file_internal_userapi_userapi_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1c, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x22, 0x4c, + 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, + 0x13, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x41, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x41, 0x12, 0x16, 0x0a, 0x06, + 0x4d, 0x65, 0x73, 0x68, 0x43, 0x41, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x4d, 0x65, + 0x73, 0x68, 0x43, 0x41, 0x12, 0x55, 0x0a, 0x0d, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x73, 0x44, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x64, + 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x53, 0x65, + 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x6f, 0x63, 0x22, 0x70, 0x0a, 0x11, 0x53, + 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x47, 0x0a, 0x0a, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, + 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x0a, 0x53, 0x65, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x4f, 0x0a, @@ -482,59 +487,66 @@ var file_userapi_proto_rawDesc = []byte{ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x65, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x61, 0x6c, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x41, 0x50, - 0x49, 0x12, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x75, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdc, 0x02, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x41, 0x50, + 0x49, 0x12, 0x72, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x12, 0x30, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, + 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, + 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x07, + 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, + 0x73, 0x73, 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, - 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, + 0x73, 0x79, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_userapi_proto_rawDescOnce sync.Once - file_userapi_proto_rawDescData = file_userapi_proto_rawDesc + file_internal_userapi_userapi_proto_rawDescOnce sync.Once + file_internal_userapi_userapi_proto_rawDescData = file_internal_userapi_userapi_proto_rawDesc ) -func file_userapi_proto_rawDescGZIP() []byte { - file_userapi_proto_rawDescOnce.Do(func() { - file_userapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_userapi_proto_rawDescData) +func file_internal_userapi_userapi_proto_rawDescGZIP() []byte { + file_internal_userapi_userapi_proto_rawDescOnce.Do(func() { + file_internal_userapi_userapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_userapi_userapi_proto_rawDescData) }) - return file_userapi_proto_rawDescData -} - -var file_userapi_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_userapi_proto_goTypes = []any{ - (*SetManifestRequest)(nil), // 0: userapi.SetManifestRequest - (*SetManifestResponse)(nil), // 1: userapi.SetManifestResponse - (*SeedShareDocument)(nil), // 2: userapi.SeedShareDocument - (*SeedShare)(nil), // 3: userapi.SeedShare - (*GetManifestsRequest)(nil), // 4: userapi.GetManifestsRequest - (*GetManifestsResponse)(nil), // 5: userapi.GetManifestsResponse - (*RecoverRequest)(nil), // 6: userapi.RecoverRequest - (*RecoverResponse)(nil), // 7: userapi.RecoverResponse -} -var file_userapi_proto_depIdxs = []int32{ - 2, // 0: userapi.SetManifestResponse.SeedSharesDoc:type_name -> userapi.SeedShareDocument - 3, // 1: userapi.SeedShareDocument.SeedShares:type_name -> userapi.SeedShare - 0, // 2: userapi.UserAPI.SetManifest:input_type -> userapi.SetManifestRequest - 4, // 3: userapi.UserAPI.GetManifests:input_type -> userapi.GetManifestsRequest - 6, // 4: userapi.UserAPI.Recover:input_type -> userapi.RecoverRequest - 1, // 5: userapi.UserAPI.SetManifest:output_type -> userapi.SetManifestResponse - 5, // 6: userapi.UserAPI.GetManifests:output_type -> userapi.GetManifestsResponse - 7, // 7: userapi.UserAPI.Recover:output_type -> userapi.RecoverResponse + return file_internal_userapi_userapi_proto_rawDescData +} + +var file_internal_userapi_userapi_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_internal_userapi_userapi_proto_goTypes = []any{ + (*SetManifestRequest)(nil), // 0: edgelesssys.contrast.userapi.SetManifestRequest + (*SetManifestResponse)(nil), // 1: edgelesssys.contrast.userapi.SetManifestResponse + (*SeedShareDocument)(nil), // 2: edgelesssys.contrast.userapi.SeedShareDocument + (*SeedShare)(nil), // 3: edgelesssys.contrast.userapi.SeedShare + (*GetManifestsRequest)(nil), // 4: edgelesssys.contrast.userapi.GetManifestsRequest + (*GetManifestsResponse)(nil), // 5: edgelesssys.contrast.userapi.GetManifestsResponse + (*RecoverRequest)(nil), // 6: edgelesssys.contrast.userapi.RecoverRequest + (*RecoverResponse)(nil), // 7: edgelesssys.contrast.userapi.RecoverResponse +} +var file_internal_userapi_userapi_proto_depIdxs = []int32{ + 2, // 0: edgelesssys.contrast.userapi.SetManifestResponse.SeedSharesDoc:type_name -> edgelesssys.contrast.userapi.SeedShareDocument + 3, // 1: edgelesssys.contrast.userapi.SeedShareDocument.SeedShares:type_name -> edgelesssys.contrast.userapi.SeedShare + 0, // 2: edgelesssys.contrast.userapi.UserAPI.SetManifest:input_type -> edgelesssys.contrast.userapi.SetManifestRequest + 4, // 3: edgelesssys.contrast.userapi.UserAPI.GetManifests:input_type -> edgelesssys.contrast.userapi.GetManifestsRequest + 6, // 4: edgelesssys.contrast.userapi.UserAPI.Recover:input_type -> edgelesssys.contrast.userapi.RecoverRequest + 1, // 5: edgelesssys.contrast.userapi.UserAPI.SetManifest:output_type -> edgelesssys.contrast.userapi.SetManifestResponse + 5, // 6: edgelesssys.contrast.userapi.UserAPI.GetManifests:output_type -> edgelesssys.contrast.userapi.GetManifestsResponse + 7, // 7: edgelesssys.contrast.userapi.UserAPI.Recover:output_type -> edgelesssys.contrast.userapi.RecoverResponse 5, // [5:8] is the sub-list for method output_type 2, // [2:5] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -542,27 +554,27 @@ var file_userapi_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_userapi_proto_init() } -func file_userapi_proto_init() { - if File_userapi_proto != nil { +func init() { file_internal_userapi_userapi_proto_init() } +func file_internal_userapi_userapi_proto_init() { + if File_internal_userapi_userapi_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_userapi_proto_rawDesc, + RawDescriptor: file_internal_userapi_userapi_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_userapi_proto_goTypes, - DependencyIndexes: file_userapi_proto_depIdxs, - MessageInfos: file_userapi_proto_msgTypes, + GoTypes: file_internal_userapi_userapi_proto_goTypes, + DependencyIndexes: file_internal_userapi_userapi_proto_depIdxs, + MessageInfos: file_internal_userapi_userapi_proto_msgTypes, }.Build() - File_userapi_proto = out.File - file_userapi_proto_rawDesc = nil - file_userapi_proto_goTypes = nil - file_userapi_proto_depIdxs = nil + File_internal_userapi_userapi_proto = out.File + file_internal_userapi_userapi_proto_rawDesc = nil + file_internal_userapi_userapi_proto_goTypes = nil + file_internal_userapi_userapi_proto_depIdxs = nil } diff --git a/internal/userapi/userapi.proto b/internal/userapi/userapi.proto index 449cf126d0..2f25ccf368 100644 --- a/internal/userapi/userapi.proto +++ b/internal/userapi/userapi.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package userapi; +package edgelesssys.contrast.userapi; option go_package = "github.com/edgelesssys/contrast/internal/userapi"; diff --git a/internal/userapi/userapi_grpc.pb.go b/internal/userapi/userapi_grpc.pb.go index 5b6c472d3c..31db91d1e7 100644 --- a/internal/userapi/userapi_grpc.pb.go +++ b/internal/userapi/userapi_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v5.28.3 -// source: userapi.proto +// source: internal/userapi/userapi.proto package userapi @@ -19,9 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - UserAPI_SetManifest_FullMethodName = "/userapi.UserAPI/SetManifest" - UserAPI_GetManifests_FullMethodName = "/userapi.UserAPI/GetManifests" - UserAPI_Recover_FullMethodName = "/userapi.UserAPI/Recover" + UserAPI_SetManifest_FullMethodName = "/edgelesssys.contrast.userapi.UserAPI/SetManifest" + UserAPI_GetManifests_FullMethodName = "/edgelesssys.contrast.userapi.UserAPI/GetManifests" + UserAPI_Recover_FullMethodName = "/edgelesssys.contrast.userapi.UserAPI/Recover" ) // UserAPIClient is the client API for UserAPI service. @@ -162,7 +162,7 @@ func _UserAPI_Recover_Handler(srv interface{}, ctx context.Context, dec func(int // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var UserAPI_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "userapi.UserAPI", + ServiceName: "edgelesssys.contrast.userapi.UserAPI", HandlerType: (*UserAPIServer)(nil), Methods: []grpc.MethodDesc{ { @@ -179,5 +179,5 @@ var UserAPI_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "userapi.proto", + Metadata: "internal/userapi/userapi.proto", } diff --git a/packages/scripts.nix b/packages/scripts.nix index 3f977ec2af..8521235e48 100644 --- a/packages/scripts.nix +++ b/packages/scripts.nix @@ -109,6 +109,8 @@ go generate ./... done < <(go list -f '{{.Dir}}' -m) + protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./internal/userapi/userapi.proto + # Notice: Order matters! Packages must be updated before their dependents. echo "Updating vendorHash of tdx-measure package" >&2 nix-update --version=skip --flake legacyPackages.x86_64-linux.tdx-measure