Debian Codegraph @

goyaml.v2/yaml_aliases.go

raw
1 /*
2 Copyright 2025 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 package yaml
18
19 import (
20 gopkg_yaml "go.yaml.in/yaml/v2"
21 )
22
23 // Type aliases for public types from go.yaml.in/yaml/v2
24 type (
25 // MapSlice encodes and decodes as a YAML map.
26 // The order of keys is preserved when encoding and decoding.
27 // Deprecated: Use go.yaml.in/yaml/v2.MapSlice directly.
28 MapSlice = gopkg_yaml.MapSlice
29
30 // MapItem is an item in a MapSlice.
31 // Deprecated: Use go.yaml.in/yaml/v2.MapItem directly.
32 MapItem = gopkg_yaml.MapItem
33
34 // Unmarshaler is implemented by types to customize their behavior when being unmarshaled from a YAML document.
35 // Deprecated: Use go.yaml.in/yaml/v2.Unmarshaler directly.
36 Unmarshaler = gopkg_yaml.Unmarshaler
37
38 // Marshaler is implemented by types to customize their behavior when being marshaled into a YAML document.
39 // Deprecated: Use go.yaml.in/yaml/v2.Marshaler directly.
40 Marshaler = gopkg_yaml.Marshaler
41
42 // IsZeroer is used to check whether an object is zero to determine whether it should be omitted when
43 // marshaling with the omitempty flag. One notable implementation is time.Time.
44 // Deprecated: Use go.yaml.in/yaml/v2.IsZeroer directly.
45 IsZeroer = gopkg_yaml.IsZeroer
46
47 // Decoder reads and decodes YAML values from an input stream.
48 // Deprecated: Use go.yaml.in/yaml/v2.Decoder directly.
49 Decoder = gopkg_yaml.Decoder
50
51 // Encoder writes YAML values to an output stream.
52 // Deprecated: Use go.yaml.in/yaml/v2.Encoder directly.
53 Encoder = gopkg_yaml.Encoder
54
55 // TypeError is returned by Unmarshal when one or more fields in the YAML document cannot be properly decoded.
56 // Deprecated: Use go.yaml.in/yaml/v2.TypeError directly.
57 TypeError = gopkg_yaml.TypeError
58 )
59
60 // Function aliases for public functions from go.yaml.in/yaml/v2
61 var (
62 // Unmarshal decodes the first document found within the in byte slice and assigns decoded values into the out value.
63 // Deprecated: Use go.yaml.in/yaml/v2.Unmarshal directly.
64 Unmarshal = gopkg_yaml.Unmarshal
65
66 // UnmarshalStrict is like Unmarshal except that any fields that are found in the data that do not have corresponding struct members will result in an error.
67 // Deprecated: Use go.yaml.in/yaml/v2.UnmarshalStrict directly.
68 UnmarshalStrict = gopkg_yaml.UnmarshalStrict
69
70 // Marshal serializes the value provided into a YAML document.
71 // Deprecated: Use go.yaml.in/yaml/v2.Marshal directly.
72 Marshal = gopkg_yaml.Marshal
73
74 // NewDecoder returns a new decoder that reads from r.
75 // Deprecated: Use go.yaml.in/yaml/v2.NewDecoder directly.
76 NewDecoder = gopkg_yaml.NewDecoder
77
78 // NewEncoder returns a new encoder that writes to w.
79 // Deprecated: Use go.yaml.in/yaml/v2.NewEncoder directly.
80 NewEncoder = gopkg_yaml.NewEncoder
81
82 // FutureLineWrap globally disables line wrapping when encoding long strings.
83 // Deprecated: Use go.yaml.in/yaml/v2.FutureLineWrap directly.
84 FutureLineWrap = gopkg_yaml.FutureLineWrap
85 )