ast

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Name         string `json:"name"`
	VariableName string `json:"variableName"`
	Description  string `json:"description"`
	Group        string `json:"group"`
	Kind         string `json:"kind"`
	Pilot        bool   `json:"pilot"`
	Builtin      bool   `json:"builtin"`
	Deprecated   bool   `json:"deprecated"`
}

Collection metadata. Describes basic structure of collections.

type Metadata

type Metadata struct {
	Collections []*Collection `json:"collections"`
	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 {
	Group              string `json:"group"`
	Version            string `json:"version"`
	Kind               string `json:"kind"`
	Plural             string `json:"plural"`
	ClusterScoped      bool   `json:"clusterScoped"`
	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