builtin

package
v0.0.0-...-dcdb1c8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSchema

func GetSchema() *schema.Instance

GetSchema returns the schema for all built-in types.

func IsBuiltIn

func IsBuiltIn(kind string) bool

IsBuiltIn indicates whether there is a built-in source for the given kind.

func New

New creates a new built-in source. If the type is not built-in, returns an error.

Types

type Type

type Type struct {
	// contains filtered or unexported fields
}

Type provides functions for a single built-in type.

func GetType

func GetType(kind string) *Type

GetType returns the built-in Type for the given kind, or nil if the kind is unsupported.

func (*Type) ExtractObject

func (p *Type) ExtractObject(o interface{}) metav1.Object

ExtractObject extracts the k8s object metadata from the given object of this type.

func (*Type) ExtractResource

func (p *Type) ExtractResource(o interface{}) proto.Message

ExtractResource extracts the resource proto from the given object of this type.

func (*Type) GetSpec

func (p *Type) GetSpec() *schema.ResourceSpec

GetSpec returns the schema.ResourceSpec associated with this built-in type.

func (*Type) IsEqual

func (p *Type) IsEqual(o1 interface{}, o2 interface{}) bool

IsEqual indicates if the two objects of this type are equivalent

func (*Type) NewInformer

func (p *Type) NewInformer(sharedInformers informers.SharedInformerFactory) cache.SharedIndexInformer

NewInformer creates a new k8s informer for resources of this type.

func (*Type) ParseJSON

func (p *Type) ParseJSON(input []byte) (interface{}, error)

ParseJSON parses the given JSON into a k8s object of this type.

Jump to

Keyboard shortcuts

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