Help us shape the future of Go! Take the 2026 Go Developer Survey

resourceutil

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicProperties = []string{"application", "environment", "status", "connections", "codeReference", "secrets"}

BasicProperties is a list of common properties that are framework-owned and expected to be present in all resources. These are excluded from generic recipe-output copying and connection-based environment variable injection.

"secrets" is the framework-owned block that both declares which recipe outputs are secrets and, via its reserved read-only "name" sub-property, exposes the reference to the managed Radius.Security/secrets resource that Radius materializes for those outputs.

Functions

func GetConnectionNameandSourceIDs added in v0.49.0

func GetConnectionNameandSourceIDs[P any](resource P) (map[string]string, error)

GetConnectionNameandSourceIDs extracts the connected resource IDs from the resource's properties. It returns a map where the keys are connection names and the values are the corresponding connected resource's IDs.

func GetPropertiesFromResource

func GetPropertiesFromResource[P any](resource P) (map[string]any, error)

GetPropertiesFromResource extracts the "properties" field from the resource by serializing it to JSON and deserializing just the "properties" field.

Types

type ResourceMetadata added in v0.55.0

type ResourceMetadata struct {
	ID         string         `json:"id"`
	Name       string         `json:"name"`
	Type       string         `json:"type"`
	Properties map[string]any `json:"properties,omitempty"`
}

ResourceMetadata represents resource metadata including ID, Name, Type and Properties

func GetAllPropertiesFromResource added in v0.55.0

func GetAllPropertiesFromResource[P any](resource P) (*ResourceMetadata, error)

GetAllPropertiesFromResource extracts the resource metadata including ID, Name, Type and properties by unmarshalling the resource and extracting the required fields.

Jump to

Keyboard shortcuts

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