types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListMeta

type ListMeta struct {
	Total       int `json:"total"`
	ItemsLength int `json:"itemsLength"`
}

ListMeta describes the structure of list metadata

type ListResponse

type ListResponse struct {
	Metadata ListMeta    `json:"metadata"`
	Items    interface{} `json:"items"`
}

ListResponse describes a list

func NewListResponse

func NewListResponse(total int, items interface{}) *ListResponse

NewListResponse create a ListResponse of a list.

type QueryParams

type QueryParams struct {
	Start  uint64 `source:"query,start,default=0"`
	Limit  uint64 `source:"query,limit,default=99999"`
	Filter string `source:"query,filter"`
	// Sort will sorts the results by metadata.creationTimestamp
	Sort bool `source:"query,sort"`
	// Ascending will sort the results by ascending order, otherwise by descending order
	Ascending bool `source:"query,ascending"`
	// Detail determines whether to return details of list items.
	Detail bool `source:"query,detail"`
}

QueryParams describes pagination of request, start and limit defined.

Jump to

Keyboard shortcuts

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