common

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPaginationLimit      = 1000
	DefaultPaginationLimit  = MaxPaginationLimit
	DefaultPaginationOffset = 0
	SortDirectionAsc        = "asc"
	SortDirectionDesc       = "desc"
)
View Source
const (
	KLimit        = "limit"
	KOffset       = "offset"
	KSort         = "sort"
	KLastModified = "lastmodified"
	KObjKey       = "objkey"
	KStorageTier  = "tier"
)

Variables

This section is empty.

Functions

func GetFilter

func GetFilter(request *restful.Request, filterOpts []string) (map[string]string, error)

func GetPaginationParam

func GetPaginationParam(request *restful.Request) (int32, int32, error)

func GetSortParam

func GetSortParam(request *restful.Request) (sortKeys []string, sortDirs []string, err error)

An example of sort key parameter will be like this: sort=key1:asc,key2:desc

Types

This section is empty.

Jump to

Keyboard shortcuts

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