// // // db3_node.proto // Copyright (C) 2022 db3.network Author imotai // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // syntax = "proto3"; package db3_indexer_proto; import "db3_base.proto"; import "db3_database_v2.proto"; message IndexerStatus { uint64 total_database_count = 1; uint64 total_collection_count = 2; uint64 total_document_count = 3; uint64 total_account_count = 4; uint64 total_mutation_count = 5; uint64 total_storage_in_bytes = 7; } message RunQueryRequest { string db = 1; string col_name = 2; db3_database_v2_proto.Query query = 3; } message RunQueryResponse { repeated db3_database_v2_proto.Document documents = 2; uint64 count = 3; } message ContractSyncStatus { string addr = 1; string evm_node_url = 2; uint64 block_number = 3; uint64 event_number = 4; } message GetCollectionOfDatabaseResponse { repeated db3_database_v2_proto.Collection collections = 1; repeated db3_database_v2_proto.CollectionState states = 2; } message GetCollectionOfDatabaseRequest { string db_addr = 1; } message GetContractSyncStatusResponse { repeated ContractSyncStatus status_list = 1; } message GetContractSyncStatusRequest {} message GetDocRequest { string db_addr = 1; string col_name = 2; int64 id = 3; } message GetDocResponse { db3_database_v2_proto.Document document = 1; } service IndexerNode { rpc GetContractSyncStatus(GetContractSyncStatusRequest) returns (GetContractSyncStatusResponse) {} rpc GetCollectionOfDatabase(GetCollectionOfDatabaseRequest) returns (GetCollectionOfDatabaseResponse) {} // method for query document rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {} rpc GetDoc(GetDocRequest) returns (GetDocResponse) {} }