All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.provenance.client.protobuf.Pagination.kt Maven / Gradle / Ivy

There is a newer version: 1.19.1
Show newest version
package io.provenance.client.protobuf

import cosmos.base.query.v1beta1.Pagination

/**
 * Create a new pagination request builder given an offset and limit value.
 *
 * @param offset Pagination offset
 * @param limit Pagination limit
 * @return [Pagination.PageRequest.Builder]
 */
fun paginationBuilder(offset: Int, limit: Int): Pagination.PageRequest.Builder =
    Pagination.PageRequest
        .newBuilder()
        .setOffset(offset.toLong())
        .setLimit(limit.toLong())
        .setCountTotal(true)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy