ast

package
v0.0.0-...-3a6e21b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Resources []*Resource `json:"resources"`
}

Metadata is the top-level container.

func Parse

func Parse(yamlText string) (*Metadata, error)

Parse and return a yaml representation of Metadata

func (*Metadata) FindResourceForGroupKind

func (m *Metadata) FindResourceForGroupKind(group, kind string) *Resource

FindResourceForGroupKind looks up a resource with the given group and kind. Returns nil if not found.

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Resource

type Resource struct {
	Identifier         string   `json:"identifier"`
	Group              string   `json:"group"`
	Version            string   `json:"version"`
	VersionAliases     []string `json:"versionAliases"`
	Kind               string   `json:"kind"`
	Plural             string   `json:"plural"`
	ClusterScoped      bool     `json:"clusterScoped"`
	Builtin            bool     `json:"builtin"`
	Specless           bool     `json:"specless"`
	Synthetic          bool     `json:"synthetic"`
	Proto              string   `json:"proto"`
	ProtoPackage       string   `json:"protoPackage"`
	StatusProto        string   `json:"statusProto"`
	StatusProtoPackage string   `json:"statusProtoPackage"`
	Validate           string   `json:"validate"`
	Description        string   `json:"description"`
}

Resource metadata for resources contained within a collection.

Jump to

Keyboard shortcuts

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