idutils

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBucketName added in v2.8.1

func GenerateBucketName(c coordinate.Coordinate) string

GenerateBucketName returns the "bucketName" identifier for a bucket based on the coordinate. As all buckets are of the same type and never overlap with configs of different types on the same API, the "type" is omitted. Since the bucket API does not support colons, we concatenate them using underscores.

func GenerateExternalID

func GenerateExternalID(c coordinate.Coordinate) (string, error)

GenerateExternalID generates a string that serves as an external ID for a Settings 2.0 object. It requires a [coordinate.Coordinate] as input and produces a string in the format "monaco:<BASE64_ENCODED_STR>" If Type or ConfigId of the passed [coordinate.Coordinate] is empty, an error is returned

func GenerateUUIDFromConfigId

func GenerateUUIDFromConfigId(projectUniqueId string, configId string) string

GenerateUUIDFromConfigId takes the unique project identifier within an environment, a config id and generates a valid UUID based on provided information

func GenerateUUIDFromCoordinate

func GenerateUUIDFromCoordinate(c coordinate.Coordinate) string

GenerateUUIDFromCoordinate generates a UUID out of a configs coordinate. This uses GenerateUUIDFromString to generate a stable (same coordinate == same UUID) UUID v3 (MD5 hash based) with a "dynatrace.com" URL namespace UUID.

func GenerateUUIDFromString

func GenerateUUIDFromString(data string) string

GenerateUUIDFromString generates a fixed UUID from a given string - usually a configuration name. This is used when dealing with select Dynatrace APIs that do not/or no longer support unique name properties. As a convention between monaco and such APIs, both monaco and Dynatrace will generate the same name-based UUID using UUID v3 (MD5 hash based) with a "dynatrace.com" URL namespace UUID.

func GetNumericIDForObjectID

func GetNumericIDForObjectID(objectID string) (int, error)

GetNumericIDForObjectID parses the Settings Object ID of a Dynatrace Management Zone (only object with numeric IDs) into a numeric identifier. To achieve this it replicates the en-/decoding logic used in Dynatrace as closely as possible.

func IsMeId

func IsMeId(id string) bool

IsMeId checks whether the string provided is a valid ME-ID. Checks only uppercase

func IsUUID

func IsUUID(configId string) bool

IsUUID tests whether a potential configId is already a UUID

Types

type ExternalIDGenerator

type ExternalIDGenerator func(coordinate.Coordinate) (string, error)

Jump to

Keyboard shortcuts

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