c8ydata

package
v2.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CumulocityProperties = map[string]bool{
	"additionParents": true,
	"assetParents":    true,
	"childAdditions":  true,
	"childAssets":     true,
	"childDevices":    true,
	"deviceParents":   true,
	"creationTime":    true,
	"lastUpdated":     true,
	"self":            true,
}

CumulocityProperties contain a map of the static properties which are generally read-only and only controlled internally by Cumulocity or by other API calls

Functions

func ExtractVersion

func ExtractVersion(s string) string

ExtractVersion extracts a version from a string

func IsID

func IsID(v string) bool

IsID check if a string is most likely an id

func RemoveCumulocityProperties

func RemoveCumulocityProperties(data map[string]interface{}, removeID bool) map[string]interface{}

RemoveCumulocityProperties removes cumulocity properties from a map so it can be re-used in further Cumulocity requests, or the data view can be simplified

Types

type AddChildAddition

type AddChildAddition struct {
	Client      *c8y.Client
	URLProperty string
}

AddChildAddition adds a child addition relationship based ona c8y response

func (*AddChildAddition) Run

func (a *AddChildAddition) Run(v interface{}) (resp interface{}, err error)

type TransformRelativeTimestamp added in v2.17.0

type TransformRelativeTimestamp struct {
	Encode bool
}

func (*TransformRelativeTimestamp) Run added in v2.17.0

func (t *TransformRelativeTimestamp) Run(v interface{}) (resp interface{}, err error)

Jump to

Keyboard shortcuts

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