Documentation
¶
Overview ¶
Package helpers contains shared nvfleetctl command helpers.
Index ¶
Constants ¶
View Source
const ( // MinPageSize is the smallest page size accepted by list commands MinPageSize = 1 // MaxPageSize is the largest page size accepted by list commands MaxPageSize = 100 // MaxPages bounds all-page pagination when the API keeps reporting more data MaxPages = 10000 )
Variables ¶
This section is empty.
Functions ¶
func ExtractRawItems ¶
func ExtractRawItems(data []byte, itemKey string) ([]json.RawMessage, error)
Extracts raw array items from an API response object
func ParseCommaList ¶
Splits a comma-separated flag value into trimmed values
Types ¶
type MergedJSONResult ¶
type MergedJSONResult struct {
Items []json.RawMessage `json:"items"`
Pagination MergedPagination `json:"pagination"`
}
Represents normalized JSON for all-page output
func FetchAllRawPages ¶
func FetchAllRawPages(itemKey string, startPage int, fetch func(page int) (RawPage, error)) (MergedJSONResult, error)
Fetches and merges raw API item payloads across pages
Click to show internal directories.
Click to hide internal directories.