File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 14
14
15
15
// Package encoding contains subpackages to convert CUE to and from byte-level
16
16
// and textual representations.
17
+ //
18
+ // For some packages, CUE can be mapped to both concrete values and higher-level
19
+ // definitions. For instance, a Go value can be mapped based on its concrete
20
+ // values or on its underlying type. Similarly, the protobuf package can extract
21
+ // CUE definitions from .proto definitions files, but also convert proto
22
+ // messages to concrete values.
23
+ //
24
+ // To clarify between these cases, we adopt the following naming convention:
25
+ //
26
+ // Name Direction Level Example
27
+ // Decode x -> CUE Value Convert an incoming proto message to CUE
28
+ // Encode CUE -> x Value Convert CUE to JSON
29
+ // Extract x -> CUE Type Extract CUE definition from .proto file
30
+ // Generate CUE -> x Type Generate OpenAPI definition from CUE
31
+ //
32
+ // To be more precise, Decoders and Encoders deal with concrete values only.
33
+ //
34
+ // Unmarshal and Marshal are used if the respective Decoder and Encoder decode
35
+ // and encode from and to a stream of bytes.
17
36
package encoding
You can’t perform that action at this time.
0 commit comments