utils

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueryParamListValues

func GetQueryParamListValues(queryVars url.Values, varKey string, maxNumItems int) (items []string, err error)

GetQueryParamListValues obtains a list of strings from the provided queryVars, by parsing all values with key 'varKey' and splitting the values by commas, if they contain commas. Up to maxNumItems values are allowed in total.

func Slice

func Slice(full []models.Dimension, offset, limit int) (sliced []models.Dimension)

Slice is a utility function to cut a slice according to the provided offset and limit.

func SliceStr added in v1.30.0

func SliceStr(full []*string, offset, limit int) (sliced []*string)

SliceStr is a utility function to cut a slice of *strings according to the provided offset and limit.

func ValidatePositiveInt

func ValidatePositiveInt(parameter string) (val int, err error)

ValidatePositiveInt obtains the positive int value of query var defined by the provided varKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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