utils

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLRawQuery   = "urlRawQuery"
	ServiceParams = "service_params"
	Passage       = "passage"
)

Variables

This section is empty.

Functions

func CastCommandValue added in v1.1.1

func CastCommandValue(resourceName string, valueType string, reading interface{}) (result *models.CommandValue, err error)

func CheckValueRange added in v1.1.1

func CheckValueRange(valueType string, reading interface{}) bool

func GetBoolEnv

func GetBoolEnv(key string, fallback bool) bool

func GetIntEnv

func GetIntEnv(key string, fallback int64) int64

func ObjectToQueryParam

func ObjectToQueryParam(obj interface{}) (map[string]string, error)

func ParametersFromURLRawQuery

func ParametersFromURLRawQuery(req sdkmodels.CommandRequest) ([]byte, errors.EdgeX)

func PassageFromProtocols

func PassageFromProtocols(protocols map[string]models.ProtocolProperties) (map[string]string, errors.EdgeX)

func Ternary

func Ternary[T any](x bool, a T, b T) T

func Validate

func Validate(s interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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