show

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceTypeSchema added in v0.48.0

func GetResourceTypeSchema(schema map[string]any) map[string]FieldSchema

GetResourceTypeSchema extracts the field schema from each fields in the resource type schema. It returns a map where the keys are property names and the values are FieldSchema objects.

func NewCommand

func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner)

NewCommand creates an instance of the `rad resource-type show` command and runner.

Types

type FieldSchema added in v0.48.0

type FieldSchema struct {
	// Name is the name of the field.
	Name string
	// Type is the type of the field (e.g. "string", "object", etc.).
	Type string
	// Description provides additional information about the field.
	Description string
	// IsRequired indicates if the field is required.
	IsRequired bool
	// IsReadOnly indicates if the field is read-only.
	IsReadOnly bool
	// Properties contains nested fields if the type is "object".
	Properties map[string]FieldSchema
}

FieldSchema represents the schema of a field in a resource type.

type PropertiesOutputFormat added in v0.48.0

type PropertiesOutputFormat struct {
	// Heading is the path to this field (e.g. ".database.server.name").
	Heading string
	// Schema contains the field's metadata, such as type and nested properties.
	Schema FieldSchema
}

PropertiesOutputFormat holds a nested field path as Heading and its schema definition.

type PropertyTitleStatus added in v0.48.0

type PropertyTitleStatus string

PropertyTitleStatus defines the status of properties title in the output display.

const (
	// PropertyTitleNone indicates that no property title is displayed.
	PropertyTitleNone PropertyTitleStatus = "None"
	// PropertyTitleTopLevel indicates that the top-level properties are displayed.
	PropertyTitleTopLevel PropertyTitleStatus = "TopLevelProperties"
	// PropertyTitleObjectLevel indicates that object-level properties are displayed.
	PropertyTitleObjectLevel PropertyTitleStatus = "ObjectLevelProperties"
)

type Runner

type Runner struct {
	ConfigHolder     *framework.ConfigHolder
	Output           output.Interface
	Format           string
	UCPClientFactory *v20231001preview.ClientFactory
	Workspace        *workspaces.Workspace

	ResourceTypeName          string
	ResourceProviderNamespace string
	ResourceTypeSuffix        string
}

Runner is the Runner implementation for the `rad resource-type show` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates an instance of the runner for the `rad resource-type show` command.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run runs the `rad resource-type show` command.

func (*Runner) Validate

func (r *Runner) Validate(cmd *cobra.Command, args []string) error

Validate runs validation for the `rad resource-type show` command.

Jump to

Keyboard shortcuts

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