Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIObjectGenerator ¶
type APIObjectGenerator func() APIObject
APIObjectGenerator returns an implementor of the APIObject interface
type Builder ¶
type Builder interface {
BuildFromParsed(ObjectLookup) error
}
Builder processes the parsed API objects contained in a lookup
type Mapping ¶
Mapping mapping between a kubernetes Kind and an API concrete type of type T
func NewMapping ¶
func (Mapping[T]) ToAPIObjectMapping ¶
ToAPIObjectMapping is helper to convert from other concrete types of Mapping to a APIObject Mapping This is mostly to help pass Mappings to RegisterMappings
type ObjectLookup ¶
ObjectLookup allows to search APIObjects by a unique key composed of apiVersion, kind, and name
func (ObjectLookup) GetFromRef ¶
func (o ObjectLookup) GetFromRef(ref corev1.ObjectReference) APIObject
GetFromRef searches in a ObjectLookup for an APIObject referenced by a corev1.ObjectReference
type ObjectLookupBuilder ¶
type ObjectLookupBuilder struct {
// contains filtered or unexported fields
}
ObjectLookupBuilder allows to construct an ObjectLookup and add APIObjects to it
func NewObjectLookupBuilder ¶
func NewObjectLookupBuilder() *ObjectLookupBuilder
func (*ObjectLookupBuilder) Add ¶
func (o *ObjectLookupBuilder) Add(objs ...APIObject) *ObjectLookupBuilder
Add acumulates an API object that will be included in the built ObjectLookup
func (*ObjectLookupBuilder) Build ¶
func (o *ObjectLookupBuilder) Build() ObjectLookup
Build constructs and returns an ObjectLookup After this method is called, the builder is reset and loses track of all previously added objects
type ParsedProcessor ¶
type ParsedProcessor[T any] func(*T, ObjectLookup)
ParsedProcessor fills the struct of type T with the parsed API objects in ObjectLookup
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser allows to parse from yaml with kubernetes style objects and store them in a type implementing Builder It allows to dynamically register configuration for mappings between kind and concrete types
func (*Parser) Parse ¶
Parse reads yaml manifest content with the registered mappings and passes the result to the Builder for further processing
func (*Parser) Read ¶
Read reads yaml manifest content with the registered mappings and passes the result to the Builder for further processing
func (*Parser) RegisterMapping ¶
func (c *Parser) RegisterMapping(kind string, generator APIObjectGenerator) error
RegisterMapping records the mapping between a kubernetes Kind and an API concrete type
func (*Parser) RegisterMappings ¶
RegisterMappings records a collection of mappings