Documentation ¶
Overview ¶
Package meta provides definition of core metadata resources.
Index ¶
Constants ¶
const NamespaceName resource.Namespace = "meta"
NamespaceName is the name of 'meta' namespace.
const NamespaceType = resource.Type("Namespaces.meta.cosi.dev")
NamespaceType is the type of Namespace.
const Owner resource.Owner = "meta"
Owner is the owner for the 'meta' objects.
const ResourceDefinitionType = resource.Type("ResourceDefinitions.meta.cosi.dev")
ResourceDefinitionType is the type of ResourceDefinition.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides metadata about namespaces.
func NewNamespace ¶
func NewNamespace(id resource.ID, spec NamespaceSpec) *Namespace
NewNamespace initializes a Namespace resource.
func (*Namespace) ResourceDefinition ¶
func (r *Namespace) ResourceDefinition() ResourceDefinitionSpec
ResourceDefinition implements core.ResourceDefinitionProvider interface.
type NamespaceSpec ¶
type NamespaceSpec struct {
Description string `yaml:"description"`
}
NamespaceSpec provides Namespace definition.
type PrintColumn ¶
PrintColumn describes extra columns to print for the resources.
type ResourceDefinition ¶
type ResourceDefinition struct {
// contains filtered or unexported fields
}
ResourceDefinition provides metadata about namespaces.
func NewResourceDefinition ¶
func NewResourceDefinition(spec ResourceDefinitionSpec) (*ResourceDefinition, error)
NewResourceDefinition initializes a ResourceDefinition resource.
func (*ResourceDefinition) DeepCopy ¶
func (r *ResourceDefinition) DeepCopy() resource.Resource
DeepCopy implements resource.Resource.
func (*ResourceDefinition) Metadata ¶
func (r *ResourceDefinition) Metadata() *resource.Metadata
Metadata implements resource.Resource.
func (*ResourceDefinition) ResourceDefinition ¶
func (r *ResourceDefinition) ResourceDefinition() ResourceDefinitionSpec
ResourceDefinition implements core.ResourceDefinitionProvider interface.
func (*ResourceDefinition) Spec ¶
func (r *ResourceDefinition) Spec() interface{}
Spec implements resource.Resource.
func (*ResourceDefinition) String ¶
func (r *ResourceDefinition) String() string
type ResourceDefinitionProvider ¶
type ResourceDefinitionProvider interface {
ResourceDefinition() ResourceDefinitionSpec
}
ResourceDefinitionProvider is implemented by resources which can be registered automatically.
type ResourceDefinitionSpec ¶
type ResourceDefinitionSpec struct { Type resource.Type `yaml:"type"` DisplayType string `yaml:"displayType"` DefaultNamespace resource.Namespace `yaml:"defaultNamespace"` Aliases []resource.Type `yaml:"aliases"` PrintColumns []PrintColumn `yaml:"printColumns"` }
ResourceDefinitionSpec provides ResourceDefinition definition.
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.