github.com/oam-dev/kubevela@v1.9.11/references/cuegen/generators/provider/testdata/valid.cue (about) 1 package test 2 3 #Apply: { 4 #do: "apply" 5 #provider: "test" 6 $params: { 7 // +usage=The cluster to use 8 cluster: string 9 // +usage=The resource to get or apply 10 resource: { 11 ... 12 } 13 // +usage=The options to get or apply 14 options: { 15 // +usage=The strategy of the resource 16 threeWayMergePatch: { 17 // +usage=The strategy to get or apply the resource 18 enabled: *true | bool 19 // +usage=The annotation prefix to use for the three way merge patch 20 annotationPrefix: *"resource" | string 21 } 22 } 23 } 24 $returns: { 25 ... 26 } 27 } 28 29 #Get: { 30 #do: "get" 31 #provider: "test" 32 $params: { 33 // +usage=The cluster to use 34 cluster: string 35 // +usage=The resource to get or apply 36 resource: { 37 ... 38 } 39 // +usage=The options to get or apply 40 options: { 41 // +usage=The strategy of the resource 42 threeWayMergePatch: { 43 // +usage=The strategy to get or apply the resource 44 enabled: *true | bool 45 // +usage=The annotation prefix to use for the three way merge patch 46 annotationPrefix: *"resource" | string 47 } 48 } 49 } 50 $returns: { 51 ... 52 } 53 } 54 55 #List: { 56 #do: "list" 57 #provider: "test" 58 $params: { 59 // +usage=The cluster to use 60 cluster: string 61 // +usage=The filter to list the resources 62 filter?: { 63 // +usage=The namespace to list the resources 64 namespace?: string 65 // +usage=The label selector to filter the resources 66 matchingLabels?: [string]: string 67 } 68 // +usage=The resource to list 69 resource: { 70 ... 71 } 72 } 73 $returns: { 74 ... 75 } 76 } 77 78 #Patch: { 79 #do: "patch" 80 #provider: "test" 81 $params: { 82 // +usage=The cluster to use 83 cluster: string 84 // +usage=The resource to patch 85 resource: { 86 ... 87 } 88 // +usage=The patch to be applied to the resource with kubernetes patch 89 patch: { 90 // +usage=The type of patch being provided 91 type: "merge" | "json" | "strategic" 92 data: _ 93 } 94 } 95 $returns: { 96 ... 97 } 98 }