github.com/solo-io/cue@v0.4.7/pkg/uuid/testdata/uuid.txtar (about) 1 -- in.cue -- 2 import "uuid" 3 4 sha1: a: uuid.SHA1(uuid.ns.DNS, "cuelang.org") 5 6 md5: a: uuid.MD5(uuid.ns.URL, "https://cuelang.org") 7 8 valid: { 9 a: uuid.Valid 10 a: "052ef62d-7223-58b6-a551-c1deee46d401" 11 } 12 13 invalid: { 14 a: uuid.Valid 15 a: "052EF62D-7223-58B6-A551-C1DEEE46D401" 16 17 b: uuid.Valid 18 b: "052ef62d_7223_58b6_a551_c1deee46d401" 19 } 20 21 parse: a: uuid.Parse("052ef62d722358b6a551c1deee46d401") 22 23 fromInt: a: uuid.FromInt(0x052ef62d_7223_58b6_a551_c1deee46d401) 24 25 variant: a: uuid.Variant(sha1.a) 26 version: a: uuid.Version(sha1.a) 27 urn: a: uuid.URN(sha1.a) 28 toInt: a: uuid.ToInt(sha1.a) 29 30 -- out/uuid -- 31 Errors: 32 invalid.a: invalid value "052EF62D-7223-58B6-A551-C1DEEE46D401" (does not satisfy uuid.Valid): invalid UUID "052EF62D-7223-58B6-A551-C1DEEE46D401": 33 ./in.cue:14:8 34 invalid.b: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): invalid UUID "052ef62d_7223_58b6_a551_c1deee46d401": 35 ./in.cue:17:8 36 37 Result: 38 sha1: { 39 a: "052ef62d-7223-58b6-a551-c1deee46d401" 40 } 41 md5: { 42 a: "d891d69e-ae5c-39e0-9ead-164abd207f1f" 43 } 44 valid: { 45 a: "052ef62d-7223-58b6-a551-c1deee46d401" 46 } 47 invalid: { 48 a: _|_ // invalid.a: invalid value "052EF62D-7223-58B6-A551-C1DEEE46D401" (does not satisfy uuid.Valid): invalid.a: invalid UUID "052EF62D-7223-58B6-A551-C1DEEE46D401" 49 b: _|_ // invalid.b: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): invalid.b: invalid UUID "052ef62d_7223_58b6_a551_c1deee46d401" 50 } 51 parse: { 52 a: "052ef62d-7223-58b6-a551-c1deee46d401" 53 } 54 fromInt: { 55 a: "052ef62d-7223-58b6-a551-c1deee46d401" 56 } 57 variant: { 58 a: 1 59 } 60 version: { 61 a: 5 62 } 63 urn: { 64 a: "urn:uuid:052ef62d-7223-58b6-a551-c1deee46d401" 65 } 66 toInt: { 67 a: 93651793875903522077150095950593860979557386807737776869062002310283964632724204171313 68 } 69