cosmos-sdk/orm/internal/testpb/bank_query.proto

151 lines
5.8 KiB
Protocol Buffer

// Code generated by protoc-gen-go-cosmos-orm-proto. DO NOT EDIT.
syntax = "proto3";
package testpb;
import "cosmos/base/query/v1beta1/pagination.proto";
import "testpb/bank.proto";
// BankQuery queries the state of the tables specified by testpb/bank.proto.
service BankQuery {
// Get queries the Balance table by its primary key.
rpc GetBalance (GetBalanceRequest) returns (GetBalanceResponse) {}
// ListBalance queries the Balance table using prefix and range queries against defined indexes.
rpc ListBalance (ListBalanceRequest) returns (ListBalanceResponse) {}
// Get queries the Supply table by its primary key.
rpc GetSupply (GetSupplyRequest) returns (GetSupplyResponse) {}
// ListSupply queries the Supply table using prefix and range queries against defined indexes.
rpc ListSupply (ListSupplyRequest) returns (ListSupplyResponse) {}
}
// GetBalanceRequest is the BankQuery/GetBalanceRequest request type.
message GetBalanceRequest {
// address specifies the value of the address field in the primary key.
string address = 1;
// denom specifies the value of the denom field in the primary key.
string denom = 2;
}
// GetBalanceResponse is the BankQuery/GetBalanceResponse response type.
message GetBalanceResponse {
// value is the response value.
Balance value = 1;
}
// ListBalanceRequest is the BankQuery/ListBalanceRequest request type.
message ListBalanceRequest {
// IndexKey specifies the value of an index key to use in prefix and range queries.
message IndexKey {
// key specifies the index key value.
oneof key {
// address_denom specifies the value of the AddressDenom index key to use in the query.
AddressDenom address_denom = 1;
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 2;
}
message AddressDenom {
// address is the value of the address field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string address = 1;
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 2;
}
message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
IndexKey prefix_query = 1;
// range_query specifies the index key from/to values to use for the range query.
RangeQuery range_query = 2;
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
// To query from the start of an index, specify an index key for that index with empty values.
IndexKey from = 1;
// to is the index key to use for the end of the range query.
// The index key type MUST be the same as the index key type used for from.
// To query from to the end of an index it can be omitted.
IndexKey to = 2;
}
}
// ListBalanceResponse is the BankQuery/ListBalanceResponse response type.
message ListBalanceResponse {
// values are the results of the query.
repeated Balance values = 1;
// pagination is the pagination response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// GetSupplyRequest is the BankQuery/GetSupplyRequest request type.
message GetSupplyRequest {
// denom specifies the value of the denom field in the primary key.
string denom = 1;
}
// GetSupplyResponse is the BankQuery/GetSupplyResponse response type.
message GetSupplyResponse {
// value is the response value.
Supply value = 1;
}
// ListSupplyRequest is the BankQuery/ListSupplyRequest request type.
message ListSupplyRequest {
// IndexKey specifies the value of an index key to use in prefix and range queries.
message IndexKey {
// key specifies the index key value.
oneof key {
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 1;
}
message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
IndexKey prefix_query = 1;
// range_query specifies the index key from/to values to use for the range query.
RangeQuery range_query = 2;
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
// To query from the start of an index, specify an index key for that index with empty values.
IndexKey from = 1;
// to is the index key to use for the end of the range query.
// The index key type MUST be the same as the index key type used for from.
// To query from to the end of an index it can be omitted.
IndexKey to = 2;
}
}
// ListSupplyResponse is the BankQuery/ListSupplyResponse response type.
message ListSupplyResponse {
// values are the results of the query.
repeated Supply values = 1;
// pagination is the pagination response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}