github.com/Finschia/finschia-sdk@v0.49.1/proto/cosmos/base/query/v1beta1/pagination.proto (about)

     1  syntax = "proto3";
     2  package cosmos.base.query.v1beta1;
     3  
     4  option go_package = "github.com/Finschia/finschia-sdk/types/query";
     5  
     6  // PageRequest is to be embedded in gRPC request messages for efficient
     7  // pagination. Ex:
     8  //
     9  //  message SomeRequest {
    10  //          Foo some_parameter = 1;
    11  //          PageRequest pagination = 2;
    12  //  }
    13  message PageRequest {
    14    // key is a value returned in PageResponse.next_key to begin
    15    // querying the next page most efficiently. Only one of offset or key
    16    // should be set.
    17    bytes key = 1;
    18  
    19    // offset is a numeric offset that can be used when key is unavailable.
    20    // It is less efficient than using key. Only one of offset or key should
    21    // be set.
    22    uint64 offset = 2;
    23  
    24    // limit is the total number of results to be returned in the result page.
    25    // If left empty it will default to a value to be set by each app.
    26    uint64 limit = 3;
    27  
    28    // count_total is set to true  to indicate that the result set should include
    29    // a count of the total number of items available for pagination in UIs.
    30    // count_total is only respected when offset is used. It is ignored when key
    31    // is set.
    32    bool count_total = 4;
    33  
    34    // reverse is set to true if results are to be returned in the descending order.
    35    //
    36    // Since: cosmos-sdk 0.43
    37    bool reverse = 5;
    38  }
    39  
    40  // PageResponse is to be embedded in gRPC response messages where the
    41  // corresponding request message has used PageRequest.
    42  //
    43  //  message SomeResponse {
    44  //          repeated Bar results = 1;
    45  //          PageResponse page = 2;
    46  //  }
    47  message PageResponse {
    48    // next_key is the key to be passed to PageRequest.key to
    49    // query the next page most efficiently
    50    bytes next_key = 1;
    51  
    52    // total is total number of results available if PageRequest.count_total
    53    // was set, its value is undefined otherwise
    54    uint64 total = 2;
    55  }