github.com/solo-io/cue@v0.4.7/cue/testdata/fulleval/002_resolve_all_disjunctions.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: resolve all disjunctions
     4  #evalFull
     5  -- in.cue --
     6  service: [Name=string]: {
     7  	name: string | *Name
     8  	port: int | *7080
     9  }
    10  service: foo: _
    11  service: bar: {port: 8000}
    12  service: baz: {name: "foobar"}
    13  -- out/def --
    14  service: {
    15  	{[Name=string]: {
    16  		name: string | *Name, port: int | *7080
    17  	}}
    18  	foo: {
    19  		name: string | *"foo"
    20  		port: int | *7080
    21  	}
    22  	bar: {
    23  		name: string | *"bar"
    24  		port: 8000
    25  	}
    26  	baz: {
    27  		name: "foobar"
    28  		port: int | *7080
    29  	}
    30  }
    31  -- out/export --
    32  service: {
    33  	foo: {
    34  		name: "foo"
    35  		port: 7080
    36  	}
    37  	bar: {
    38  		name: "bar"
    39  		port: 8000
    40  	}
    41  	baz: {
    42  		name: "foobar"
    43  		port: 7080
    44  	}
    45  }
    46  -- out/yaml --
    47  service:
    48    foo:
    49      name: foo
    50      port: 7080
    51    bar:
    52      name: bar
    53      port: 8000
    54    baz:
    55      name: foobar
    56      port: 7080
    57  -- out/json --
    58  {"service":{"foo":{"name":"foo","port":7080},"bar":{"name":"bar","port":8000},"baz":{"name":"foobar","port":7080}}}
    59  -- out/legacy-debug --
    60  <0>{service: <1>{[]: <2>(Name: string)-><3>{name: (string | *<2>.Name), port: (int | *7080)}, foo: <4>{name: "foo", port: 7080}, bar: <5>{name: "bar", port: 8000}, baz: <6>{name: "foobar", port: 7080}}}
    61  -- out/compile --
    62  --- in.cue
    63  {
    64    service: {
    65      [string]: {
    66        name: (string|*〈1;-〉)
    67        port: (int|*7080)
    68      }
    69    }
    70    service: {
    71      foo: _
    72    }
    73    service: {
    74      bar: {
    75        port: 8000
    76      }
    77    }
    78    service: {
    79      baz: {
    80        name: "foobar"
    81      }
    82    }
    83  }
    84  -- out/eval --
    85  (struct){
    86    service: (struct){
    87      foo: (struct){
    88        name: (string){ |(*(string){ "foo" }, (string){ string }) }
    89        port: (int){ |(*(int){ 7080 }, (int){ int }) }
    90      }
    91      bar: (struct){
    92        port: (int){ 8000 }
    93        name: (string){ |(*(string){ "bar" }, (string){ string }) }
    94      }
    95      baz: (struct){
    96        name: (string){ "foobar" }
    97        port: (int){ |(*(int){ 7080 }, (int){ int }) }
    98      }
    99    }
   100  }