Documentation
¶
Overview ¶
Copyright 2025 MongoDB Inc
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoMatchingPropertySelector = errors.New("no matching property selector found to set value")
ErrNoMatchingPropertySelector when no property selectors matched the value
Functions ¶
func CollapseAll ¶
func CollapseAll(mappings []*Mapping, main client.Object, deps []client.Object, req map[string]any) error
CollapseAll takes a list of mappings and collapses the ones found in the given request unstructured object. The SDK request must map to the main typed
object and deps are other kubernetes objects related with such main object
func ExpandAll ¶
func ExpandAll(mappings []*Mapping, main client.Object, deps []client.Object, cr map[string]any) ([]client.Object, error)
ExpandAll takes a list of mappings and expands the ones found in the given CR unstructured object. CR corresponds to the main typed object and deps are other kubernetes objects related with such main object
Types ¶
type KubeMapping ¶
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
Mapping encodes a reference mapping consisting of two extensions, a x-kubernetes-mapping and a x-openapi-mapping
func FindMappings ¶
FindMappings lists all reference mappings from the given schema at a path
func NewMapping ¶
func NewMapping(path []string, propertyName string, kubeMapping KubeMapping, openAPIMapping OpenAPIMapping) *Mapping
NewMapping creates a reference mapping from its basic information: path, property name, kubernetes and openapi extension mappings