...

Source file src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/internal/internal.go

Documentation: k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/internal

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    18  
    19  package internal
    20  
    21  import (
    22  	"fmt"
    23  	"sync"
    24  
    25  	typed "sigs.k8s.io/structured-merge-diff/v4/typed"
    26  )
    27  
    28  func Parser() *typed.Parser {
    29  	parserOnce.Do(func() {
    30  		var err error
    31  		parser, err = typed.NewParser(schemaYAML)
    32  		if err != nil {
    33  			panic(fmt.Sprintf("Failed to parse schema: %v", err))
    34  		}
    35  	})
    36  	return parser
    37  }
    38  
    39  var parserOnce sync.Once
    40  var parser *typed.Parser
    41  var schemaYAML = typed.YAMLObject(`types:
    42  - name: __untyped_atomic_
    43    scalar: untyped
    44    list:
    45      elementType:
    46        namedType: __untyped_atomic_
    47      elementRelationship: atomic
    48    map:
    49      elementType:
    50        namedType: __untyped_atomic_
    51      elementRelationship: atomic
    52  - name: __untyped_deduced_
    53    scalar: untyped
    54    list:
    55      elementType:
    56        namedType: __untyped_atomic_
    57      elementRelationship: atomic
    58    map:
    59      elementType:
    60        namedType: __untyped_deduced_
    61      elementRelationship: separable
    62  `)
    63  

View as plain text