apihelpers

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package apihelpers provides some helper functions for the API package; these were extracted into this package to avoid having additional dependencies on the API package itself

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDurationValuesPerDataSource added in v0.31.0

func GetDurationValuesPerDataSource(s string) (map[string]time.Duration, error)

GetDurationValuesPerDataSource works like GetStringValuesPerDataSource, but will return time.Duration values instead

func GetIntValuesPerDataSource added in v0.31.0

func GetIntValuesPerDataSource(s string) (map[string]int, error)

GetIntValuesPerDataSource works like GetStringValuesPerDataSource, but will return int values instead

func GetStringValuesPerDataSource added in v0.31.0

func GetStringValuesPerDataSource(s string) (map[string]string, error)

GetStringValuesPerDataSource will separate a string and extract per-datasource values. It expects a string like `datasource1:value,datasource2:value` or `value` (datasource is optional - this will lead to an empty key)

func ParamDescsToParams

func ParamDescsToParams(descs params.ParamDescs) (res api.Params)

func ParamToParamDesc

func ParamToParamDesc(p *api.Param) *params.ParamDesc

func ToParamDescs

func ToParamDescs(p api.Params) params.ParamDescs

func Validate

func Validate(p api.Params, v api.ParamValues) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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