spec

package
v0.0.0-...-7533f67 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeCluster   = "cluster"
	ScopeNamespace = "namespace"
)
View Source
const APIVersion = "spec.kure.sh/v1alpha1"

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`

	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`

	Dependencies []APIDependency `json:"dependencies"`

	Groups []APIGroupIdentifier `json:"groups"`
}

type APIDependency

type APIDependency struct {
	Package string `json:"package"`
	Version string `json:"version"`
}

type APIGroup

type APIGroup struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`

	API                string `json:"api"`
	APIGroupIdentifier `json:",inline"`

	Versions         []string `json:"versions"`
	PreferredVersion *string  `json:"preferredVersion"`
}

type APIGroupIdentifier

type APIGroupIdentifier struct {
	Module *string `json:"module"`
	Name   string  `json:"name"`
}

func (APIGroupIdentifier) Same

type APIGroupVersion

type APIGroupVersion struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`

	API     string             `json:"api"`
	Group   APIGroupIdentifier `json:"group"`
	Version string             `json:"version"`

	Dependencies []APIDependency `json:"dependencies"`

	Definitions []Definition `json:"definitions"`
}

type ArrayType

type ArrayType struct {
	Values Type `json:"values"`
}

func (ArrayType) Variant

func (t ArrayType) Variant() string

type BooleanType

type BooleanType struct{}

func (BooleanType) Variant

func (t BooleanType) Variant() string

type Bundle

type Bundle struct {
	API      API                `json:"api"`
	Groups   []*APIGroup        `json:"groups"`
	Versions []*APIGroupVersion `json:"versions"`
}

func NewBundle

func NewBundle(gvs []*APIGroupVersion) (*Bundle, error)

type Definition

type Definition struct {
	DefinitionMeta
	Value Type `json:"value"`
}

type DefinitionMeta

type DefinitionMeta struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Deprecated  bool   `json:"deprecated,omitempty"`
}

type FloatType

type FloatType struct {
	Size int `json:"size,omitempty"`
}

func (FloatType) Variant

func (t FloatType) Variant() string

type IntegerType

type IntegerType struct {
	Size int `json:"size,omitempty"`
}

func (IntegerType) Variant

func (t IntegerType) Variant() string

type MapType

type MapType struct {
	Values Type `json:"values"`
}

func (MapType) Variant

func (t MapType) Variant() string

type ObjectType

type ObjectType struct {
	Inherit    []Type     `json:"inherit,omitempty"`
	Properties []Property `json:"properties"`
}

func (ObjectType) Variant

func (t ObjectType) Variant() string

type OptionalType

type OptionalType struct {
	Value Type `json:"value"`
}

func (OptionalType) Variant

func (t OptionalType) Variant() string

type Property

type Property struct {
	PropertyMeta
	Value Type `json:"value"`
}

type PropertyMeta

type PropertyMeta struct {
	DefinitionMeta
	Required bool `json:"required,omitempty"`
}

type ReferencePackage

type ReferencePackage struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type ReferenceScope

type ReferenceScope struct {
	Package string             `json:"package,omitempty"`
	Group   APIGroupIdentifier `json:"group"`
	Version string             `json:"version"`
}

type ReferenceTarget

type ReferenceTarget struct {
	Scope *ReferenceScope `json:"scope,omitempty"`
	Name  string          `json:"name"`
}

type ReferenceType

type ReferenceType struct {
	Target ReferenceTarget `json:"target"`
}

func (ReferenceType) Variant

func (t ReferenceType) Variant() string

type ResourceMeta

type ResourceMeta struct {
	Name         string       `json:"name,omitempty"`
	SingularName string       `json:"singularName,omitempty"`
	Kind         string       `json:"kind"`
	Scope        string       `json:"scope"`
	Subresources Subresources `json:"subresources,omitempty"`
}

type ResourceType

type ResourceType struct {
	Properties []Property   `json:"properties"`
	Metadata   ResourceMeta `json:"metadata"`
}

func (ResourceType) Variant

func (r ResourceType) Variant() string

type StringType

type StringType struct {
	Enum   []string `json:"enum,omitempty"`
	Format string   `json:"format,omitempty"`
}

func (StringType) Variant

func (t StringType) Variant() string

type Subresources

type Subresources struct {
	Status bool `json:"status,omitempty"`
	Scale  bool `json:"scale,omitempty"`
}

type Type

type Type struct {
	Variant TypeVariant
}

func (Type) MarshalJSON

func (t Type) MarshalJSON() ([]byte, error)

func (*Type) UnmarshalJSON

func (t *Type) UnmarshalJSON(bytes []byte) (err error)

type TypeVariant

type TypeVariant interface {
	pjson.Variant
}

type UnionType

type UnionType struct {
	Values []Type `json:"values"`
}

func (UnionType) Variant

func (t UnionType) Variant() string

type UnknownType

type UnknownType struct{}

func (UnknownType) Variant

func (t UnknownType) Variant() string

Jump to

Keyboard shortcuts

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