agones.dev/agones@v1.53.0/pkg/client/applyconfiguration/internal/internal.go (about)

     1  // Copyright 2024 Google LLC All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // This code was autogenerated. Do not edit directly.
    16  
    17  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    18  
    19  package internal
    20  
    21  import (
    22  	fmt "fmt"
    23  	sync "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  `)