spec

package
v0.4.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package spec contains resource specs for the meta resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrintColumn

type PrintColumn struct {
	Name     string `yaml:"name"`
	JSONPath string `yaml:"jsonPath"`
}

PrintColumn describes extra columns to print for the resources.

type ResourceDefinitionSpec

type ResourceDefinitionSpec struct {
	// Canonical type name.
	Type resource.Type `yaml:"type"`
	// Displayed human-readable type name.
	DisplayType string `yaml:"displayType"`

	// Default namespace to look for the resource if no namespace is given.
	DefaultNamespace resource.Namespace `yaml:"defaultNamespace"`

	// Human-readable aliases.
	Aliases []resource.Type `yaml:"aliases"`
	// All aliases for automatic matching.
	AllAliases []resource.Type `yaml:"allAliases"`

	// Additional columns to print in table output.
	PrintColumns []PrintColumn `yaml:"printColumns"`

	// Sensitivity indicates how secret resource of this type is.
	// The empty value represents a non-sensitive resource.
	Sensitivity Sensitivity `yaml:"sensitivity,omitempty"`
}

ResourceDefinitionSpec provides ResourceDefinition definition.

func (ResourceDefinitionSpec) DeepCopy

DeepCopy generates a deep copy of ResourceDefinitionSpec.

func (*ResourceDefinitionSpec) Fill

func (spec *ResourceDefinitionSpec) Fill() error

Fill the spec while validating any missing items.

func (*ResourceDefinitionSpec) ID

func (spec *ResourceDefinitionSpec) ID() resource.ID

ID computes id of the resource definition.

func (ResourceDefinitionSpec) MarshalProto

func (spec ResourceDefinitionSpec) MarshalProto() ([]byte, error)

MarshalProto implements ProtoMarshaler.

func (*ResourceDefinitionSpec) UnmarshalProto

func (spec *ResourceDefinitionSpec) UnmarshalProto(protoBytes []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type Sensitivity

type Sensitivity string

Sensitivity indicates how secret resource is. The empty value represents a non-sensitive resource.

const (
	NonSensitive Sensitivity = ""
	Sensitive    Sensitivity = "sensitive"
)

Sensitivity values.

Jump to

Keyboard shortcuts

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