github.com/solo-io/cue@v0.4.7/cue/testdata/export/022.txtar (about)

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