params

package
v0.0.0-...-be2ef80 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultPage     int32 = 1
	DefaultPageSize int32 = 25
)

Variables

This section is empty.

Functions

func GetPageParams

func GetPageParams(p *query.Pagination) (int32, int32)

func GetSortParamsForServiceGroups

func GetSortParamsForServiceGroups(s *query.Sorting) (sortField string, sortAsc bool, err error)

GetSortParamsForServiceGroups returns valid sorting parameters for service_groups from the sort query

func GetSortParamsForServices

func GetSortParamsForServices(s *query.Sorting) (sortField string, sortAsc bool, err error)

GetSortParamsForServices returns valid sorting parameters for services from the sort query

Types

type SortField

type SortField int

SortField defines our valid sorting fields

const (
	DefaultSortFieldForServiceGroups = "percent_ok"
	DefaultSortFieldForServices      = "health"
	DefaultSortAscending             = true

	// Define here your sort fields
	DefaultField SortField = iota
	PercentOkField
	NameField
	HealthField
	AppField
	EnvironmentField
)

Jump to

Keyboard shortcuts

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