github.com/solo-io/cue@v0.4.7/doc/tutorial/basics/0_intro/20_cue.txt (about) 1 2 -- frontmatter.toml -- 3 title = "Types are values" 4 description = "" 5 6 -- text.md -- 7 CUE merges the concepts of values and types. 8 Below is a demonstration of this concept, 9 showing respectively 10 some data, a possible schema for this data, 11 and something in between: a typical CUE constraint. 12 13 {{< blocks/sidebyside >}} 14 <div class="col"> 15 <i>Data</i> 16 {{< highlight go >}} 17 moscow: { 18 name: "Moscow" 19 pop: 11.92M 20 capital: true 21 } 22 {{< /highlight >}} 23 </div> 24 25 <div class="col"> 26 <i>Schema</i> 27 {{< highlight go >}} 28 municipality: { 29 name: string 30 pop: int 31 capital: bool 32 } 33 {{< /highlight >}} 34 </div> 35 36 <div class="col"> 37 <i>CUE</i> 38 {{< highlight go >}} 39 largeCapital: { 40 name: string 41 pop: >5M 42 capital: true 43 } 44 {{< /highlight >}} 45 </div> 46 {{< /blocks/sidebyside >}} 47 48 In general, in CUE one starts with a broad definition of a schema, 49 describing all possible instances, 50 and then narrows down these definitions for particular use cases 51 until a concrete data instance remains.