From 2328de781b4a9de2a28beef1c2d5095b1bcbb727 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 00:50:27 +0000 Subject: [PATCH 1/6] created gRPC file download API --- tavern/internal/c2/api_download_file.go | 64 +++++++ tavern/internal/c2/api_download_file_test.go | 113 +++++++++++ tavern/internal/c2/c2.proto | 9 + tavern/internal/c2/c2pb/c2.pb.go | 191 ++++++++++++++++--- tavern/internal/c2/c2pb/c2_grpc.pb.go | 66 ++++++- tavern/internal/c2/c2test/grpc.go | 55 ++++++ tavern/internal/c2/server.go | 6 +- 7 files changed, 476 insertions(+), 28 deletions(-) create mode 100644 tavern/internal/c2/api_download_file.go create mode 100644 tavern/internal/c2/api_download_file_test.go create mode 100644 tavern/internal/c2/c2test/grpc.go diff --git a/tavern/internal/c2/api_download_file.go b/tavern/internal/c2/api_download_file.go new file mode 100644 index 000000000..d7463b6fa --- /dev/null +++ b/tavern/internal/c2/api_download_file.go @@ -0,0 +1,64 @@ +package c2 + +import ( + "bytes" + "fmt" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "realm.pub/tavern/internal/c2/c2pb" + "realm.pub/tavern/internal/ent" + "realm.pub/tavern/internal/ent/file" +) + +func (srv *Server) DownloadFile(req *c2pb.DownloadFileRequest, stream c2pb.C2_DownloadFileServer) error { + ctx := stream.Context() + + // Load File + name := req.GetName() + f, err := srv.graph.File.Query(). + Where(file.Name(name)). + Only(ctx) + if ent.IsNotFound(err) { + return status.Errorf(codes.NotFound, "%v", err) + } + if err != nil { + return status.Errorf(codes.Internal, "failed to query file (%q): %v", name, err) + } + + // Set Header Metadata + stream.SetHeader(metadata.Pairs( + "sha3-checksum", f.Hash, + "file-size", fmt.Sprintf("%d", f.Size), + )) + + // Send File Chunks + buf := bytes.NewBuffer(f.Content) + for { + // Check Empty Buffer + if buf.Len() < 1 { + return nil + } + + // Determine Chunk Size + chunkLen := srv.MaxFileChunkSize + if uint64(buf.Len()) < chunkLen { + chunkLen = uint64(buf.Len()) + } + + // Read Chunk + chunk := make([]byte, chunkLen) // TODO + if _, err := buf.Read(chunk); err != nil { + return status.Errorf(codes.Internal, "failed to read file content: %v", err) + } + + // Send Chunk + sendErr := stream.Send(&c2pb.DownloadFileResponse{ + Chunk: chunk, + }) + if sendErr != nil { + return status.Errorf(codes.Internal, "failed to send file content: %v", err) + } + } +} diff --git a/tavern/internal/c2/api_download_file_test.go b/tavern/internal/c2/api_download_file_test.go new file mode 100644 index 000000000..bce79168c --- /dev/null +++ b/tavern/internal/c2/api_download_file_test.go @@ -0,0 +1,113 @@ +package c2_test + +import ( + "bytes" + "context" + "crypto/rand" + "errors" + "fmt" + "io" + "testing" + + _ "github.com/mattn/go-sqlite3" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "realm.pub/tavern/internal/c2/c2pb" + "realm.pub/tavern/internal/c2/c2test" +) + +func TestDownloadFile(t *testing.T) { + // Setup Dependencies + ctx := context.Background() + client, graph, close := c2test.New(t) + defer close() + + // Test Cases + type testCase struct { + name string + fileName string + fileSize int + req *c2pb.DownloadFileRequest + wantCode codes.Code + } + tests := []testCase{ + { + name: "Small_File", + fileName: "small_file", + fileSize: 100, + req: &c2pb.DownloadFileRequest{Name: "small_file"}, + wantCode: codes.OK, + }, + { + name: "Large_File", + fileName: "large_file", + fileSize: 1024 * 1024 * 10, // 10 MB + req: &c2pb.DownloadFileRequest{Name: "large_file"}, + wantCode: codes.OK, + }, + { + name: "File Not Found", + fileName: "n/a", + req: &c2pb.DownloadFileRequest{Name: "this_file_does_not_exist"}, + wantCode: codes.NotFound, + }, + } + + testHandler := func(t *testing.T, tc testCase) { + // Generate Random Content + data := make([]byte, tc.fileSize) + _, err := rand.Read(data) + require.NoError(t, err) + + // Create File + f := graph.File.Create(). + SetName(tc.fileName). + SetContent(data). + SaveX(ctx) + + // Send Request + fileClient, err := client.DownloadFile(ctx, tc.req) + require.NoError(t, err) + + // Read All Chunks + var buf bytes.Buffer + for { + // Receive Chunk + resp, err := fileClient.Recv() + if errors.Is(err, io.EOF) { + break + } + + // Check Status + require.Equal(t, tc.wantCode.String(), status.Code(err).String()) + if status.Code(err) != codes.OK { + // Do not continue if we expected error code + return + } + + // Write Chunk + _, err = buf.Write(resp.Chunk) + require.NoError(t, err) + } + + // Assert Content + assert.Equal(t, f.Content, buf.Bytes()) + + // Assert Headers + metadata, err := fileClient.Header() + require.NoError(t, err) + require.Len(t, metadata.Get("sha3-checksum"), 1) + assert.Equal(t, f.Hash, metadata.Get("sha3-checksum")[0]) + require.Len(t, metadata.Get("file-size"), 1) + assert.Equal(t, fmt.Sprintf("%d", f.Size), metadata.Get("file-size")[0]) + } + + // Run Tests + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + testHandler(t, tc) + }) + } +} diff --git a/tavern/internal/c2/c2.proto b/tavern/internal/c2/c2.proto index 71c650bb2..8002d4661 100644 --- a/tavern/internal/c2/c2.proto +++ b/tavern/internal/c2/c2.proto @@ -84,6 +84,14 @@ message ReportTaskOutputRequest { message ReportTaskOutputResponse {} +message DownloadFileRequest { + string name = 1; +} +message DownloadFileResponse { + bytes chunk = 1; + string hash = 2; +} + /* * Service */ @@ -91,4 +99,5 @@ message ReportTaskOutputResponse {} service C2 { rpc ClaimTasks(ClaimTasksRequest) returns (ClaimTasksResponse) {} rpc ReportTaskOutput(ReportTaskOutputRequest) returns (ReportTaskOutputResponse) {} + rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); } diff --git a/tavern/internal/c2/c2pb/c2.pb.go b/tavern/internal/c2/c2pb/c2.pb.go index c249c5b2e..deecd472d 100644 --- a/tavern/internal/c2/c2pb/c2.pb.go +++ b/tavern/internal/c2/c2pb/c2.pb.go @@ -650,6 +650,108 @@ func (*ReportTaskOutputResponse) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{9} } +type DownloadFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DownloadFileRequest) Reset() { + *x = DownloadFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_c2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DownloadFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DownloadFileRequest) ProtoMessage() {} + +func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_c2_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DownloadFileRequest.ProtoReflect.Descriptor instead. +func (*DownloadFileRequest) Descriptor() ([]byte, []int) { + return file_c2_proto_rawDescGZIP(), []int{10} +} + +func (x *DownloadFileRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type DownloadFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (x *DownloadFileResponse) Reset() { + *x = DownloadFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_c2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DownloadFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DownloadFileResponse) ProtoMessage() {} + +func (x *DownloadFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_c2_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DownloadFileResponse.ProtoReflect.Descriptor instead. +func (*DownloadFileResponse) Descriptor() ([]byte, []int) { + return file_c2_proto_rawDescGZIP(), []int{11} +} + +func (x *DownloadFileResponse) GetChunk() []byte { + if x != nil { + return x.Chunk + } + return nil +} + +func (x *DownloadFileResponse) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + var File_c2_proto protoreflect.FileDescriptor var file_c2_proto_rawDesc = []byte{ @@ -724,20 +826,31 @@ var file_c2_proto_rawDesc = []byte{ 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x94, - 0x01, 0x0a, 0x02, 0x43, 0x32, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x32, 0x2e, - 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x63, 0x61, 0x72, 0x72, 0x65, 0x74, 0x74, 0x6f, 0x2f, 0x74, 0x61, - 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x32, - 0x2f, 0x63, 0x32, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, + 0x0a, 0x13, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, 0xd9, 0x01, 0x0a, 0x02, + 0x43, 0x32, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4f, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, + 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x63, 0x61, 0x72, 0x72, 0x65, 0x74, 0x74, 0x6f, 0x2f, + 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x63, 0x32, 0x2f, 0x63, 0x32, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -753,7 +866,7 @@ func file_c2_proto_rawDescGZIP() []byte { } var file_c2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_c2_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_c2_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_c2_proto_goTypes = []interface{}{ (Host_Platform)(0), // 0: c2.Host.Platform (*Host)(nil), // 1: c2.Host @@ -766,26 +879,30 @@ var file_c2_proto_goTypes = []interface{}{ (*ClaimTasksResponse)(nil), // 8: c2.ClaimTasksResponse (*ReportTaskOutputRequest)(nil), // 9: c2.ReportTaskOutputRequest (*ReportTaskOutputResponse)(nil), // 10: c2.ReportTaskOutputResponse - nil, // 11: c2.Task.ParametersEntry - (*timestamp.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*DownloadFileRequest)(nil), // 11: c2.DownloadFileRequest + (*DownloadFileResponse)(nil), // 12: c2.DownloadFileResponse + nil, // 13: c2.Task.ParametersEntry + (*timestamp.Timestamp)(nil), // 14: google.protobuf.Timestamp } var file_c2_proto_depIdxs = []int32{ 0, // 0: c2.Host.platform:type_name -> c2.Host.Platform 1, // 1: c2.Beacon.host:type_name -> c2.Host 2, // 2: c2.Beacon.agent:type_name -> c2.Agent - 11, // 3: c2.Task.parameters:type_name -> c2.Task.ParametersEntry + 13, // 3: c2.Task.parameters:type_name -> c2.Task.ParametersEntry 5, // 4: c2.TaskOutput.error:type_name -> c2.TaskError - 12, // 5: c2.TaskOutput.exec_started_at:type_name -> google.protobuf.Timestamp - 12, // 6: c2.TaskOutput.exec_finished_at:type_name -> google.protobuf.Timestamp + 14, // 5: c2.TaskOutput.exec_started_at:type_name -> google.protobuf.Timestamp + 14, // 6: c2.TaskOutput.exec_finished_at:type_name -> google.protobuf.Timestamp 3, // 7: c2.ClaimTasksRequest.beacon:type_name -> c2.Beacon 4, // 8: c2.ClaimTasksResponse.tasks:type_name -> c2.Task 6, // 9: c2.ReportTaskOutputRequest.output:type_name -> c2.TaskOutput 7, // 10: c2.C2.ClaimTasks:input_type -> c2.ClaimTasksRequest 9, // 11: c2.C2.ReportTaskOutput:input_type -> c2.ReportTaskOutputRequest - 8, // 12: c2.C2.ClaimTasks:output_type -> c2.ClaimTasksResponse - 10, // 13: c2.C2.ReportTaskOutput:output_type -> c2.ReportTaskOutputResponse - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] is the sub-list for method input_type + 11, // 12: c2.C2.DownloadFile:input_type -> c2.DownloadFileRequest + 8, // 13: c2.C2.ClaimTasks:output_type -> c2.ClaimTasksResponse + 10, // 14: c2.C2.ReportTaskOutput:output_type -> c2.ReportTaskOutputResponse + 12, // 15: c2.C2.DownloadFile:output_type -> c2.DownloadFileResponse + 13, // [13:16] is the sub-list for method output_type + 10, // [10:13] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name @@ -917,6 +1034,30 @@ func file_c2_proto_init() { return nil } } + file_c2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DownloadFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DownloadFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -924,7 +1065,7 @@ func file_c2_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_c2_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/tavern/internal/c2/c2pb/c2_grpc.pb.go b/tavern/internal/c2/c2pb/c2_grpc.pb.go index 29be161c2..85be98676 100644 --- a/tavern/internal/c2/c2pb/c2_grpc.pb.go +++ b/tavern/internal/c2/c2pb/c2_grpc.pb.go @@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 type C2Client interface { ClaimTasks(ctx context.Context, in *ClaimTasksRequest, opts ...grpc.CallOption) (*ClaimTasksResponse, error) ReportTaskOutput(ctx context.Context, in *ReportTaskOutputRequest, opts ...grpc.CallOption) (*ReportTaskOutputResponse, error) + DownloadFile(ctx context.Context, in *DownloadFileRequest, opts ...grpc.CallOption) (C2_DownloadFileClient, error) } type c2Client struct { @@ -52,12 +53,45 @@ func (c *c2Client) ReportTaskOutput(ctx context.Context, in *ReportTaskOutputReq return out, nil } +func (c *c2Client) DownloadFile(ctx context.Context, in *DownloadFileRequest, opts ...grpc.CallOption) (C2_DownloadFileClient, error) { + stream, err := c.cc.NewStream(ctx, &C2_ServiceDesc.Streams[0], "/c2.C2/DownloadFile", opts...) + if err != nil { + return nil, err + } + x := &c2DownloadFileClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type C2_DownloadFileClient interface { + Recv() (*DownloadFileResponse, error) + grpc.ClientStream +} + +type c2DownloadFileClient struct { + grpc.ClientStream +} + +func (x *c2DownloadFileClient) Recv() (*DownloadFileResponse, error) { + m := new(DownloadFileResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // C2Server is the server API for C2 service. // All implementations must embed UnimplementedC2Server // for forward compatibility type C2Server interface { ClaimTasks(context.Context, *ClaimTasksRequest) (*ClaimTasksResponse, error) ReportTaskOutput(context.Context, *ReportTaskOutputRequest) (*ReportTaskOutputResponse, error) + DownloadFile(*DownloadFileRequest, C2_DownloadFileServer) error mustEmbedUnimplementedC2Server() } @@ -71,6 +105,9 @@ func (UnimplementedC2Server) ClaimTasks(context.Context, *ClaimTasksRequest) (*C func (UnimplementedC2Server) ReportTaskOutput(context.Context, *ReportTaskOutputRequest) (*ReportTaskOutputResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReportTaskOutput not implemented") } +func (UnimplementedC2Server) DownloadFile(*DownloadFileRequest, C2_DownloadFileServer) error { + return status.Errorf(codes.Unimplemented, "method DownloadFile not implemented") +} func (UnimplementedC2Server) mustEmbedUnimplementedC2Server() {} // UnsafeC2Server may be embedded to opt out of forward compatibility for this service. @@ -120,6 +157,27 @@ func _C2_ReportTaskOutput_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _C2_DownloadFile_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(DownloadFileRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(C2Server).DownloadFile(m, &c2DownloadFileServer{stream}) +} + +type C2_DownloadFileServer interface { + Send(*DownloadFileResponse) error + grpc.ServerStream +} + +type c2DownloadFileServer struct { + grpc.ServerStream +} + +func (x *c2DownloadFileServer) Send(m *DownloadFileResponse) error { + return x.ServerStream.SendMsg(m) +} + // C2_ServiceDesc is the grpc.ServiceDesc for C2 service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -136,6 +194,12 @@ var C2_ServiceDesc = grpc.ServiceDesc{ Handler: _C2_ReportTaskOutput_Handler, }, }, - Streams: []grpc.StreamDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "DownloadFile", + Handler: _C2_DownloadFile_Handler, + ServerStreams: true, + }, + }, Metadata: "c2.proto", } diff --git a/tavern/internal/c2/c2test/grpc.go b/tavern/internal/c2/c2test/grpc.go new file mode 100644 index 000000000..7ad1a07fb --- /dev/null +++ b/tavern/internal/c2/c2test/grpc.go @@ -0,0 +1,55 @@ +package c2test + +import ( + "context" + "net" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" + "realm.pub/tavern/internal/c2" + "realm.pub/tavern/internal/c2/c2pb" + "realm.pub/tavern/internal/ent" + "realm.pub/tavern/internal/ent/enttest" +) + +func New(t *testing.T) (c2pb.C2Client, *ent.Client, func()) { + t.Helper() + + // TestDB Config + var ( + driverName = "sqlite3" + dataSourceName = "file:ent?mode=memory&cache=shared&_fk=1" + ) + + // Ent Client + graph := enttest.Open(t, driverName, dataSourceName, enttest.WithOptions()) + + // gRPC Server + lis := bufconn.Listen(1024 * 1024 * 10) + baseSrv := grpc.NewServer() + c2pb.RegisterC2Server(baseSrv, c2.New(graph)) + + go func() { + require.NoError(t, baseSrv.Serve(lis), "failed to serve grpc") + }() + + conn, err := grpc.DialContext( + context.Background(), + "", + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { + return lis.Dial() + }), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + require.NoError(t, err) + + return c2pb.NewC2Client(conn), graph, func() { + assert.NoError(t, lis.Close()) + baseSrv.Stop() + assert.NoError(t, graph.Close()) + } +} diff --git a/tavern/internal/c2/server.go b/tavern/internal/c2/server.go index 4f8c66f2f..d856f8a8b 100644 --- a/tavern/internal/c2/server.go +++ b/tavern/internal/c2/server.go @@ -14,13 +14,15 @@ import ( ) type Server struct { - graph *ent.Client + MaxFileChunkSize uint64 + graph *ent.Client c2pb.UnimplementedC2Server } func New(graph *ent.Client) *Server { return &Server{ - graph: graph, + MaxFileChunkSize: 1024 * 1024, // 1 MB + graph: graph, } } From 9f7da89c836b53fbe1517cbd8347d1e5601f794f Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 00:54:20 +0000 Subject: [PATCH 2/6] regenerate entgo --- tavern/internal/c2/api_download_file.go | 2 +- tavern/internal/ent/gql_node.go | 2 +- tavern/internal/ent/gql_pagination.go | 2 +- .../graphql/generated/directives.generated.go | 8 +- .../graphql/generated/ent.generated.go | 442 +++++++++--------- .../graphql/generated/inputs.generated.go | 6 +- .../graphql/generated/mutation.generated.go | 52 +-- .../graphql/generated/root_.generated.go | 4 +- 8 files changed, 259 insertions(+), 259 deletions(-) diff --git a/tavern/internal/c2/api_download_file.go b/tavern/internal/c2/api_download_file.go index d7463b6fa..de9247c00 100644 --- a/tavern/internal/c2/api_download_file.go +++ b/tavern/internal/c2/api_download_file.go @@ -48,7 +48,7 @@ func (srv *Server) DownloadFile(req *c2pb.DownloadFileRequest, stream c2pb.C2_Do } // Read Chunk - chunk := make([]byte, chunkLen) // TODO + chunk := make([]byte, chunkLen) if _, err := buf.Read(chunk); err != nil { return status.Errorf(codes.Internal, "failed to read file content: %v", err) } diff --git a/tavern/internal/ent/gql_node.go b/tavern/internal/ent/gql_node.go index 0a22d35a7..c2cf45176 100644 --- a/tavern/internal/ent/gql_node.go +++ b/tavern/internal/ent/gql_node.go @@ -14,6 +14,7 @@ import ( "entgo.io/ent/dialect/sql/schema" "github.com/99designs/gqlgen/graphql" "github.com/hashicorp/go-multierror" + "golang.org/x/sync/semaphore" "realm.pub/tavern/internal/ent/beacon" "realm.pub/tavern/internal/ent/file" "realm.pub/tavern/internal/ent/host" @@ -22,7 +23,6 @@ import ( "realm.pub/tavern/internal/ent/task" "realm.pub/tavern/internal/ent/tome" "realm.pub/tavern/internal/ent/user" - "golang.org/x/sync/semaphore" ) // Noder wraps the basic Node method. diff --git a/tavern/internal/ent/gql_pagination.go b/tavern/internal/ent/gql_pagination.go index 34fce29f3..d544c7050 100644 --- a/tavern/internal/ent/gql_pagination.go +++ b/tavern/internal/ent/gql_pagination.go @@ -14,6 +14,7 @@ import ( "entgo.io/ent/dialect/sql" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" + "github.com/vektah/gqlparser/v2/gqlerror" "realm.pub/tavern/internal/ent/beacon" "realm.pub/tavern/internal/ent/file" "realm.pub/tavern/internal/ent/host" @@ -22,7 +23,6 @@ import ( "realm.pub/tavern/internal/ent/task" "realm.pub/tavern/internal/ent/tome" "realm.pub/tavern/internal/ent/user" - "github.com/vektah/gqlparser/v2/gqlerror" ) // Common entgql types. diff --git a/tavern/internal/graphql/generated/directives.generated.go b/tavern/internal/graphql/generated/directives.generated.go index fdfb0f36b..fd91b2e3e 100644 --- a/tavern/internal/graphql/generated/directives.generated.go +++ b/tavern/internal/graphql/generated/directives.generated.go @@ -6,8 +6,8 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "realm.pub/tavern/internal/graphql/models" "github.com/vektah/gqlparser/v2/ast" + "realm.pub/tavern/internal/graphql/models" ) // region ************************** generated!.gotpl ************************** @@ -22,7 +22,7 @@ func (ec *executionContext) dir_requireRole_args(ctx context.Context, rawArgs ma var arg0 models.Role if tmp, ok := rawArgs["role"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role")) - arg0, err = ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, tmp) + arg0, err = ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, tmp) if err != nil { return nil, err } @@ -55,13 +55,13 @@ func (ec *executionContext) dir_requireRole_args(ctx context.Context, rawArgs ma // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, v interface{}) (models.Role, error) { +func (ec *executionContext) unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, v interface{}) (models.Role, error) { var res models.Role err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, sel ast.SelectionSet, v models.Role) graphql.Marshaler { +func (ec *executionContext) marshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx context.Context, sel ast.SelectionSet, v models.Role) graphql.Marshaler { return v } diff --git a/tavern/internal/graphql/generated/ent.generated.go b/tavern/internal/graphql/generated/ent.generated.go index a62ea1b00..880f477a7 100644 --- a/tavern/internal/graphql/generated/ent.generated.go +++ b/tavern/internal/graphql/generated/ent.generated.go @@ -14,10 +14,10 @@ import ( "entgo.io/contrib/entgql" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" + "github.com/vektah/gqlparser/v2/ast" "realm.pub/tavern/internal/ent" "realm.pub/tavern/internal/ent/host" "realm.pub/tavern/internal/ent/tag" - "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** @@ -61,7 +61,7 @@ func (ec *executionContext) field_Query_beacons_args(ctx context.Context, rawArg var arg0 *ent.BeaconWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOBeaconWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOBeaconWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func (ec *executionContext) field_Query_files_args(ctx context.Context, rawArgs var arg0 *ent.FileWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOFileWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOFileWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -91,7 +91,7 @@ func (ec *executionContext) field_Query_hosts_args(ctx context.Context, rawArgs var arg0 *ent.HostWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOHostWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOHostWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -136,7 +136,7 @@ func (ec *executionContext) field_Query_quests_args(ctx context.Context, rawArgs var arg0 *ent.QuestWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOQuestWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOQuestWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -151,7 +151,7 @@ func (ec *executionContext) field_Query_tags_args(ctx context.Context, rawArgs m var arg0 *ent.TagWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOTagWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOTagWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -202,7 +202,7 @@ func (ec *executionContext) field_Query_tasks_args(ctx context.Context, rawArgs var arg4 []*ent.TaskOrder if tmp, ok := rawArgs["orderBy"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderBy")) - arg4, err = ec.unmarshalOTaskOrder2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderᚄ(ctx, tmp) + arg4, err = ec.unmarshalOTaskOrder2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrderᚄ(ctx, tmp) if err != nil { return nil, err } @@ -211,7 +211,7 @@ func (ec *executionContext) field_Query_tasks_args(ctx context.Context, rawArgs var arg5 *ent.TaskWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg5, err = ec.unmarshalOTaskWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, tmp) + arg5, err = ec.unmarshalOTaskWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -226,7 +226,7 @@ func (ec *executionContext) field_Query_tomes_args(ctx context.Context, rawArgs var arg0 *ent.TomeWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOTomeWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOTomeWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -241,7 +241,7 @@ func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs var arg0 *ent.UserWhereInput if tmp, ok := rawArgs["where"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) - arg0, err = ec.unmarshalOUserWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, tmp) + arg0, err = ec.unmarshalOUserWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, tmp) if err != nil { return nil, err } @@ -582,7 +582,7 @@ func (ec *executionContext) _Beacon_host(ctx context.Context, field graphql.Coll } res := resTmp.(*ent.Host) fc.Result = res - return ec.marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx, field.Selections, res) + return ec.marshalNHost2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Beacon_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -641,7 +641,7 @@ func (ec *executionContext) _Beacon_tasks(ctx context.Context, field graphql.Col } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalOTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalOTask2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Beacon_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1141,7 +1141,7 @@ func (ec *executionContext) _Host_platform(ctx context.Context, field graphql.Co } res := resTmp.(host.Platform) fc.Result = res - return ec.marshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, field.Selections, res) + return ec.marshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Host_platform(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1223,7 +1223,7 @@ func (ec *executionContext) _Host_tags(ctx context.Context, field graphql.Collec } res := resTmp.([]*ent.Tag) fc.Result = res - return ec.marshalOTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) + return ec.marshalOTag2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Host_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1274,7 +1274,7 @@ func (ec *executionContext) _Host_beacons(ctx context.Context, field graphql.Col } res := resTmp.([]*ent.Beacon) fc.Result = res - return ec.marshalOBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) + return ec.marshalOBeacon2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Host_beacons(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1505,7 +1505,7 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle } res := resTmp.(ent.Noder) fc.Result = res - return ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalONode2realmᚗpubᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1560,7 +1560,7 @@ func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.Coll } res := resTmp.([]ent.Noder) fc.Result = res - return ec.marshalNNode2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalNNode2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1605,7 +1605,7 @@ func (ec *executionContext) _Query_files(ctx context.Context, field graphql.Coll return ec.resolvers.Query().Files(rctx, fc.Args["where"].(*ent.FileWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -1639,7 +1639,7 @@ func (ec *executionContext) _Query_files(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.File) fc.Result = res - return ec.marshalNFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) + return ec.marshalNFile2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1698,7 +1698,7 @@ func (ec *executionContext) _Query_quests(ctx context.Context, field graphql.Col return ec.resolvers.Query().Quests(rctx, fc.Args["where"].(*ent.QuestWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -1732,7 +1732,7 @@ func (ec *executionContext) _Query_quests(ctx context.Context, field graphql.Col } res := resTmp.([]*ent.Quest) fc.Result = res - return ec.marshalNQuest2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx, field.Selections, res) + return ec.marshalNQuest2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_quests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1797,7 +1797,7 @@ func (ec *executionContext) _Query_tasks(ctx context.Context, field graphql.Coll return ec.resolvers.Query().Tasks(rctx, fc.Args["after"].(*entgql.Cursor[int]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[int]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.TaskOrder), fc.Args["where"].(*ent.TaskWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -1831,7 +1831,7 @@ func (ec *executionContext) _Query_tasks(ctx context.Context, field graphql.Coll } res := resTmp.(*ent.TaskConnection) fc.Result = res - return ec.marshalNTaskConnection2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskConnection(ctx, field.Selections, res) + return ec.marshalNTaskConnection2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1884,7 +1884,7 @@ func (ec *executionContext) _Query_beacons(ctx context.Context, field graphql.Co return ec.resolvers.Query().Beacons(rctx, fc.Args["where"].(*ent.BeaconWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -1918,7 +1918,7 @@ func (ec *executionContext) _Query_beacons(ctx context.Context, field graphql.Co } res := resTmp.([]*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_beacons(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1983,7 +1983,7 @@ func (ec *executionContext) _Query_hosts(ctx context.Context, field graphql.Coll return ec.resolvers.Query().Hosts(rctx, fc.Args["where"].(*ent.HostWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -2017,7 +2017,7 @@ func (ec *executionContext) _Query_hosts(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Host) fc.Result = res - return ec.marshalNHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostᚄ(ctx, field.Selections, res) + return ec.marshalNHost2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_hosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2080,7 +2080,7 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle return ec.resolvers.Query().Tags(rctx, fc.Args["where"].(*ent.TagWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -2114,7 +2114,7 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle } res := resTmp.([]*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) + return ec.marshalNTag2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2169,7 +2169,7 @@ func (ec *executionContext) _Query_tomes(ctx context.Context, field graphql.Coll return ec.resolvers.Query().Tomes(rctx, fc.Args["where"].(*ent.TomeWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -2203,7 +2203,7 @@ func (ec *executionContext) _Query_tomes(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx, field.Selections, res) + return ec.marshalNTome2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_tomes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2266,7 +2266,7 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll return ec.resolvers.Query().Users(rctx, fc.Args["where"].(*ent.UserWhereInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -2300,7 +2300,7 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.User) fc.Result = res - return ec.marshalNUser2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserᚄ(ctx, field.Selections, res) + return ec.marshalNUser2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_users(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2367,7 +2367,7 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect } res := resTmp.(*ent.User) fc.Result = res - return ec.marshalNUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalNUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_me(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2769,7 +2769,7 @@ func (ec *executionContext) _Quest_tome(ctx context.Context, field graphql.Colle } res := resTmp.(*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) + return ec.marshalNTome2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_tome(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2828,7 +2828,7 @@ func (ec *executionContext) _Quest_bundle(ctx context.Context, field graphql.Col } res := resTmp.(*ent.File) fc.Result = res - return ec.marshalOFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, field.Selections, res) + return ec.marshalOFile2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFile(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_bundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2883,7 +2883,7 @@ func (ec *executionContext) _Quest_tasks(ctx context.Context, field graphql.Coll } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalOTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalOTask2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2946,7 +2946,7 @@ func (ec *executionContext) _Quest_creator(ctx context.Context, field graphql.Co } res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Quest_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3090,7 +3090,7 @@ func (ec *executionContext) _Tag_kind(ctx context.Context, field graphql.Collect } res := resTmp.(tag.Kind) fc.Result = res - return ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, field.Selections, res) + return ec.marshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tag_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3131,7 +3131,7 @@ func (ec *executionContext) _Tag_hosts(ctx context.Context, field graphql.Collec } res := resTmp.([]*ent.Host) fc.Result = res - return ec.marshalOHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostᚄ(ctx, field.Selections, res) + return ec.marshalOHost2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tag_hosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3530,7 +3530,7 @@ func (ec *executionContext) _Task_quest(ctx context.Context, field graphql.Colle } res := resTmp.(*ent.Quest) fc.Result = res - return ec.marshalNQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) + return ec.marshalNQuest2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Task_quest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3594,7 +3594,7 @@ func (ec *executionContext) _Task_beacon(ctx context.Context, field graphql.Coll } res := resTmp.(*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Task_beacon(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3655,7 +3655,7 @@ func (ec *executionContext) _TaskConnection_edges(ctx context.Context, field gra } res := resTmp.([]*ent.TaskEdge) fc.Result = res - return ec.marshalOTaskEdge2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskEdge(ctx, field.Selections, res) + return ec.marshalOTaskEdge2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskEdge(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_TaskConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3800,7 +3800,7 @@ func (ec *executionContext) _TaskEdge_node(ctx context.Context, field graphql.Co } res := resTmp.(*ent.Task) fc.Result = res - return ec.marshalOTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, field.Selections, res) + return ec.marshalOTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_TaskEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4212,7 +4212,7 @@ func (ec *executionContext) _Tome_files(ctx context.Context, field graphql.Colle } res := resTmp.([]*ent.File) fc.Result = res - return ec.marshalOFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) + return ec.marshalOFile2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Tome_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4497,7 +4497,7 @@ func (ec *executionContext) unmarshalInputBeaconOrder(ctx context.Context, obj i var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNBeaconOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx, v) + data, err := ec.unmarshalNBeaconOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx, v) if err != nil { return it, err } @@ -4526,7 +4526,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOBeaconWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, v) + data, err := ec.unmarshalOBeaconWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, v) if err != nil { return it, err } @@ -4535,7 +4535,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -4544,7 +4544,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5318,7 +5318,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasHostWith")) - data, err := ec.unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOHostWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5336,7 +5336,7 @@ func (ec *executionContext) unmarshalInputBeaconWhereInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTasksWith")) - data, err := ec.unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTaskWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5421,7 +5421,7 @@ func (ec *executionContext) unmarshalInputCreateTagInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) + data, err := ec.unmarshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -5537,7 +5537,7 @@ func (ec *executionContext) unmarshalInputFileOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNFileOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx, v) + data, err := ec.unmarshalNFileOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileOrderField(ctx, v) if err != nil { return it, err } @@ -5566,7 +5566,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOFileWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, v) + data, err := ec.unmarshalOFileWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, v) if err != nil { return it, err } @@ -5575,7 +5575,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOFileWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -5584,7 +5584,7 @@ func (ec *executionContext) unmarshalInputFileWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOFileWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6148,7 +6148,7 @@ func (ec *executionContext) unmarshalInputHostOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNHostOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostOrderField(ctx, v) + data, err := ec.unmarshalNHostOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostOrderField(ctx, v) if err != nil { return it, err } @@ -6177,7 +6177,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOHostWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, v) + data, err := ec.unmarshalOHostWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, v) if err != nil { return it, err } @@ -6186,7 +6186,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOHostWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6195,7 +6195,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOHostWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6663,7 +6663,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("platform")) - data, err := ec.unmarshalOHostPlatform2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) + data, err := ec.unmarshalOHostPlatform2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) if err != nil { return it, err } @@ -6672,7 +6672,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("platformNEQ")) - data, err := ec.unmarshalOHostPlatform2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) + data, err := ec.unmarshalOHostPlatform2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) if err != nil { return it, err } @@ -6681,7 +6681,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("platformIn")) - data, err := ec.unmarshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx, v) + data, err := ec.unmarshalOHostPlatform2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx, v) if err != nil { return it, err } @@ -6690,7 +6690,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("platformNotIn")) - data, err := ec.unmarshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx, v) + data, err := ec.unmarshalOHostPlatform2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx, v) if err != nil { return it, err } @@ -6798,7 +6798,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTagsWith")) - data, err := ec.unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTagWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6816,7 +6816,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBeaconsWith")) - data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6858,7 +6858,7 @@ func (ec *executionContext) unmarshalInputQuestOrder(ctx context.Context, obj in var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNQuestOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx, v) + data, err := ec.unmarshalNQuestOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx, v) if err != nil { return it, err } @@ -6887,7 +6887,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOQuestWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, v) + data, err := ec.unmarshalOQuestWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, v) if err != nil { return it, err } @@ -6896,7 +6896,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOQuestWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -6905,7 +6905,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOQuestWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7391,7 +7391,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTomeWith")) - data, err := ec.unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTomeWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7409,7 +7409,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBundleWith")) - data, err := ec.unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOFileWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7427,7 +7427,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTasksWith")) - data, err := ec.unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTaskWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7445,7 +7445,7 @@ func (ec *executionContext) unmarshalInputQuestWhereInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasCreatorWith")) - data, err := ec.unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOUserWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7487,7 +7487,7 @@ func (ec *executionContext) unmarshalInputTagOrder(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNTagOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx, v) + data, err := ec.unmarshalNTagOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagOrderField(ctx, v) if err != nil { return it, err } @@ -7516,7 +7516,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOTagWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, v) + data, err := ec.unmarshalOTagWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, v) if err != nil { return it, err } @@ -7525,7 +7525,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTagWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7534,7 +7534,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTagWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7732,7 +7732,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) + data, err := ec.unmarshalOTagKind2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -7741,7 +7741,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindNEQ")) - data, err := ec.unmarshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) + data, err := ec.unmarshalOTagKind2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -7750,7 +7750,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindIn")) - data, err := ec.unmarshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) + data, err := ec.unmarshalOTagKind2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) if err != nil { return it, err } @@ -7759,7 +7759,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kindNotIn")) - data, err := ec.unmarshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) + data, err := ec.unmarshalOTagKind2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx, v) if err != nil { return it, err } @@ -7777,7 +7777,7 @@ func (ec *executionContext) unmarshalInputTagWhereInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasHostsWith")) - data, err := ec.unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOHostWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7819,7 +7819,7 @@ func (ec *executionContext) unmarshalInputTaskOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNTaskOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx, v) + data, err := ec.unmarshalNTaskOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx, v) if err != nil { return it, err } @@ -7848,7 +7848,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOTaskWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, v) + data, err := ec.unmarshalOTaskWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, v) if err != nil { return it, err } @@ -7857,7 +7857,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTaskWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -7866,7 +7866,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTaskWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -8640,7 +8640,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasQuestWith")) - data, err := ec.unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOQuestWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -8658,7 +8658,7 @@ func (ec *executionContext) unmarshalInputTaskWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBeaconWith")) - data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBeaconWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -8700,7 +8700,7 @@ func (ec *executionContext) unmarshalInputTomeOrder(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNTomeOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx, v) + data, err := ec.unmarshalNTomeOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx, v) if err != nil { return it, err } @@ -8729,7 +8729,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOTomeWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, v) + data, err := ec.unmarshalOTomeWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, v) if err != nil { return it, err } @@ -8738,7 +8738,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTomeWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -8747,7 +8747,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTomeWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -9467,7 +9467,7 @@ func (ec *executionContext) unmarshalInputTomeWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasFilesWith")) - data, err := ec.unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOFileWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -9626,7 +9626,7 @@ func (ec *executionContext) unmarshalInputUpdateTagInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) + data, err := ec.unmarshalOTagKind2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, v) if err != nil { return it, err } @@ -9738,7 +9738,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOUserWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, v) + data, err := ec.unmarshalOUserWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, v) if err != nil { return it, err } @@ -9747,7 +9747,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOUserWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -9756,7 +9756,7 @@ func (ec *executionContext) unmarshalInputUserWhereInput(ctx context.Context, ob var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOUserWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -11467,11 +11467,11 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNBeacon2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2realmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v ent.Beacon) graphql.Marshaler { return ec._Beacon(ctx, sel, &v) } -func (ec *executionContext) marshalNBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11495,7 +11495,7 @@ func (ec *executionContext) marshalNBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋreal if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) + ret[i] = ec.marshalNBeacon2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11515,7 +11515,7 @@ func (ec *executionContext) marshalNBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋreal return ret } -func (ec *executionContext) marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v *ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalNBeacon2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx context.Context, sel ast.SelectionSet, v *ent.Beacon) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11525,13 +11525,13 @@ func (ec *executionContext) marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealm return ec._Beacon(ctx, sel, v) } -func (ec *executionContext) unmarshalNBeaconOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, v interface{}) (*ent.BeaconOrderField, error) { +func (ec *executionContext) unmarshalNBeaconOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, v interface{}) (*ent.BeaconOrderField, error) { var res = new(ent.BeaconOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNBeaconOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.BeaconOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNBeaconOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.BeaconOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11541,22 +11541,22 @@ func (ec *executionContext) marshalNBeaconOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNBeaconWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalNBeaconWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { res, err := ec.unmarshalInputBeaconWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx context.Context, v interface{}) (ent.CreateQuestInput, error) { +func (ec *executionContext) unmarshalNCreateQuestInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx context.Context, v interface{}) (ent.CreateQuestInput, error) { res, err := ec.unmarshalInputCreateQuestInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx context.Context, v interface{}) (ent.CreateTagInput, error) { +func (ec *executionContext) unmarshalNCreateTagInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx context.Context, v interface{}) (ent.CreateTagInput, error) { res, err := ec.unmarshalInputCreateTagInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx context.Context, v interface{}) (ent.CreateTomeInput, error) { +func (ec *executionContext) unmarshalNCreateTomeInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx context.Context, v interface{}) (ent.CreateTomeInput, error) { res, err := ec.unmarshalInputCreateTomeInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } @@ -11571,7 +11571,7 @@ func (ec *executionContext) marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCurso return v } -func (ec *executionContext) marshalNFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { +func (ec *executionContext) marshalNFile2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11595,7 +11595,7 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) + ret[i] = ec.marshalNFile2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11615,7 +11615,7 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { +func (ec *executionContext) marshalNFile2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11625,13 +11625,13 @@ func (ec *executionContext) marshalNFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋt return ec._File(ctx, sel, v) } -func (ec *executionContext) unmarshalNFileOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, v interface{}) (*ent.FileOrderField, error) { +func (ec *executionContext) unmarshalNFileOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, v interface{}) (*ent.FileOrderField, error) { var res = new(ent.FileOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNFileOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.FileOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNFileOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.FileOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11641,16 +11641,16 @@ func (ec *executionContext) marshalNFileOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNFileWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalNFileWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { res, err := ec.unmarshalInputFileWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNHost2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx context.Context, sel ast.SelectionSet, v ent.Host) graphql.Marshaler { +func (ec *executionContext) marshalNHost2realmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx context.Context, sel ast.SelectionSet, v ent.Host) graphql.Marshaler { return ec._Host(ctx, sel, &v) } -func (ec *executionContext) marshalNHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Host) graphql.Marshaler { +func (ec *executionContext) marshalNHost2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Host) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11674,7 +11674,7 @@ func (ec *executionContext) marshalNHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx, sel, v[i]) + ret[i] = ec.marshalNHost2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11694,7 +11694,7 @@ func (ec *executionContext) marshalNHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx context.Context, sel ast.SelectionSet, v *ent.Host) graphql.Marshaler { +func (ec *executionContext) marshalNHost2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx context.Context, sel ast.SelectionSet, v *ent.Host) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11704,13 +11704,13 @@ func (ec *executionContext) marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋt return ec._Host(ctx, sel, v) } -func (ec *executionContext) unmarshalNHostOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostOrderField(ctx context.Context, v interface{}) (*ent.HostOrderField, error) { +func (ec *executionContext) unmarshalNHostOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostOrderField(ctx context.Context, v interface{}) (*ent.HostOrderField, error) { var res = new(ent.HostOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNHostOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.HostOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNHostOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.HostOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11720,22 +11720,22 @@ func (ec *executionContext) marshalNHostOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, v interface{}) (host.Platform, error) { +func (ec *executionContext) unmarshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, v interface{}) (host.Platform, error) { var res host.Platform err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, sel ast.SelectionSet, v host.Platform) graphql.Marshaler { +func (ec *executionContext) marshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, sel ast.SelectionSet, v host.Platform) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNHostWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx context.Context, v interface{}) (*ent.HostWhereInput, error) { +func (ec *executionContext) unmarshalNHostWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx context.Context, v interface{}) (*ent.HostWhereInput, error) { res, err := ec.unmarshalInputHostWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNNode2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v []ent.Noder) graphql.Marshaler { +func (ec *executionContext) marshalNNode2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v []ent.Noder) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11759,7 +11759,7 @@ func (ec *executionContext) marshalNNode2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋt if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx, sel, v[i]) + ret[i] = ec.marshalONode2realmᚗpubᚋtavernᚋinternalᚋentᚐNoder(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11787,7 +11787,7 @@ func (ec *executionContext) marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPag return ec._PageInfo(ctx, sel, &v) } -func (ec *executionContext) marshalNQuest2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalNQuest2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Quest) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11811,7 +11811,7 @@ func (ec *executionContext) marshalNQuest2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, sel, v[i]) + ret[i] = ec.marshalNQuest2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuest(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11831,7 +11831,7 @@ func (ec *executionContext) marshalNQuest2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalNQuest2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11841,13 +11841,13 @@ func (ec *executionContext) marshalNQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋ return ec._Quest(ctx, sel, v) } -func (ec *executionContext) unmarshalNQuestOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, v interface{}) (*ent.QuestOrderField, error) { +func (ec *executionContext) unmarshalNQuestOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, v interface{}) (*ent.QuestOrderField, error) { var res = new(ent.QuestOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNQuestOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.QuestOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNQuestOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.QuestOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11857,16 +11857,16 @@ func (ec *executionContext) marshalNQuestOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNQuestWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalNQuestWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { res, err := ec.unmarshalInputQuestWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTag2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2realmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v ent.Tag) graphql.Marshaler { return ec._Tag(ctx, sel, &v) } -func (ec *executionContext) marshalNTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11890,7 +11890,7 @@ func (ec *executionContext) marshalNTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) + ret[i] = ec.marshalNTag2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11910,7 +11910,7 @@ func (ec *executionContext) marshalNTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v *ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalNTag2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx context.Context, sel ast.SelectionSet, v *ent.Tag) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11920,23 +11920,23 @@ func (ec *executionContext) marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋta return ec._Tag(ctx, sel, v) } -func (ec *executionContext) unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (tag.Kind, error) { +func (ec *executionContext) unmarshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (tag.Kind, error) { var res tag.Kind err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v tag.Kind) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNTagOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, v interface{}) (*ent.TagOrderField, error) { +func (ec *executionContext) unmarshalNTagOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, v interface{}) (*ent.TagOrderField, error) { var res = new(ent.TagOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTagOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TagOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTagOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TagOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -11946,12 +11946,12 @@ func (ec *executionContext) marshalNTagOrderField2ᚖgithubᚗcomᚋkcarrettoᚋ return v } -func (ec *executionContext) unmarshalNTagWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalNTagWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { res, err := ec.unmarshalInputTagWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalNTask2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11975,7 +11975,7 @@ func (ec *executionContext) marshalNTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) + ret[i] = ec.marshalNTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11995,7 +11995,7 @@ func (ec *executionContext) marshalNTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalNTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12005,11 +12005,11 @@ func (ec *executionContext) marshalNTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋt return ec._Task(ctx, sel, v) } -func (ec *executionContext) marshalNTaskConnection2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskConnection(ctx context.Context, sel ast.SelectionSet, v ent.TaskConnection) graphql.Marshaler { +func (ec *executionContext) marshalNTaskConnection2realmᚗpubᚋtavernᚋinternalᚋentᚐTaskConnection(ctx context.Context, sel ast.SelectionSet, v ent.TaskConnection) graphql.Marshaler { return ec._TaskConnection(ctx, sel, &v) } -func (ec *executionContext) marshalNTaskConnection2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskConnection(ctx context.Context, sel ast.SelectionSet, v *ent.TaskConnection) graphql.Marshaler { +func (ec *executionContext) marshalNTaskConnection2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskConnection(ctx context.Context, sel ast.SelectionSet, v *ent.TaskConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12019,18 +12019,18 @@ func (ec *executionContext) marshalNTaskConnection2ᚖgithubᚗcomᚋkcarretto return ec._TaskConnection(ctx, sel, v) } -func (ec *executionContext) unmarshalNTaskOrder2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrder(ctx context.Context, v interface{}) (*ent.TaskOrder, error) { +func (ec *executionContext) unmarshalNTaskOrder2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrder(ctx context.Context, v interface{}) (*ent.TaskOrder, error) { res, err := ec.unmarshalInputTaskOrder(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNTaskOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, v interface{}) (*ent.TaskOrderField, error) { +func (ec *executionContext) unmarshalNTaskOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, v interface{}) (*ent.TaskOrderField, error) { var res = new(ent.TaskOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTaskOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TaskOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTaskOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TaskOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12040,16 +12040,16 @@ func (ec *executionContext) marshalNTaskOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNTaskWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalNTaskWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { res, err := ec.unmarshalInputTaskWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTome2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2realmᚗpubᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v ent.Tome) graphql.Marshaler { return ec._Tome(ctx, sel, &v) } -func (ec *executionContext) marshalNTome2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tome) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -12073,7 +12073,7 @@ func (ec *executionContext) marshalNTome2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTome2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, sel, v[i]) + ret[i] = ec.marshalNTome2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTome(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12093,7 +12093,7 @@ func (ec *executionContext) marshalNTome2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNTome2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v *ent.Tome) graphql.Marshaler { +func (ec *executionContext) marshalNTome2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTome(ctx context.Context, sel ast.SelectionSet, v *ent.Tome) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12103,13 +12103,13 @@ func (ec *executionContext) marshalNTome2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋt return ec._Tome(ctx, sel, v) } -func (ec *executionContext) unmarshalNTomeOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, v interface{}) (*ent.TomeOrderField, error) { +func (ec *executionContext) unmarshalNTomeOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, v interface{}) (*ent.TomeOrderField, error) { var res = new(ent.TomeOrderField) err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNTomeOrderField2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TomeOrderField) graphql.Marshaler { +func (ec *executionContext) marshalNTomeOrderField2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.TomeOrderField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12119,36 +12119,36 @@ func (ec *executionContext) marshalNTomeOrderField2ᚖgithubᚗcomᚋkcarretto return v } -func (ec *executionContext) unmarshalNTomeWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalNTomeWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { res, err := ec.unmarshalInputTomeWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx context.Context, v interface{}) (ent.UpdateBeaconInput, error) { +func (ec *executionContext) unmarshalNUpdateBeaconInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx context.Context, v interface{}) (ent.UpdateBeaconInput, error) { res, err := ec.unmarshalInputUpdateBeaconInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateHostInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateHostInput(ctx context.Context, v interface{}) (ent.UpdateHostInput, error) { +func (ec *executionContext) unmarshalNUpdateHostInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateHostInput(ctx context.Context, v interface{}) (ent.UpdateHostInput, error) { res, err := ec.unmarshalInputUpdateHostInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx context.Context, v interface{}) (ent.UpdateTagInput, error) { +func (ec *executionContext) unmarshalNUpdateTagInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx context.Context, v interface{}) (ent.UpdateTagInput, error) { res, err := ec.unmarshalInputUpdateTagInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx context.Context, v interface{}) (ent.UpdateUserInput, error) { +func (ec *executionContext) unmarshalNUpdateUserInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx context.Context, v interface{}) (ent.UpdateUserInput, error) { res, err := ec.unmarshalInputUpdateUserInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNUser2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v ent.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2realmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v ent.User) graphql.Marshaler { return ec._User(ctx, sel, &v) } -func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.User) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -12172,7 +12172,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, sel, v[i]) + ret[i] = ec.marshalNUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12192,7 +12192,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -12202,12 +12202,12 @@ func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋt return ec._User(ctx, sel, v) } -func (ec *executionContext) unmarshalNUserWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalNUserWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { res, err := ec.unmarshalInputUserWhereInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { +func (ec *executionContext) marshalOBeacon2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Beacon) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12234,7 +12234,7 @@ func (ec *executionContext) marshalOBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋreal if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) + ret[i] = ec.marshalNBeacon2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12254,7 +12254,7 @@ func (ec *executionContext) marshalOBeacon2ᚕᚖgithubᚗcomᚋkcarrettoᚋreal return ret } -func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.BeaconWhereInput, error) { if v == nil { return nil, nil } @@ -12266,7 +12266,7 @@ func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcar res := make([]*ent.BeaconWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNBeaconWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNBeaconWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12274,7 +12274,7 @@ func (ec *executionContext) unmarshalOBeaconWhereInput2ᚕᚖgithubᚗcomᚋkcar return res, nil } -func (ec *executionContext) unmarshalOBeaconWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { +func (ec *executionContext) unmarshalOBeaconWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeaconWhereInput(ctx context.Context, v interface{}) (*ent.BeaconWhereInput, error) { if v == nil { return nil, nil } @@ -12298,7 +12298,7 @@ func (ec *executionContext) marshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCu return v } -func (ec *executionContext) marshalOFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { +func (ec *executionContext) marshalOFile2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.File) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12325,7 +12325,7 @@ func (ec *executionContext) marshalOFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) + ret[i] = ec.marshalNFile2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFile(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12345,14 +12345,14 @@ func (ec *executionContext) marshalOFile2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalOFile2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { +func (ec *executionContext) marshalOFile2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFile(ctx context.Context, sel ast.SelectionSet, v *ent.File) graphql.Marshaler { if v == nil { return graphql.Null } return ec._File(ctx, sel, v) } -func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.FileWhereInput, error) { if v == nil { return nil, nil } @@ -12364,7 +12364,7 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarre res := make([]*ent.FileWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNFileWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNFileWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12372,7 +12372,7 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚕᚖgithubᚗcomᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOFileWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { +func (ec *executionContext) unmarshalOFileWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐFileWhereInput(ctx context.Context, v interface{}) (*ent.FileWhereInput, error) { if v == nil { return nil, nil } @@ -12380,7 +12380,7 @@ func (ec *executionContext) unmarshalOFileWhereInput2ᚖgithubᚗcomᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Host) graphql.Marshaler { +func (ec *executionContext) marshalOHost2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Host) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12407,7 +12407,7 @@ func (ec *executionContext) marshalOHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx, sel, v[i]) + ret[i] = ec.marshalNHost2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12427,7 +12427,7 @@ func (ec *executionContext) marshalOHost2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) unmarshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx context.Context, v interface{}) ([]host.Platform, error) { +func (ec *executionContext) unmarshalOHostPlatform2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx context.Context, v interface{}) ([]host.Platform, error) { if v == nil { return nil, nil } @@ -12439,7 +12439,7 @@ func (ec *executionContext) unmarshalOHostPlatform2ᚕgithubᚗcomᚋkcarretto res := make([]host.Platform, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, vSlice[i]) + res[i], err = ec.unmarshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12447,7 +12447,7 @@ func (ec *executionContext) unmarshalOHostPlatform2ᚕgithubᚗcomᚋkcarretto return res, nil } -func (ec *executionContext) marshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx context.Context, sel ast.SelectionSet, v []host.Platform) graphql.Marshaler { +func (ec *executionContext) marshalOHostPlatform2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatformᚄ(ctx context.Context, sel ast.SelectionSet, v []host.Platform) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12474,7 +12474,7 @@ func (ec *executionContext) marshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋr if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, sel, v[i]) + ret[i] = ec.marshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12494,7 +12494,7 @@ func (ec *executionContext) marshalOHostPlatform2ᚕgithubᚗcomᚋkcarrettoᚋr return ret } -func (ec *executionContext) unmarshalOHostPlatform2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, v interface{}) (*host.Platform, error) { +func (ec *executionContext) unmarshalOHostPlatform2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, v interface{}) (*host.Platform, error) { if v == nil { return nil, nil } @@ -12503,14 +12503,14 @@ func (ec *executionContext) unmarshalOHostPlatform2ᚖgithubᚗcomᚋkcarretto return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOHostPlatform2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, sel ast.SelectionSet, v *host.Platform) graphql.Marshaler { +func (ec *executionContext) marshalOHostPlatform2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx context.Context, sel ast.SelectionSet, v *host.Platform) graphql.Marshaler { if v == nil { return graphql.Null } return v } -func (ec *executionContext) unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.HostWhereInput, error) { +func (ec *executionContext) unmarshalOHostWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.HostWhereInput, error) { if v == nil { return nil, nil } @@ -12522,7 +12522,7 @@ func (ec *executionContext) unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarre res := make([]*ent.HostWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNHostWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNHostWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12530,7 +12530,7 @@ func (ec *executionContext) unmarshalOHostWhereInput2ᚕᚖgithubᚗcomᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOHostWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx context.Context, v interface{}) (*ent.HostWhereInput, error) { +func (ec *executionContext) unmarshalOHostWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHostWhereInput(ctx context.Context, v interface{}) (*ent.HostWhereInput, error) { if v == nil { return nil, nil } @@ -12538,21 +12538,21 @@ func (ec *executionContext) unmarshalOHostWhereInput2ᚖgithubᚗcomᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalONode2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v ent.Noder) graphql.Marshaler { +func (ec *executionContext) marshalONode2realmᚗpubᚋtavernᚋinternalᚋentᚐNoder(ctx context.Context, sel ast.SelectionSet, v ent.Noder) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Node(ctx, sel, v) } -func (ec *executionContext) marshalOQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { +func (ec *executionContext) marshalOQuest2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuest(ctx context.Context, sel ast.SelectionSet, v *ent.Quest) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Quest(ctx, sel, v) } -func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.QuestWhereInput, error) { if v == nil { return nil, nil } @@ -12564,7 +12564,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarr res := make([]*ent.QuestWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNQuestWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNQuestWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12572,7 +12572,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚕᚖgithubᚗcomᚋkcarr return res, nil } -func (ec *executionContext) unmarshalOQuestWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { +func (ec *executionContext) unmarshalOQuestWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuestWhereInput(ctx context.Context, v interface{}) (*ent.QuestWhereInput, error) { if v == nil { return nil, nil } @@ -12580,7 +12580,7 @@ func (ec *executionContext) unmarshalOQuestWhereInput2ᚖgithubᚗcomᚋkcarrett return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { +func (ec *executionContext) marshalOTag2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Tag) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12607,7 +12607,7 @@ func (ec *executionContext) marshalOTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) + ret[i] = ec.marshalNTag2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12627,7 +12627,7 @@ func (ec *executionContext) marshalOTag2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) unmarshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, v interface{}) ([]tag.Kind, error) { +func (ec *executionContext) unmarshalOTagKind2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, v interface{}) ([]tag.Kind, error) { if v == nil { return nil, nil } @@ -12639,7 +12639,7 @@ func (ec *executionContext) unmarshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋreal res := make([]tag.Kind, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12647,7 +12647,7 @@ func (ec *executionContext) unmarshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋreal return res, nil } -func (ec *executionContext) marshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, sel ast.SelectionSet, v []tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalOTagKind2ᚕrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKindᚄ(ctx context.Context, sel ast.SelectionSet, v []tag.Kind) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12674,7 +12674,7 @@ func (ec *executionContext) marshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTagKind2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, sel, v[i]) + ret[i] = ec.marshalNTagKind2realmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12694,7 +12694,7 @@ func (ec *executionContext) marshalOTagKind2ᚕgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) unmarshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (*tag.Kind, error) { +func (ec *executionContext) unmarshalOTagKind2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, v interface{}) (*tag.Kind, error) { if v == nil { return nil, nil } @@ -12703,14 +12703,14 @@ func (ec *executionContext) unmarshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋreal return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTagKind2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v *tag.Kind) graphql.Marshaler { +func (ec *executionContext) marshalOTagKind2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚋtagᚐKind(ctx context.Context, sel ast.SelectionSet, v *tag.Kind) graphql.Marshaler { if v == nil { return graphql.Null } return v } -func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TagWhereInput, error) { if v == nil { return nil, nil } @@ -12722,7 +12722,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarret res := make([]*ent.TagWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTagWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTagWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12730,7 +12730,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚕᚖgithubᚗcomᚋkcarret return res, nil } -func (ec *executionContext) unmarshalOTagWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { +func (ec *executionContext) unmarshalOTagWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTagWhereInput(ctx context.Context, v interface{}) (*ent.TagWhereInput, error) { if v == nil { return nil, nil } @@ -12738,7 +12738,7 @@ func (ec *executionContext) unmarshalOTagWhereInput2ᚖgithubᚗcomᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalOTask2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.Task) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12765,7 +12765,7 @@ func (ec *executionContext) marshalOTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) + ret[i] = ec.marshalNTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12785,14 +12785,14 @@ func (ec *executionContext) marshalOTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealm return ret } -func (ec *executionContext) marshalOTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { +func (ec *executionContext) marshalOTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx context.Context, sel ast.SelectionSet, v *ent.Task) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Task(ctx, sel, v) } -func (ec *executionContext) marshalOTaskEdge2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskEdge(ctx context.Context, sel ast.SelectionSet, v []*ent.TaskEdge) graphql.Marshaler { +func (ec *executionContext) marshalOTaskEdge2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskEdge(ctx context.Context, sel ast.SelectionSet, v []*ent.TaskEdge) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12819,7 +12819,7 @@ func (ec *executionContext) marshalOTaskEdge2ᚕᚖgithubᚗcomᚋkcarrettoᚋre if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOTaskEdge2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskEdge(ctx, sel, v[i]) + ret[i] = ec.marshalOTaskEdge2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12833,14 +12833,14 @@ func (ec *executionContext) marshalOTaskEdge2ᚕᚖgithubᚗcomᚋkcarrettoᚋre return ret } -func (ec *executionContext) marshalOTaskEdge2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskEdge(ctx context.Context, sel ast.SelectionSet, v *ent.TaskEdge) graphql.Marshaler { +func (ec *executionContext) marshalOTaskEdge2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskEdge(ctx context.Context, sel ast.SelectionSet, v *ent.TaskEdge) graphql.Marshaler { if v == nil { return graphql.Null } return ec._TaskEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalOTaskOrder2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrderᚄ(ctx context.Context, v interface{}) ([]*ent.TaskOrder, error) { +func (ec *executionContext) unmarshalOTaskOrder2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrderᚄ(ctx context.Context, v interface{}) ([]*ent.TaskOrder, error) { if v == nil { return nil, nil } @@ -12852,7 +12852,7 @@ func (ec *executionContext) unmarshalOTaskOrder2ᚕᚖgithubᚗcomᚋkcarretto res := make([]*ent.TaskOrder, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTaskOrder2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskOrder(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTaskOrder2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskOrder(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12860,7 +12860,7 @@ func (ec *executionContext) unmarshalOTaskOrder2ᚕᚖgithubᚗcomᚋkcarretto return res, nil } -func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TaskWhereInput, error) { if v == nil { return nil, nil } @@ -12872,7 +12872,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarre res := make([]*ent.TaskWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTaskWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTaskWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12880,7 +12880,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚕᚖgithubᚗcomᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOTaskWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { +func (ec *executionContext) unmarshalOTaskWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskWhereInput(ctx context.Context, v interface{}) (*ent.TaskWhereInput, error) { if v == nil { return nil, nil } @@ -12888,7 +12888,7 @@ func (ec *executionContext) unmarshalOTaskWhereInput2ᚖgithubᚗcomᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.TomeWhereInput, error) { if v == nil { return nil, nil } @@ -12900,7 +12900,7 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarre res := make([]*ent.TomeWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNTomeWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNTomeWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12908,7 +12908,7 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚕᚖgithubᚗcomᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOTomeWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { +func (ec *executionContext) unmarshalOTomeWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTomeWhereInput(ctx context.Context, v interface{}) (*ent.TomeWhereInput, error) { if v == nil { return nil, nil } @@ -12916,14 +12916,14 @@ func (ec *executionContext) unmarshalOTomeWhereInput2ᚖgithubᚗcomᚋkcarretto return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { +func (ec *executionContext) marshalOUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx context.Context, sel ast.SelectionSet, v *ent.User) graphql.Marshaler { if v == nil { return graphql.Null } return ec._User(ctx, sel, v) } -func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.UserWhereInput, error) { if v == nil { return nil, nil } @@ -12935,7 +12935,7 @@ func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarre res := make([]*ent.UserWhereInput, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNUserWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, vSlice[i]) + res[i], err = ec.unmarshalNUserWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12943,7 +12943,7 @@ func (ec *executionContext) unmarshalOUserWhereInput2ᚕᚖgithubᚗcomᚋkcarre return res, nil } -func (ec *executionContext) unmarshalOUserWhereInput2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { +func (ec *executionContext) unmarshalOUserWhereInput2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUserWhereInput(ctx context.Context, v interface{}) (*ent.UserWhereInput, error) { if v == nil { return nil, nil } diff --git a/tavern/internal/graphql/generated/inputs.generated.go b/tavern/internal/graphql/generated/inputs.generated.go index bfd286ba9..2280c2c00 100644 --- a/tavern/internal/graphql/generated/inputs.generated.go +++ b/tavern/internal/graphql/generated/inputs.generated.go @@ -63,7 +63,7 @@ func (ec *executionContext) unmarshalInputClaimTasksInput(ctx context.Context, o var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostPlatform")) - data, err := ec.unmarshalNHostPlatform2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) + data, err := ec.unmarshalNHostPlatform2realmᚗpubᚋtavernᚋinternalᚋentᚋhostᚐPlatform(ctx, v) if err != nil { return it, err } @@ -187,12 +187,12 @@ func (ec *executionContext) unmarshalInputSubmitTaskResultInput(ctx context.Cont // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx context.Context, v interface{}) (models.ClaimTasksInput, error) { +func (ec *executionContext) unmarshalNClaimTasksInput2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx context.Context, v interface{}) (models.ClaimTasksInput, error) { res, err := ec.unmarshalInputClaimTasksInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx context.Context, v interface{}) (models.SubmitTaskResultInput, error) { +func (ec *executionContext) unmarshalNSubmitTaskResultInput2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx context.Context, v interface{}) (models.SubmitTaskResultInput, error) { res, err := ec.unmarshalInputSubmitTaskResultInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } diff --git a/tavern/internal/graphql/generated/mutation.generated.go b/tavern/internal/graphql/generated/mutation.generated.go index 069ed8dae..d16d2934e 100644 --- a/tavern/internal/graphql/generated/mutation.generated.go +++ b/tavern/internal/graphql/generated/mutation.generated.go @@ -10,9 +10,9 @@ import ( "sync/atomic" "github.com/99designs/gqlgen/graphql" + "github.com/vektah/gqlparser/v2/ast" "realm.pub/tavern/internal/ent" "realm.pub/tavern/internal/graphql/models" - "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** @@ -39,7 +39,7 @@ func (ec *executionContext) field_Mutation_claimTasks_args(ctx context.Context, var arg0 models.ClaimTasksInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNClaimTasksInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx, tmp) + arg0, err = ec.unmarshalNClaimTasksInput2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐClaimTasksInput(ctx, tmp) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func (ec *executionContext) field_Mutation_createQuest_args(ctx context.Context, var arg1 ent.CreateQuestInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNCreateQuestInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx, tmp) + arg1, err = ec.unmarshalNCreateQuestInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateQuestInput(ctx, tmp) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func (ec *executionContext) field_Mutation_createTag_args(ctx context.Context, r var arg0 ent.CreateTagInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx, tmp) + arg0, err = ec.unmarshalNCreateTagInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateTagInput(ctx, tmp) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func (ec *executionContext) field_Mutation_createTome_args(ctx context.Context, var arg0 ent.CreateTomeInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateTomeInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx, tmp) + arg0, err = ec.unmarshalNCreateTomeInput2realmᚗpubᚋtavernᚋinternalᚋentᚐCreateTomeInput(ctx, tmp) if err != nil { return nil, err } @@ -108,7 +108,7 @@ func (ec *executionContext) field_Mutation_submitTaskResult_args(ctx context.Con var arg0 models.SubmitTaskResultInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNSubmitTaskResultInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx, tmp) + arg0, err = ec.unmarshalNSubmitTaskResultInput2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐSubmitTaskResultInput(ctx, tmp) if err != nil { return nil, err } @@ -132,7 +132,7 @@ func (ec *executionContext) field_Mutation_updateBeacon_args(ctx context.Context var arg1 ent.UpdateBeaconInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateBeaconInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateBeaconInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateBeaconInput(ctx, tmp) if err != nil { return nil, err } @@ -156,7 +156,7 @@ func (ec *executionContext) field_Mutation_updateHost_args(ctx context.Context, var arg1 ent.UpdateHostInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateHostInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateHostInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateHostInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateHostInput(ctx, tmp) if err != nil { return nil, err } @@ -180,7 +180,7 @@ func (ec *executionContext) field_Mutation_updateTag_args(ctx context.Context, r var arg1 ent.UpdateTagInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateTagInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateTagInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateTagInput(ctx, tmp) if err != nil { return nil, err } @@ -204,7 +204,7 @@ func (ec *executionContext) field_Mutation_updateUser_args(ctx context.Context, var arg1 ent.UpdateUserInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg1, err = ec.unmarshalNUpdateUserInput2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx, tmp) + arg1, err = ec.unmarshalNUpdateUserInput2realmᚗpubᚋtavernᚋinternalᚋentᚐUpdateUserInput(ctx, tmp) if err != nil { return nil, err } @@ -239,7 +239,7 @@ func (ec *executionContext) _Mutation_createQuest(ctx context.Context, field gra return ec.resolvers.Mutation().CreateQuest(rctx, fc.Args["beaconIDs"].([]int), fc.Args["input"].(ent.CreateQuestInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -270,7 +270,7 @@ func (ec *executionContext) _Mutation_createQuest(ctx context.Context, field gra } res := resTmp.(*ent.Quest) fc.Result = res - return ec.marshalOQuest2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) + return ec.marshalOQuest2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐQuest(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createQuest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -335,7 +335,7 @@ func (ec *executionContext) _Mutation_updateBeacon(ctx context.Context, field gr return ec.resolvers.Mutation().UpdateBeacon(rctx, fc.Args["beaconID"].(int), fc.Args["input"].(ent.UpdateBeaconInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -369,7 +369,7 @@ func (ec *executionContext) _Mutation_updateBeacon(ctx context.Context, field gr } res := resTmp.(*ent.Beacon) fc.Result = res - return ec.marshalNBeacon2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) + return ec.marshalNBeacon2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐBeacon(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateBeacon(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -434,7 +434,7 @@ func (ec *executionContext) _Mutation_updateHost(ctx context.Context, field grap return ec.resolvers.Mutation().UpdateHost(rctx, fc.Args["hostID"].(int), fc.Args["input"].(ent.UpdateHostInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -468,7 +468,7 @@ func (ec *executionContext) _Mutation_updateHost(ctx context.Context, field grap } res := resTmp.(*ent.Host) fc.Result = res - return ec.marshalNHost2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐHost(ctx, field.Selections, res) + return ec.marshalNHost2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐHost(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -531,7 +531,7 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph return ec.resolvers.Mutation().CreateTag(rctx, fc.Args["input"].(ent.CreateTagInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") if err != nil { return nil, err } @@ -565,7 +565,7 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph } res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNTag2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -620,7 +620,7 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph return ec.resolvers.Mutation().UpdateTag(rctx, fc.Args["tagID"].(int), fc.Args["input"].(ent.UpdateTagInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -654,7 +654,7 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph } res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNTag2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNTag2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTag(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -719,7 +719,7 @@ func (ec *executionContext) _Mutation_claimTasks(ctx context.Context, field grap } res := resTmp.([]*ent.Task) fc.Result = res - return ec.marshalNTask2ᚕᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) + return ec.marshalNTask2ᚕᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTaskᚄ(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_claimTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -793,7 +793,7 @@ func (ec *executionContext) _Mutation_submitTaskResult(ctx context.Context, fiel } res := resTmp.(*ent.Task) fc.Result = res - return ec.marshalOTask2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTask(ctx, field.Selections, res) + return ec.marshalOTask2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTask(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_submitTaskResult(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -860,7 +860,7 @@ func (ec *executionContext) _Mutation_createTome(ctx context.Context, field grap return ec.resolvers.Mutation().CreateTome(rctx, fc.Args["input"].(ent.CreateTomeInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "USER") if err != nil { return nil, err } @@ -894,7 +894,7 @@ func (ec *executionContext) _Mutation_createTome(ctx context.Context, field grap } res := resTmp.(*ent.Tome) fc.Result = res - return ec.marshalNTome2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) + return ec.marshalNTome2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐTome(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_createTome(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -957,7 +957,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["userID"].(int), fc.Args["input"].(ent.UpdateUserInput)) } directive1 := func(ctx context.Context) (interface{}, error) { - role, err := ec.unmarshalNRole2githubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") + role, err := ec.unmarshalNRole2realmᚗpubᚋtavernᚋinternalᚋgraphqlᚋmodelsᚐRole(ctx, "ADMIN") if err != nil { return nil, err } @@ -988,7 +988,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap } res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOUser2ᚖgithubᚗcomᚋkcarrettoᚋrealmᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOUser2ᚖrealmᚗpubᚋtavernᚋinternalᚋentᚐUser(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { diff --git a/tavern/internal/graphql/generated/root_.generated.go b/tavern/internal/graphql/generated/root_.generated.go index ba522ede8..81432efc8 100644 --- a/tavern/internal/graphql/generated/root_.generated.go +++ b/tavern/internal/graphql/generated/root_.generated.go @@ -11,10 +11,10 @@ import ( "entgo.io/contrib/entgql" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "realm.pub/tavern/internal/ent" - "realm.pub/tavern/internal/graphql/models" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" + "realm.pub/tavern/internal/ent" + "realm.pub/tavern/internal/graphql/models" ) // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. From c018c74c3d2f6495d72bd374fa6e7abf6891f182 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 00:58:24 +0000 Subject: [PATCH 3/6] remove hash parameter, use gRPC headers instead --- tavern/internal/c2/c2.proto | 1 - tavern/internal/c2/c2pb/c2.pb.go | 47 +++++++++++++------------------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/tavern/internal/c2/c2.proto b/tavern/internal/c2/c2.proto index 8002d4661..8822a63f3 100644 --- a/tavern/internal/c2/c2.proto +++ b/tavern/internal/c2/c2.proto @@ -89,7 +89,6 @@ message DownloadFileRequest { } message DownloadFileResponse { bytes chunk = 1; - string hash = 2; } /* diff --git a/tavern/internal/c2/c2pb/c2.pb.go b/tavern/internal/c2/c2pb/c2.pb.go index deecd472d..9c544aaf9 100644 --- a/tavern/internal/c2/c2pb/c2.pb.go +++ b/tavern/internal/c2/c2pb/c2.pb.go @@ -703,7 +703,6 @@ type DownloadFileResponse struct { unknownFields protoimpl.UnknownFields Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (x *DownloadFileResponse) Reset() { @@ -745,13 +744,6 @@ func (x *DownloadFileResponse) GetChunk() []byte { return nil } -func (x *DownloadFileResponse) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - var File_c2_proto protoreflect.FileDescriptor var file_c2_proto_rawDesc = []byte{ @@ -829,28 +821,27 @@ var file_c2_proto_rawDesc = []byte{ 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x13, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x44, 0x6f, 0x77, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, 0xd9, 0x01, 0x0a, 0x02, - 0x43, 0x32, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, - 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4f, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, - 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x63, 0x61, 0x72, 0x72, 0x65, 0x74, 0x74, 0x6f, 0x2f, - 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x63, 0x32, 0x2f, 0x63, 0x32, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0xd9, 0x01, 0x0a, 0x02, 0x43, 0x32, 0x12, 0x3d, + 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x15, 0x2e, 0x63, + 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, + 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, + 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x17, + 0x2e, 0x63, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, 0x2e, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6b, 0x63, 0x61, 0x72, 0x72, 0x65, 0x74, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x76, 0x65, + 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x32, 0x2f, 0x63, + 0x32, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 7ff3d257e5599d07cf04bed192e72b86dcee09a2 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 01:01:09 +0000 Subject: [PATCH 4/6] generate rust gRPC bindings --- implants/lib/c2/src/c2.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/implants/lib/c2/src/c2.rs b/implants/lib/c2/src/c2.rs index d88a5b419..53d910c4e 100644 --- a/implants/lib/c2/src/c2.rs +++ b/implants/lib/c2/src/c2.rs @@ -143,6 +143,18 @@ pub struct ReportTaskOutputRequest { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportTaskOutputResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DownloadFileRequest { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DownloadFileResponse { + #[prost(bytes = "vec", tag = "1")] + pub chunk: ::prost::alloc::vec::Vec, +} /// Generated client implementations. pub mod c2_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -272,5 +284,27 @@ pub mod c2_client { req.extensions_mut().insert(GrpcMethod::new("c2.C2", "ReportTaskOutput")); self.inner.unary(req, path, codec).await } + pub async fn download_file( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/c2.C2/DownloadFile"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("c2.C2", "DownloadFile")); + self.inner.server_streaming(req, path, codec).await + } } } From c69b86f3c5374cc466522e32536f8376eebd9ad2 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 01:17:57 +0000 Subject: [PATCH 5/6] Updated documentation --- docs/_docs/dev-guide/tavern.md | 18 +++++------------- implants/lib/c2/src/c2.rs | 8 ++++++++ tavern/internal/c2/c2.proto | 11 +++++++++++ tavern/internal/c2/c2pb/c2_grpc.pb.go | 14 ++++++++++++++ 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/docs/_docs/dev-guide/tavern.md b/docs/_docs/dev-guide/tavern.md index 115e5aa6f..d56d66fe3 100644 --- a/docs/_docs/dev-guide/tavern.md +++ b/docs/_docs/dev-guide/tavern.md @@ -141,17 +141,6 @@ terraform apply -var="gcp_project=" -var="oauth_client_id=}}}` - -### Downloading Files - -* TODO (CDN is not yet added to Tavern) - ## GraphQL API ### Playground @@ -296,9 +285,12 @@ query get_task_res { Tavern also supports a gRPC API for agents to claim tasks and report execution output. This API is defined by our c2.proto spec and is still under active development. -### YAML Test Reference (gRPC) +### Downloading Files + +You may download files from Tavern utilizing the `DownloadFile` gRPC method. This method streams responses, each of which will contain a chunk of the desired file. We rely on the [ordering guarantees](https://grpc.io/docs/languages/go/basics/#defining-the-service) provided by gRPC to ensure the file is assembled correctly. This API also sets two headers to ensure the integrity of files: -Still under development. +* `sha3-checksum`: Set to the SHA3 hash of the entire file. +* `file-size`: Set to the number of bytes contained by the file. ## Performance Profiling diff --git a/implants/lib/c2/src/c2.rs b/implants/lib/c2/src/c2.rs index 53d910c4e..95ebac0e1 100644 --- a/implants/lib/c2/src/c2.rs +++ b/implants/lib/c2/src/c2.rs @@ -284,6 +284,14 @@ pub mod c2_client { req.extensions_mut().insert(GrpcMethod::new("c2.C2", "ReportTaskOutput")); self.inner.unary(req, path, codec).await } + /// + /// Download a file from the server, returning one or more chunks of data. + /// The maximum size of these chunks is determined by the server. + /// The server should reply with two headers: + /// - "sha3-checksum": A SHA3 digest of the entire file contents. + /// - "file-size": The number of bytes contained by the file. + /// + /// If no associated file can be found, a NotFound status error is returned. pub async fn download_file( &mut self, request: impl tonic::IntoRequest, diff --git a/tavern/internal/c2/c2.proto b/tavern/internal/c2/c2.proto index 8822a63f3..6688dc48a 100644 --- a/tavern/internal/c2/c2.proto +++ b/tavern/internal/c2/c2.proto @@ -87,6 +87,7 @@ message ReportTaskOutputResponse {} message DownloadFileRequest { string name = 1; } + message DownloadFileResponse { bytes chunk = 1; } @@ -98,5 +99,15 @@ message DownloadFileResponse { service C2 { rpc ClaimTasks(ClaimTasksRequest) returns (ClaimTasksResponse) {} rpc ReportTaskOutput(ReportTaskOutputRequest) returns (ReportTaskOutputResponse) {} + + /* + * Download a file from the server, returning one or more chunks of data. + * The maximum size of these chunks is determined by the server. + * The server should reply with two headers: + * - "sha3-checksum": A SHA3 digest of the entire file contents. + * - "file-size": The number of bytes contained by the file. + * + * If no associated file can be found, a NotFound status error is returned. + */ rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); } diff --git a/tavern/internal/c2/c2pb/c2_grpc.pb.go b/tavern/internal/c2/c2pb/c2_grpc.pb.go index 85be98676..687359704 100644 --- a/tavern/internal/c2/c2pb/c2_grpc.pb.go +++ b/tavern/internal/c2/c2pb/c2_grpc.pb.go @@ -24,6 +24,13 @@ const _ = grpc.SupportPackageIsVersion7 type C2Client interface { ClaimTasks(ctx context.Context, in *ClaimTasksRequest, opts ...grpc.CallOption) (*ClaimTasksResponse, error) ReportTaskOutput(ctx context.Context, in *ReportTaskOutputRequest, opts ...grpc.CallOption) (*ReportTaskOutputResponse, error) + // Download a file from the server, returning one or more chunks of data. + // The maximum size of these chunks is determined by the server. + // The server should reply with two headers: + // - "sha3-checksum": A SHA3 digest of the entire file contents. + // - "file-size": The number of bytes contained by the file. + // + // If no associated file can be found, a NotFound status error is returned. DownloadFile(ctx context.Context, in *DownloadFileRequest, opts ...grpc.CallOption) (C2_DownloadFileClient, error) } @@ -91,6 +98,13 @@ func (x *c2DownloadFileClient) Recv() (*DownloadFileResponse, error) { type C2Server interface { ClaimTasks(context.Context, *ClaimTasksRequest) (*ClaimTasksResponse, error) ReportTaskOutput(context.Context, *ReportTaskOutputRequest) (*ReportTaskOutputResponse, error) + // Download a file from the server, returning one or more chunks of data. + // The maximum size of these chunks is determined by the server. + // The server should reply with two headers: + // - "sha3-checksum": A SHA3 digest of the entire file contents. + // - "file-size": The number of bytes contained by the file. + // + // If no associated file can be found, a NotFound status error is returned. DownloadFile(*DownloadFileRequest, C2_DownloadFileServer) error mustEmbedUnimplementedC2Server() } From 75b34ffc4dbfbc11113691af9ce08ecbf0101056 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Sun, 21 Jan 2024 01:40:38 +0000 Subject: [PATCH 6/6] Rename header to sha3-256-checksum --- docs/_docs/dev-guide/tavern.md | 2 +- implants/lib/c2/src/c2.rs | 2 +- tavern/internal/c2/api_download_file.go | 2 +- tavern/internal/c2/api_download_file_test.go | 4 ++-- tavern/internal/c2/c2.proto | 2 +- tavern/internal/c2/c2pb/c2_grpc.pb.go | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_docs/dev-guide/tavern.md b/docs/_docs/dev-guide/tavern.md index d56d66fe3..26f4eb21a 100644 --- a/docs/_docs/dev-guide/tavern.md +++ b/docs/_docs/dev-guide/tavern.md @@ -289,7 +289,7 @@ Tavern also supports a gRPC API for agents to claim tasks and report execution o You may download files from Tavern utilizing the `DownloadFile` gRPC method. This method streams responses, each of which will contain a chunk of the desired file. We rely on the [ordering guarantees](https://grpc.io/docs/languages/go/basics/#defining-the-service) provided by gRPC to ensure the file is assembled correctly. This API also sets two headers to ensure the integrity of files: -* `sha3-checksum`: Set to the SHA3 hash of the entire file. +* `sha3-256-checksum`: Set to the SHA3 hash of the entire file. * `file-size`: Set to the number of bytes contained by the file. ## Performance Profiling diff --git a/implants/lib/c2/src/c2.rs b/implants/lib/c2/src/c2.rs index 95ebac0e1..4d42d83a5 100644 --- a/implants/lib/c2/src/c2.rs +++ b/implants/lib/c2/src/c2.rs @@ -288,7 +288,7 @@ pub mod c2_client { /// Download a file from the server, returning one or more chunks of data. /// The maximum size of these chunks is determined by the server. /// The server should reply with two headers: - /// - "sha3-checksum": A SHA3 digest of the entire file contents. + /// - "sha3-256-checksum": A SHA3-256 digest of the entire file contents. /// - "file-size": The number of bytes contained by the file. /// /// If no associated file can be found, a NotFound status error is returned. diff --git a/tavern/internal/c2/api_download_file.go b/tavern/internal/c2/api_download_file.go index de9247c00..b4a17c262 100644 --- a/tavern/internal/c2/api_download_file.go +++ b/tavern/internal/c2/api_download_file.go @@ -29,7 +29,7 @@ func (srv *Server) DownloadFile(req *c2pb.DownloadFileRequest, stream c2pb.C2_Do // Set Header Metadata stream.SetHeader(metadata.Pairs( - "sha3-checksum", f.Hash, + "sha3-256-checksum", f.Hash, "file-size", fmt.Sprintf("%d", f.Size), )) diff --git a/tavern/internal/c2/api_download_file_test.go b/tavern/internal/c2/api_download_file_test.go index bce79168c..d2261a4c5 100644 --- a/tavern/internal/c2/api_download_file_test.go +++ b/tavern/internal/c2/api_download_file_test.go @@ -98,8 +98,8 @@ func TestDownloadFile(t *testing.T) { // Assert Headers metadata, err := fileClient.Header() require.NoError(t, err) - require.Len(t, metadata.Get("sha3-checksum"), 1) - assert.Equal(t, f.Hash, metadata.Get("sha3-checksum")[0]) + require.Len(t, metadata.Get("sha3-256-checksum"), 1) + assert.Equal(t, f.Hash, metadata.Get("sha3-256-checksum")[0]) require.Len(t, metadata.Get("file-size"), 1) assert.Equal(t, fmt.Sprintf("%d", f.Size), metadata.Get("file-size")[0]) } diff --git a/tavern/internal/c2/c2.proto b/tavern/internal/c2/c2.proto index 6688dc48a..f2822ae12 100644 --- a/tavern/internal/c2/c2.proto +++ b/tavern/internal/c2/c2.proto @@ -104,7 +104,7 @@ service C2 { * Download a file from the server, returning one or more chunks of data. * The maximum size of these chunks is determined by the server. * The server should reply with two headers: - * - "sha3-checksum": A SHA3 digest of the entire file contents. + * - "sha3-256-checksum": A SHA3-256 digest of the entire file contents. * - "file-size": The number of bytes contained by the file. * * If no associated file can be found, a NotFound status error is returned. diff --git a/tavern/internal/c2/c2pb/c2_grpc.pb.go b/tavern/internal/c2/c2pb/c2_grpc.pb.go index 687359704..ef5f45110 100644 --- a/tavern/internal/c2/c2pb/c2_grpc.pb.go +++ b/tavern/internal/c2/c2pb/c2_grpc.pb.go @@ -27,7 +27,7 @@ type C2Client interface { // Download a file from the server, returning one or more chunks of data. // The maximum size of these chunks is determined by the server. // The server should reply with two headers: - // - "sha3-checksum": A SHA3 digest of the entire file contents. + // - "sha3-256-checksum": A SHA3-256 digest of the entire file contents. // - "file-size": The number of bytes contained by the file. // // If no associated file can be found, a NotFound status error is returned. @@ -101,7 +101,7 @@ type C2Server interface { // Download a file from the server, returning one or more chunks of data. // The maximum size of these chunks is determined by the server. // The server should reply with two headers: - // - "sha3-checksum": A SHA3 digest of the entire file contents. + // - "sha3-256-checksum": A SHA3-256 digest of the entire file contents. // - "file-size": The number of bytes contained by the file. // // If no associated file can be found, a NotFound status error is returned.