diff --git a/api/api.go b/api/api.go index 791af5645..1f31322f2 100644 --- a/api/api.go +++ b/api/api.go @@ -146,6 +146,11 @@ func startGrpcServer( Service: service.NewAccountLedgerService(queryExecutor), }) + // Set GRPC handler for escrow transaction request + rpcService.RegisterEscrowTransactionServiceServer(grpcServer, &handler.EscrowTransactionHandler{ + Service: service.NewEscrowTransactionService(queryExecutor), + }) + // run grpc-gateway handler go func() { if err := grpcServer.Serve(serv); err != nil { @@ -219,5 +224,6 @@ func runProxy(apiPort, rpcPort int) error { _ = rpcService.RegisterNodeAdminServiceHandlerFromEndpoint(ctx, mux, fmt.Sprintf("localhost:%d", rpcPort), opts) _ = rpcService.RegisterTransactionServiceHandlerFromEndpoint(ctx, mux, fmt.Sprintf("localhost:%d", rpcPort), opts) _ = rpcService.RegisterAccountLedgerServiceHandlerFromEndpoint(ctx, mux, fmt.Sprintf("localhost:%d", rpcPort), opts) + _ = rpcService.RegisterEscrowTransactionServiceHandlerFromEndpoint(ctx, mux, fmt.Sprintf("localhost:%d", rpcPort), opts) return http.ListenAndServe(fmt.Sprintf(":%d", apiPort), mux) } diff --git a/api/client/GetEscrowTransactions/main.go b/api/client/GetEscrowTransactions/main.go new file mode 100644 index 000000000..c96c58e94 --- /dev/null +++ b/api/client/GetEscrowTransactions/main.go @@ -0,0 +1,48 @@ +package main + +import ( + "context" + "fmt" + "log" + + "github.com/sirupsen/logrus" + "github.com/spf13/viper" + rpcModel "github.com/zoobc/zoobc-core/common/model" + rpcService "github.com/zoobc/zoobc-core/common/service" + "github.com/zoobc/zoobc-core/common/util" + "google.golang.org/grpc" +) + +func main() { + var apiRPCPort int + if err := util.LoadConfig("../../../resource", "config", "toml"); err != nil { + logrus.Fatal(err) + } else { + apiRPCPort = viper.GetInt("apiRPCPort") + if apiRPCPort == 0 { + apiRPCPort = 8080 + } + } + + conn, err := grpc.Dial(fmt.Sprintf(":%d", apiRPCPort), grpc.WithInsecure()) + if err != nil { + log.Fatalf("did not connect: %s", err) + } + defer conn.Close() + + c := rpcService.NewEscrowTransactionServiceClient(conn) + + response, err := c.GetEscrowTransactions(context.Background(), &rpcModel.GetEscrowTransactionsRequest{ + ApproverAddress: "BCZEGOb3WNx3fDOVf9ZS4EjvOIv_UeW4TVBQJ_6tHKlE", + Statuses: []rpcModel.EscrowStatus{ + rpcModel.EscrowStatus_Approved, + }, + }) + + if err != nil { + log.Fatalf("error calling : %s", err) + } + + log.Printf("response from remote : %s", response) + +} diff --git a/api/client/PostTransaction/client.go b/api/client/PostTransaction/client.go index 4e8f7de3d..ef38d3ede 100644 --- a/api/client/PostTransaction/client.go +++ b/api/client/PostTransaction/client.go @@ -45,17 +45,16 @@ func main() { response, err := c.PostTransaction(context.Background(), &rpc_model.PostTransactionRequest{ // Escrow - TransactionBytes: []byte{1, 0, 0, 0, 1, 127, 39, 65, 94, 0, 0, 0, 0, 44, 0, 0, 0, 72, 108, 90, 76, 104, 51, 86, 99, 110, 78, 108, + TransactionBytes: []byte{1, 0, 0, 0, 1, 114, 186, 68, 94, 0, 0, 0, 0, 44, 0, 0, 0, 72, 108, 90, 76, 104, 51, 86, 99, 110, 78, 108, 118, 66, 121, 87, 111, 65, 122, 88, 79, 81, 50, 106, 65, 108, 119, 70, 79, 105, 121, 79, 57, 95, 110, 106, 73, 51, 111, - 113, 53, 89, 103, 104, 97, 44, 0, 0, 0, 110, 75, 95, 111, 117, 120, 100, 68, 68, 119, 117, 74, 105, 111, 103, 105, 68, - 65, 105, 95, 122, 115, 49, 76, 113, 101, 78, 55, 102, 53, 90, 115, 88, 98, 70, 116, 88, 71, 113, 71, 99, 48, 80, 100, - 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 4, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 66, 67, 90, 69, 71, 79, 98, 51, 87, 78, 120, - 51, 102, 68, 79, 86, 102, 57, 90, 83, 52, 69, 106, 118, 79, 73, 118, 95, 85, 101, 87, 52, 84, 86, 66, 81, 74, 95, 54, - 116, 72, 75, 108, 69, 111, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 97, 109, 111, 117, 110, 116, 32, - 109, 117, 115, 116, 32, 109, 111, 114, 101, 32, 116, 104, 97, 110, 32, 49, 0, 0, 0, 0, 226, 248, 232, 158, 251, 254, - 219, 157, 51, 35, 97, 142, 94, 94, 175, 166, 112, 37, 82, 98, 50, 1, 243, 56, 217, 221, 196, 41, 163, 145, 136, 80, 35, - 207, 23, 116, 143, 154, 148, 168, 163, 71, 78, 191, 150, 112, 51, 59, 165, 144, 38, 182, 193, 238, 8, 124, 204, 218, 0, - 151, 202, 242, 103, 0}, + 113, 53, 89, 103, 104, 97, 44, 0, 0, 0, 110, 75, 95, 111, 117, 120, 100, 68, 68, 119, 117, 74, 105, 111, 103, 105, 68, 65, + 105, 95, 122, 115, 49, 76, 113, 101, 78, 55, 102, 53, 90, 115, 88, 98, 70, 116, 88, 71, 113, 71, 99, 48, 80, 100, 1, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 4, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 66, 67, 90, 69, 71, 79, 98, 51, 87, 78, 120, 51, 102, 68, + 79, 86, 102, 57, 90, 83, 52, 69, 106, 118, 79, 73, 118, 95, 85, 101, 87, 52, 84, 86, 66, 81, 74, 95, 54, 116, 72, 75, 108, + 69, 111, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 97, 109, 111, 117, 110, 116, 32, 109, 117, 115, 116, 32, + 109, 111, 114, 101, 32, 116, 104, 97, 110, 32, 49, 0, 0, 0, 0, 178, 66, 128, 131, 168, 110, 230, 13, 235, 177, 8, 220, 123, + 148, 159, 170, 237, 219, 168, 84, 207, 106, 112, 50, 2, 39, 139, 246, 51, 100, 142, 98, 198, 14, 196, 147, 248, 167, 20, + 150, 114, 204, 47, 56, 215, 165, 36, 81, 178, 159, 224, 190, 147, 117, 103, 120, 246, 25, 24, 79, 142, 209, 39, 2}, // Approval // TransactionBytes: []byte{4, 0, 0, 0, 1, 162, 32, 65, 94, 0, 0, 0, 0, 44, 0, 0, 0, 66, 67, 90, 69, 71, 79, 98, 51, 87, 78, 120, 51, 102, // 68, 79, 86, 102, 57, 90, 83, 52, 69, 106, 118, 79, 73, 118, 95, 85, 101, 87, 52, 84, 86, 66, 81, 74, 95, 54, 116, 72, 75, 108, diff --git a/api/handler/escrowTransactionHandler.go b/api/handler/escrowTransactionHandler.go new file mode 100644 index 000000000..623684835 --- /dev/null +++ b/api/handler/escrowTransactionHandler.go @@ -0,0 +1,21 @@ +package handler + +import ( + "context" + + "github.com/zoobc/zoobc-core/api/service" + "github.com/zoobc/zoobc-core/common/model" +) + +// EscrowTransactionHandler to handle request related to Escrow Transaction grpc handler from client +type EscrowTransactionHandler struct { + Service service.EscrowTransactionServiceInterface +} + +// GetEscrowTransactions get escrow transactions with filter fields params +func (eh *EscrowTransactionHandler) GetEscrowTransactions( + _ context.Context, + req *model.GetEscrowTransactionsRequest, +) (*model.GetEscrowTransactionsResponse, error) { + return eh.Service.GetEscrowTransactions(req) +} diff --git a/api/service/escrowTransactionApiService.go b/api/service/escrowTransactionApiService.go new file mode 100644 index 000000000..67c1a3c0f --- /dev/null +++ b/api/service/escrowTransactionApiService.go @@ -0,0 +1,110 @@ +package service + +import ( + "bytes" + "database/sql" + + "github.com/zoobc/zoobc-core/common/model" + "github.com/zoobc/zoobc-core/common/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type ( + // EscrowTransactionServiceInterface interface that contain methods of escrow transaction + EscrowTransactionServiceInterface interface { + GetEscrowTransactions(request *model.GetEscrowTransactionsRequest) (*model.GetEscrowTransactionsResponse, error) + } + // EscrowTransactionService struct that contain fields that needed + escrowTransactionService struct { + Query query.ExecutorInterface + } +) + +// NewEscrowTransactionService will create EscrowTransactionServiceInterface instance +func NewEscrowTransactionService( + query query.ExecutorInterface, +) EscrowTransactionServiceInterface { + return &escrowTransactionService{ + Query: query, + } +} + +// GetEscrowTransactions to get escrow transactions list +func (es *escrowTransactionService) GetEscrowTransactions( + params *model.GetEscrowTransactionsRequest, +) (*model.GetEscrowTransactionsResponse, error) { + var ( + escrowQuery = query.NewEscrowTransactionQuery() + countQuery string + escrows []*model.Escrow + rows *sql.Rows + count int64 + row *sql.Row + err error + ) + + caseQuery := query.CaseQuery{ + Query: bytes.NewBuffer([]byte{}), + } + + caseQuery.Select(escrowQuery.TableName, escrowQuery.Fields...) + if params.GetApproverAddress() != "" { + caseQuery.Where(caseQuery.Equal("approver_address", params.GetApproverAddress())) + } + if len(params.GetStatuses()) > 0 { + var statuses []interface{} + for _, v := range params.GetStatuses() { + statuses = append(statuses, int32(v)) + } + caseQuery.And(caseQuery.In("status", statuses...)) + } + if params.GetID() > 0 { + caseQuery.And(caseQuery.Equal("id", params.GetID())) + } + + blockHeightStart := params.GetBlockHeightStart() + blockHeightEnd := params.GetBlockHeightEnd() + if blockHeightStart > 0 { + caseQuery.Where(caseQuery.Between("block_height", blockHeightStart, blockHeightEnd)) + } + + // count first + selectQuery, args := caseQuery.Build() + countQuery = query.GetTotalRecordOfSelect(selectQuery) + + row, err = es.Query.ExecuteSelectRow(countQuery, false, args...) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + err = row.Scan(&count) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + // select records + page := params.GetPagination() + if page.GetOrderField() == "" { + caseQuery.OrderBy("id", page.GetOrderBy()) + } else { + caseQuery.OrderBy(page.GetOrderField(), page.GetOrderBy()) + } + caseQuery.Paginate(page.GetLimit(), page.GetPage()) + + escrowQ, escrowArgs := caseQuery.Build() + rows, err = es.Query.ExecuteSelect(escrowQ, false, escrowArgs...) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + defer rows.Close() + + escrows, err = escrowQuery.BuildModels(rows) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &model.GetEscrowTransactionsResponse{ + Total: uint64(count), + Escrows: escrows, + }, nil +} diff --git a/api/service/escrowTransactionApiService_test.go b/api/service/escrowTransactionApiService_test.go new file mode 100644 index 000000000..bae353735 --- /dev/null +++ b/api/service/escrowTransactionApiService_test.go @@ -0,0 +1,125 @@ +package service + +import ( + "database/sql" + "reflect" + "regexp" + "testing" + + "github.com/DATA-DOG/go-sqlmock" + "github.com/zoobc/zoobc-core/common/model" + "github.com/zoobc/zoobc-core/common/query" +) + +type ( + mockQueryExecutorGetEscrowTransactionsError struct { + query.ExecutorInterface + } + mockQueryExecutorGetEscrowTransactionsSuccess struct { + query.ExecutorInterface + } +) + +func (*mockQueryExecutorGetEscrowTransactionsError) ExecuteSelectRow(qStr string, tx bool, args ...interface{}) (*sql.Row, error) { + return nil, sql.ErrNoRows +} +func (*mockQueryExecutorGetEscrowTransactionsError) ExecuteSelect(qStr string, tx bool, args ...interface{}) (*sql.Rows, error) { + return nil, sql.ErrNoRows +} + +func (*mockQueryExecutorGetEscrowTransactionsSuccess) ExecuteSelect(qStr string, tx bool, args ...interface{}) (*sql.Rows, error) { + dbMocked, mock, _ := sqlmock.New() + mockedRows := mock.NewRows(query.NewEscrowTransactionQuery().Fields) + mockedRows.AddRow( + int64(1), + "BCZnSfqpP5tqFQlMTYkDeBVFWnbyVK7vLr5ORFpTjgtN", + "BCZD_VxfO2S9aziIL3cn_cXW7uPDVPOrnXuP98GEAUC7", + "BCZKLvgUYZ1KKx-jtF9KoJskjVPvB9jpIjfzzI6zDW0J", + int64(10), + int64(1), + uint64(120), + model.EscrowStatus_Approved, + uint32(0), + true, + "", + ) + + mock.ExpectQuery(regexp.QuoteMeta(qStr)).WillReturnRows(mockedRows) + return dbMocked.Query(qStr) + +} + +func (*mockQueryExecutorGetEscrowTransactionsSuccess) ExecuteSelectRow(qStr string, tx bool, args ...interface{}) (*sql.Row, error) { + db, mock, _ := sqlmock.New() + mockedRow := mock.NewRows([]string{"count"}) + mockedRow.AddRow(1) + mock.ExpectQuery("").WillReturnRows(mockedRow) + row := db.QueryRow("") + return row, nil +} + +func TestEscrowTransactionService_GetEscrowTransactions(t *testing.T) { + type fields struct { + Query query.ExecutorInterface + } + type args struct { + params *model.GetEscrowTransactionsRequest + } + tests := []struct { + name string + fields fields + args args + want *model.GetEscrowTransactionsResponse + wantErr bool + }{ + { + name: "WantError", + fields: fields{ + Query: &mockQueryExecutorGetEscrowTransactionsError{}, + }, + wantErr: true, + }, + { + name: "wantSuccess", + fields: fields{ + Query: &mockQueryExecutorGetEscrowTransactionsSuccess{}, + }, + args: args{ + params: &model.GetEscrowTransactionsRequest{ + ApproverAddress: "BCZnSfqpP5tqFQlMTYkDeBVFWnbyVK7vLr5ORFpTjgtN", + }, + }, + want: &model.GetEscrowTransactionsResponse{ + Total: 1, + Escrows: []*model.Escrow{ + { + ID: 1, + SenderAddress: "BCZnSfqpP5tqFQlMTYkDeBVFWnbyVK7vLr5ORFpTjgtN", + RecipientAddress: "BCZD_VxfO2S9aziIL3cn_cXW7uPDVPOrnXuP98GEAUC7", + ApproverAddress: "BCZKLvgUYZ1KKx-jtF9KoJskjVPvB9jpIjfzzI6zDW0J", + Amount: 10, + Commission: 1, + Timeout: 120, + Status: model.EscrowStatus_Approved, + Latest: true, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + es := &escrowTransactionService{ + Query: tt.fields.Query, + } + got, err := es.GetEscrowTransactions(tt.args.params) + if (err != nil) != tt.wantErr { + t.Errorf("GetEscrowTransactions() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetEscrowTransactions() got = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/common/model/escrow.pb.go b/common/model/escrow.pb.go index e2a609278..f407c7aa9 100644 --- a/common/model/escrow.pb.go +++ b/common/model/escrow.pb.go @@ -196,43 +196,132 @@ func (m *Escrow) GetInstruction() string { return "" } -// PostEscrowApprovalRequest message for approval transaction escrow -type PostEscrowApprovalRequest struct { - // ApprovalBytes format: [uint32 EscrowApproval][int64 TransactionID] - ApprovalBytes []byte `protobuf:"bytes,1,opt,name=ApprovalBytes,proto3" json:"ApprovalBytes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PostEscrowApprovalRequest) Reset() { *m = PostEscrowApprovalRequest{} } -func (m *PostEscrowApprovalRequest) String() string { return proto.CompactTextString(m) } -func (*PostEscrowApprovalRequest) ProtoMessage() {} -func (*PostEscrowApprovalRequest) Descriptor() ([]byte, []int) { +// GetEscrowTransactionsRequest message for get escrow transactions +type GetEscrowTransactionsRequest struct { + ApproverAddress string `protobuf:"bytes,1,opt,name=ApproverAddress,proto3" json:"ApproverAddress,omitempty"` + ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` + Statuses []EscrowStatus `protobuf:"varint,3,rep,packed,name=Statuses,proto3,enum=model.EscrowStatus" json:"Statuses,omitempty"` + BlockHeightStart uint32 `protobuf:"varint,4,opt,name=BlockHeightStart,proto3" json:"BlockHeightStart,omitempty"` + BlockHeightEnd uint32 `protobuf:"varint,5,opt,name=BlockHeightEnd,proto3" json:"BlockHeightEnd,omitempty"` + Pagination *Pagination `protobuf:"bytes,6,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetEscrowTransactionsRequest) Reset() { *m = GetEscrowTransactionsRequest{} } +func (m *GetEscrowTransactionsRequest) String() string { return proto.CompactTextString(m) } +func (*GetEscrowTransactionsRequest) ProtoMessage() {} +func (*GetEscrowTransactionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c4ffdfca00fa52ba, []int{1} } -func (m *PostEscrowApprovalRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PostEscrowApprovalRequest.Unmarshal(m, b) +func (m *GetEscrowTransactionsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEscrowTransactionsRequest.Unmarshal(m, b) } -func (m *PostEscrowApprovalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PostEscrowApprovalRequest.Marshal(b, m, deterministic) +func (m *GetEscrowTransactionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEscrowTransactionsRequest.Marshal(b, m, deterministic) } -func (m *PostEscrowApprovalRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PostEscrowApprovalRequest.Merge(m, src) +func (m *GetEscrowTransactionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEscrowTransactionsRequest.Merge(m, src) } -func (m *PostEscrowApprovalRequest) XXX_Size() int { - return xxx_messageInfo_PostEscrowApprovalRequest.Size(m) +func (m *GetEscrowTransactionsRequest) XXX_Size() int { + return xxx_messageInfo_GetEscrowTransactionsRequest.Size(m) } -func (m *PostEscrowApprovalRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PostEscrowApprovalRequest.DiscardUnknown(m) +func (m *GetEscrowTransactionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetEscrowTransactionsRequest.DiscardUnknown(m) } -var xxx_messageInfo_PostEscrowApprovalRequest proto.InternalMessageInfo +var xxx_messageInfo_GetEscrowTransactionsRequest proto.InternalMessageInfo -func (m *PostEscrowApprovalRequest) GetApprovalBytes() []byte { +func (m *GetEscrowTransactionsRequest) GetApproverAddress() string { if m != nil { - return m.ApprovalBytes + return m.ApproverAddress + } + return "" +} + +func (m *GetEscrowTransactionsRequest) GetID() int64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *GetEscrowTransactionsRequest) GetStatuses() []EscrowStatus { + if m != nil { + return m.Statuses + } + return nil +} + +func (m *GetEscrowTransactionsRequest) GetBlockHeightStart() uint32 { + if m != nil { + return m.BlockHeightStart + } + return 0 +} + +func (m *GetEscrowTransactionsRequest) GetBlockHeightEnd() uint32 { + if m != nil { + return m.BlockHeightEnd + } + return 0 +} + +func (m *GetEscrowTransactionsRequest) GetPagination() *Pagination { + if m != nil { + return m.Pagination + } + return nil +} + +// GetEscrowTransactionsResponse returns fields of GetEscrowTransactionsRequest +type GetEscrowTransactionsResponse struct { + // Number of transactions in total + Total uint64 `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"` + // Transaction transactions returned + Escrows []*Escrow `protobuf:"bytes,2,rep,name=Escrows,proto3" json:"Escrows,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetEscrowTransactionsResponse) Reset() { *m = GetEscrowTransactionsResponse{} } +func (m *GetEscrowTransactionsResponse) String() string { return proto.CompactTextString(m) } +func (*GetEscrowTransactionsResponse) ProtoMessage() {} +func (*GetEscrowTransactionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c4ffdfca00fa52ba, []int{2} +} + +func (m *GetEscrowTransactionsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEscrowTransactionsResponse.Unmarshal(m, b) +} +func (m *GetEscrowTransactionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEscrowTransactionsResponse.Marshal(b, m, deterministic) +} +func (m *GetEscrowTransactionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEscrowTransactionsResponse.Merge(m, src) +} +func (m *GetEscrowTransactionsResponse) XXX_Size() int { + return xxx_messageInfo_GetEscrowTransactionsResponse.Size(m) +} +func (m *GetEscrowTransactionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetEscrowTransactionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetEscrowTransactionsResponse proto.InternalMessageInfo + +func (m *GetEscrowTransactionsResponse) GetTotal() uint64 { + if m != nil { + return m.Total + } + return 0 +} + +func (m *GetEscrowTransactionsResponse) GetEscrows() []*Escrow { + if m != nil { + return m.Escrows } return nil } @@ -241,36 +330,44 @@ func init() { proto.RegisterEnum("model.EscrowStatus", EscrowStatus_name, EscrowStatus_value) proto.RegisterEnum("model.EscrowApproval", EscrowApproval_name, EscrowApproval_value) proto.RegisterType((*Escrow)(nil), "model.Escrow") - proto.RegisterType((*PostEscrowApprovalRequest)(nil), "model.PostEscrowApprovalRequest") + proto.RegisterType((*GetEscrowTransactionsRequest)(nil), "model.GetEscrowTransactionsRequest") + proto.RegisterType((*GetEscrowTransactionsResponse)(nil), "model.GetEscrowTransactionsResponse") } func init() { proto.RegisterFile("model/escrow.proto", fileDescriptor_c4ffdfca00fa52ba) } var fileDescriptor_c4ffdfca00fa52ba = []byte{ - // 397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x4f, 0x6f, 0xd3, 0x40, - 0x10, 0xc5, 0xbb, 0x4e, 0xeb, 0xa4, 0x93, 0xa4, 0x58, 0x83, 0x84, 0x0c, 0xe2, 0x60, 0x45, 0x3d, - 0x98, 0x20, 0x12, 0x04, 0x9f, 0x20, 0x21, 0x95, 0x88, 0xc4, 0xa1, 0xda, 0x72, 0xe2, 0x96, 0xac, - 0x47, 0xe9, 0x42, 0xbc, 0x63, 0x76, 0xd7, 0xfc, 0xfb, 0xf2, 0x20, 0xaf, 0x9d, 0x92, 0xc0, 0xc5, - 0xd2, 0xfc, 0xe6, 0x3d, 0xfb, 0xf9, 0xed, 0x02, 0x96, 0x5c, 0xd0, 0x7e, 0x4e, 0x4e, 0x59, 0xfe, - 0x3e, 0xab, 0x2c, 0x7b, 0xc6, 0x8b, 0xc0, 0x26, 0xbf, 0x23, 0x88, 0x6f, 0x02, 0x47, 0x84, 0x68, - 0xbd, 0x4a, 0x45, 0x26, 0xf2, 0xde, 0x32, 0x7a, 0x2d, 0x64, 0xb4, 0x5e, 0xe1, 0x35, 0x8c, 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3c, 0x23, 0x79, 0x0a, 0xa7, 0x2b, 0x18, 0x1d, 0xc7, 0xc6, 0x21, 0xf4, - 0x6f, 0xc9, 0x14, 0xda, 0xec, 0x92, 0x33, 0x1c, 0xc1, 0xa0, 0x6b, 0xb6, 0x48, 0x44, 0x33, 0x49, - 0xfa, 0x4c, 0xca, 0x53, 0x91, 0x44, 0x8d, 0xf0, 0xe6, 0x47, 0xa5, 0x2d, 0x15, 0x49, 0x6f, 0xfa, - 0x02, 0xae, 0x4e, 0x43, 0x34, 0xeb, 0xce, 0x9a, 0x9c, 0x21, 0x40, 0xdc, 0x3a, 0x13, 0xb1, 0x9c, - 0x7e, 0xca, 0x77, 0xda, 0xdf, 0xd7, 0xdb, 0x99, 0xe2, 0x72, 0xfe, 0x8b, 0x79, 0xab, 0xda, 0xe7, - 0x2b, 0xc5, 0x96, 0xe6, 0x8a, 0xcb, 0x92, 0xcd, 0x3c, 0x14, 0xba, 0x8d, 0xc3, 0x7d, 0x7b, 0xfb, - 0x27, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x6d, 0x1b, 0x24, 0x85, 0x02, 0x00, 0x00, + // 510 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x5f, 0x8f, 0xd2, 0x40, + 0x14, 0xc5, 0x77, 0xca, 0x52, 0xd8, 0xcb, 0x82, 0x75, 0x4c, 0x36, 0xcd, 0x66, 0x4d, 0x1a, 0x62, + 0xb4, 0x62, 0xa4, 0x8a, 0x9f, 0x00, 0x84, 0x28, 0x89, 0x0f, 0x9b, 0x81, 0x27, 0xdf, 0x4a, 0x7b, + 0xc3, 0x8e, 0xd2, 0x99, 0xda, 0x99, 0xaa, 0xf1, 0x73, 0xf8, 0x7d, 0x35, 0x9d, 0x29, 0x6c, 0xd9, + 0x3f, 0x2f, 0x24, 0xfd, 0x9d, 0x73, 0x87, 0xb9, 0xe7, 0xb4, 0x40,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, 0x81, 0xa9, 0xd7, 0x1a, 0xbd, 0x86, 0x81, 0x3d, + 0xc5, 0xda, 0xe3, 0x5d, 0x25, 0xd7, 0xa3, 0xde, 0x09, 0x05, 0x70, 0xed, 0xa4, 0x47, 0x66, 0xa3, + 0xaf, 0xe1, 0x96, 0xeb, 0x9b, 0x72, 0x33, 0x4e, 0x64, 0x16, 0xfd, 0x91, 0x72, 0x93, 0xd8, 0xdf, + 0xb7, 0x89, 0x2c, 0x30, 0x4a, 0x64, 0x96, 0x49, 0x11, 0x99, 0xcb, 0x6e, 0x5c, 0xf3, 0x81, 0x7e, + 0xf8, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x24, 0x19, 0xbf, 0x2c, 0xd5, 0x03, 0x00, 0x00, } diff --git a/common/model/transaction.pb.go b/common/model/transaction.pb.go index 201491534..170e0376b 100644 --- a/common/model/transaction.pb.go +++ b/common/model/transaction.pb.go @@ -1394,88 +1394,88 @@ func init() { func init() { proto.RegisterFile("model/transaction.proto", fileDescriptor_8333001f09b34082) } var fileDescriptor_8333001f09b34082 = []byte{ - // 1317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0x8f, 0x9d, 0xa6, 0x6b, 0x4f, 0xd3, 0xce, 0xbd, 0x4b, 0x93, 0x4b, 0xd7, 0xae, 0xc1, 0x6b, - 0xab, 0xd0, 0x6d, 0x2d, 0x2b, 0xd3, 0x80, 0xc7, 0x66, 0x1d, 0xa4, 0x62, 0x63, 0xe1, 0xb6, 0xec, - 0x61, 0x12, 0x0f, 0xae, 0x73, 0x97, 0x58, 0x4b, 0x7c, 0x8d, 0x7d, 0xb3, 0x2d, 0x4c, 0x42, 0x62, - 0xc0, 0x03, 0x12, 0x8f, 0x7c, 0x22, 0x24, 0xbe, 0x05, 0x8f, 0x7c, 0x0c, 0x84, 0x90, 0xef, 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xb6, 0x67, 0x64, 0x15, 0x34, 0xfe, 0x63, 0x58, 0x8d, 0xf6, 0x53, - 0xb6, 0x66, 0x46, 0xe7, 0xe3, 0x9a, 0x07, 0xbf, 0xaa, 0x90, 0xf2, 0x8c, 0xd6, 0x92, 0x9c, 0x4e, - 0x2b, 0x20, 0x2c, 0x1f, 0xfd, 0x49, 0x46, 0xa7, 0x29, 0x68, 0x07, 0xae, 0xcf, 0xb9, 0x7f, 0x35, - 0x15, 0xed, 0xc3, 0xbb, 0x99, 0x94, 0x46, 0x7b, 0x2b, 0xf4, 0x32, 0xc9, 0x81, 0xf6, 0x76, 0x01, - 0xed, 0x41, 0x3d, 0xeb, 0xd6, 0xd7, 0xde, 0x2e, 0x22, 0x1d, 0x6e, 0xcc, 0xbf, 0x9e, 0xb5, 0x22, - 0xda, 0xf5, 0x27, 0x6f, 0xee, 0xdd, 0xa6, 0x7d, 0xaf, 0xa2, 0x6d, 0x78, 0x67, 0xe6, 0xd5, 0xa1, - 0x2d, 0x34, 0x0f, 0x9e, 0x35, 0xba, 0x16, 0xef, 0x0d, 0x2f, 0x0f, 0x4d, 0x36, 0x38, 0xfa, 0x86, - 0xb1, 0x4b, 0x53, 0xfe, 0xbd, 0x63, 0x32, 0x97, 0x1e, 0x99, 0x6c, 0x30, 0x60, 0xf6, 0x91, 0x38, - 0x8c, 0xcb, 0x45, 0xf1, 0x6f, 0x9b, 0x0f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xde, 0xd5, 0xf1, - 0x1e, 0x5a, 0x12, 0x00, 0x00, + // 1318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x73, 0xdb, 0x44, + 0x14, 0xb7, 0xe4, 0x38, 0x4d, 0x5e, 0x9c, 0x54, 0xd9, 0x3a, 0xf6, 0x92, 0x26, 0x8d, 0x51, 0x93, + 0x8c, 0x49, 0xdb,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, 0x3d, 0x19, 0xb9, 0x2a, 0x22, 0xef, 0x06, + 0x91, 0x4f, 0xe6, 0xd9, 0xb6, 0x0a, 0x64, 0x3e, 0x18, 0xda, 0x82, 0xe5, 0x73, 0xab, 0x6b, 0x1b, + 0x7c, 0xe8, 0x52, 0x5c, 0x13, 0x73, 0x67, 0x22, 0x40, 0x7b, 0xb0, 0x28, 0xdd, 0x30, 0x16, 0x41, + 0x57, 0xc7, 0x23, 0x43, 0x08, 0x49, 0xa0, 0x6c, 0xae, 0xc7, 0xe6, 0xa4, 0x8f, 0xab, 0x57, 0xa1, + 0x92, 0x36, 0x57, 0xf4, 0xfb, 0x80, 0x67, 0x0d, 0x06, 0xb4, 0x09, 0x8b, 0x27, 0x03, 0xbf, 0x33, + 0xe2, 0x86, 0x92, 0xd3, 0x38, 0x90, 0xe8, 0x7f, 0x29, 0xb0, 0x93, 0xb5, 0x6d, 0x76, 0x61, 0xd5, + 0x37, 0x69, 0x0f, 0x2f, 0xfb, 0x96, 0xf9, 0x09, 0x1d, 0x09, 0x98, 0x32, 0x89, 0x0b, 0xd1, 0x3e, + 0xac, 0x25, 0xee, 0x19, 0x55, 0xdc, 0x33, 0x09, 0x29, 0xba, 0x07, 0x2b, 0xbe, 0xe3, 0xd8, 0xa8, + 0x28, 0x1a, 0x80, 0x22, 0x63, 0x27, 0xd0, 0x90, 0xa8, 0x19, 0x6a, 0xc0, 0xea, 0x23, 0x66, 0xbe, + 0xa0, 0x9d, 0xa6, 0xd1, 0x37, 0x6c, 0x93, 0x8a, 0x1b, 0x52, 0x96, 0x12, 0x57, 0xa0, 0x3b, 0x50, + 0x6a, 0x33, 0xf6, 0xca, 0x16, 0xb7, 0xe3, 0xca, 0x71, 0x2d, 0x40, 0x6e, 0x27, 0x28, 0x03, 0x91, + 0x56, 0xfa, 0xef, 0x0a, 0xec, 0xe5, 0x9a, 0x38, 0x39, 0xdb, 0x90, 0x28, 0x4f, 0xfd, 0x97, 0xe5, + 0x15, 0x33, 0x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x00, } diff --git a/common/service/escrow.pb.go b/common/service/escrow.pb.go index 31b33903b..95b3d8de2 100644 --- a/common/service/escrow.pb.go +++ b/common/service/escrow.pb.go @@ -10,8 +10,6 @@ import ( model "github.com/zoobc/zoobc-core/common/model" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -29,21 +27,20 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("service/escrow.proto", fileDescriptor_23585460a3adf6bf) } var fileDescriptor_23585460a3adf6bf = []byte{ - // 221 bytes of a gzipped FileDescriptorProto + // 203 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x62, 0x87, 0x8a, 0x4a, 0x89, 0xe7, 0xe6, 0xa7, 0xa4, 0xe6, 0xe8, 0x97, 0x14, 0x25, 0xe6, - 0x15, 0x27, 0x26, 0x97, 0x64, 0xe6, 0xe7, 0x41, 0x54, 0x48, 0x09, 0x41, 0x24, 0x90, 0x75, 0x49, - 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, - 0x97, 0x24, 0x82, 0x34, 0x14, 0x43, 0x64, 0x8d, 0x16, 0x30, 0x72, 0x49, 0xb8, 0x82, 0x95, 0x87, - 0x20, 0x4c, 0x0b, 0x86, 0xd8, 0x23, 0xd4, 0xcc, 0xc8, 0x25, 0x1b, 0x90, 0x5f, 0x5c, 0xe2, 0x58, - 0x50, 0x50, 0x94, 0x5f, 0x96, 0x98, 0x83, 0xa1, 0x50, 0x48, 0x41, 0x0f, 0x6c, 0xa3, 0x1e, 0x48, - 0x15, 0x44, 0x16, 0xa6, 0x36, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x4a, 0x08, 0xaa, 0x02, - 0x49, 0x97, 0x92, 0x4e, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0xd4, 0x94, 0x54, 0xf4, 0xcb, 0x0c, 0xa1, - 0x8e, 0xd5, 0xc7, 0x69, 0x82, 0x93, 0x4e, 0x94, 0x56, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x7e, 0x55, 0x7e, 0x7e, 0x52, 0x32, 0x84, 0xd4, 0x4d, 0xce, 0x2f, 0x4a, 0xd5, - 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x87, 0x86, 0x4d, 0x12, 0x1b, 0xd8, 0x5f, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x59, 0x63, 0x03, 0x43, 0x01, 0x00, 0x00, + 0x17, 0x62, 0x87, 0x8a, 0x4a, 0x09, 0xe5, 0xe6, 0xa7, 0xa4, 0xe6, 0xa0, 0x48, 0x4a, 0xc9, 0xa4, + 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, + 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x64, 0x8d, 0x36, 0x30, 0x72, 0x49, 0xb8, 0x82, 0x95, 0x87, + 0x14, 0x25, 0xe6, 0x15, 0x27, 0x26, 0x83, 0x24, 0x83, 0x21, 0xc6, 0x09, 0x4d, 0x66, 0xe4, 0x12, + 0x75, 0x4f, 0x2d, 0xc1, 0x90, 0x2f, 0x16, 0x52, 0xd6, 0x03, 0xdb, 0xa4, 0x87, 0x55, 0x36, 0x28, + 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x4a, 0x05, 0xbf, 0xa2, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, + 0x25, 0xfd, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0x69, 0x2a, 0xa9, 0xeb, 0x97, 0x19, 0x42, 0x5d, 0xae, + 0x8f, 0xcf, 0x58, 0x27, 0x9d, 0x28, 0xad, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, + 0x5c, 0xfd, 0xaa, 0xfc, 0xfc, 0xa4, 0x64, 0x08, 0xa9, 0x9b, 0x9c, 0x5f, 0x94, 0xaa, 0x9f, 0x9c, + 0x9f, 0x9b, 0x9b, 0x9f, 0xa7, 0x0f, 0x0d, 0x92, 0x24, 0x36, 0xb0, 0x3f, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x32, 0xe4, 0x14, 0xe6, 0x3a, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -58,7 +55,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type EscrowTransactionServiceClient interface { - PostApprovalEscrowTransaction(ctx context.Context, in *model.PostEscrowApprovalRequest, opts ...grpc.CallOption) (*model.Transaction, error) + GetEscrowTransactions(ctx context.Context, in *model.GetEscrowTransactionsRequest, opts ...grpc.CallOption) (*model.GetEscrowTransactionsResponse, error) } type escrowTransactionServiceClient struct { @@ -69,9 +66,9 @@ func NewEscrowTransactionServiceClient(cc *grpc.ClientConn) EscrowTransactionSer return &escrowTransactionServiceClient{cc} } -func (c *escrowTransactionServiceClient) PostApprovalEscrowTransaction(ctx context.Context, in *model.PostEscrowApprovalRequest, opts ...grpc.CallOption) (*model.Transaction, error) { - out := new(model.Transaction) - err := c.cc.Invoke(ctx, "/service.EscrowTransactionService/PostApprovalEscrowTransaction", in, out, opts...) +func (c *escrowTransactionServiceClient) GetEscrowTransactions(ctx context.Context, in *model.GetEscrowTransactionsRequest, opts ...grpc.CallOption) (*model.GetEscrowTransactionsResponse, error) { + out := new(model.GetEscrowTransactionsResponse) + err := c.cc.Invoke(ctx, "/service.EscrowTransactionService/GetEscrowTransactions", in, out, opts...) if err != nil { return nil, err } @@ -80,35 +77,27 @@ func (c *escrowTransactionServiceClient) PostApprovalEscrowTransaction(ctx conte // EscrowTransactionServiceServer is the server API for EscrowTransactionService service. type EscrowTransactionServiceServer interface { - PostApprovalEscrowTransaction(context.Context, *model.PostEscrowApprovalRequest) (*model.Transaction, error) -} - -// UnimplementedEscrowTransactionServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEscrowTransactionServiceServer struct { -} - -func (*UnimplementedEscrowTransactionServiceServer) PostApprovalEscrowTransaction(ctx context.Context, req *model.PostEscrowApprovalRequest) (*model.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method PostApprovalEscrowTransaction not implemented") + GetEscrowTransactions(context.Context, *model.GetEscrowTransactionsRequest) (*model.GetEscrowTransactionsResponse, error) } func RegisterEscrowTransactionServiceServer(s *grpc.Server, srv EscrowTransactionServiceServer) { s.RegisterService(&_EscrowTransactionService_serviceDesc, srv) } -func _EscrowTransactionService_PostApprovalEscrowTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(model.PostEscrowApprovalRequest) +func _EscrowTransactionService_GetEscrowTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(model.GetEscrowTransactionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(EscrowTransactionServiceServer).PostApprovalEscrowTransaction(ctx, in) + return srv.(EscrowTransactionServiceServer).GetEscrowTransactions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.EscrowTransactionService/PostApprovalEscrowTransaction", + FullMethod: "/service.EscrowTransactionService/GetEscrowTransactions", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowTransactionServiceServer).PostApprovalEscrowTransaction(ctx, req.(*model.PostEscrowApprovalRequest)) + return srv.(EscrowTransactionServiceServer).GetEscrowTransactions(ctx, req.(*model.GetEscrowTransactionsRequest)) } return interceptor(ctx, in, info, handler) } @@ -118,8 +107,8 @@ var _EscrowTransactionService_serviceDesc = grpc.ServiceDesc{ HandlerType: (*EscrowTransactionServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "PostApprovalEscrowTransaction", - Handler: _EscrowTransactionService_PostApprovalEscrowTransaction_Handler, + MethodName: "GetEscrowTransactions", + Handler: _EscrowTransactionService_GetEscrowTransactions_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/common/service/escrow.pb.gw.go b/common/service/escrow.pb.gw.go index de40ee503..4a22c464b 100644 --- a/common/service/escrow.pb.gw.go +++ b/common/service/escrow.pb.gw.go @@ -30,21 +30,18 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var ( - filter_EscrowTransactionService_PostApprovalEscrowTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_EscrowTransactionService_GetEscrowTransactions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_EscrowTransactionService_PostApprovalEscrowTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client EscrowTransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq model.PostEscrowApprovalRequest +func request_EscrowTransactionService_GetEscrowTransactions_0(ctx context.Context, marshaler runtime.Marshaler, client EscrowTransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq model.GetEscrowTransactionsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EscrowTransactionService_PostApprovalEscrowTransaction_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_EscrowTransactionService_GetEscrowTransactions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.PostApprovalEscrowTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetEscrowTransactions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -87,7 +84,7 @@ func RegisterEscrowTransactionServiceHandler(ctx context.Context, mux *runtime.S // "EscrowTransactionServiceClient" to call the correct interceptors. func RegisterEscrowTransactionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EscrowTransactionServiceClient) error { - mux.Handle("POST", pattern_EscrowTransactionService_PostApprovalEscrowTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_EscrowTransactionService_GetEscrowTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -96,14 +93,14 @@ func RegisterEscrowTransactionServiceHandlerClient(ctx context.Context, mux *run runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EscrowTransactionService_PostApprovalEscrowTransaction_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EscrowTransactionService_GetEscrowTransactions_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_EscrowTransactionService_PostApprovalEscrowTransaction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_EscrowTransactionService_GetEscrowTransactions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -111,9 +108,9 @@ func RegisterEscrowTransactionServiceHandlerClient(ctx context.Context, mux *run } var ( - pattern_EscrowTransactionService_PostApprovalEscrowTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "escrow", "PostEscrowApprovalRequest"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_EscrowTransactionService_GetEscrowTransactions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "escrow", "GetEscrowTransactionsRequest"}, "")) ) var ( - forward_EscrowTransactionService_PostApprovalEscrowTransaction_0 = runtime.ForwardResponseMessage + forward_EscrowTransactionService_GetEscrowTransactions_0 = runtime.ForwardResponseMessage )