Home

cuesonnet @ad92adf766ccabb211e2344123f01dcf37636f22 - refs - log -
-
https://git.jolheiser.com/cuesonnet.git
CUE + Jsonnet
cuesonnet / testdata / stdlib / schema.cue
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import (
	"time"
	"strings"
	"list"
	"math"
)

#Schema: {
	createdAt: time.Format(time.RFC3339)
	birthday:  time.Format("01/02/2006")
	username:  strings.MinRunes(3) & strings.MaxRunes(20) & =~"^[a-z]"
	tags:      list.MinItems(1) & list.MaxItems(10) & [...string]
	initials:  strings.MaxRunes(3) & =~"^[A-Z]+"
	angle:     float & >=0.0 & <=(math.Pi * 2)
}
#Schema