shared

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PaginatedRequestLimit is the maximum number of entries that can be returned in a paginated request
	PaginatedRequestLimit = 10000
)

Variables

This section is empty.

Functions

func AllPaginatedMarketParams

func AllPaginatedMarketParams(ctx context.Context, client pricestypes.QueryClient) ([]pricestypes.MarketParam, error)

AllPaginatedMarketParams returns all MarketParams from the prices module, paginating through the results and returning a list of all the aggregated market-params.

func HandlePaginatedQuery

func HandlePaginatedQuery(ctx context.Context, pq PaginatedQuery, initialPagination *query.PageRequest) error

Types

type PaginatedQuery

type PaginatedQuery func(ctx context.Context, req *query.PageRequest) (ResponseWithPagination, error)

PaginatedQuery is a function type that represents a paginated query to a cosmos-module's GRPC service

type ResponseWithPagination

type ResponseWithPagination interface {
	GetPagination() *query.PageResponse
}

ResponseWithPagination represents a response-type from a cosmos-module's GRPC service for entries that are paginated

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL