1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
pub const FLIGHT_SPEC: &str = "FLIGHT SPEC
The Flight may be specified in one of the following ways
FLIGHT_SPEC := NAME | ID | @path | @- | INLINE-SPEC
NAME := The local Flight Plan name
ID := The local hex-encoded ID of the Flight Plan
@path := PATH is an existing file with a Flight Plan definition in JSON format
@- := STDIN will be read for a Flight Plan definition in JSON format
INLINE-SPEC := Comma separated LIST of ATTRIBUTE
ATTRIBUTE := image=IMAGE [ | name=NAME | minimum=NUM | maximum=NUM | api-permission | architecture=ARCH ]
NUM := Positive integer (minimum default is 1 if omitted; maximum default is 'autoscale as needed')
ARCH := amd64 | arm64
NOTE that when using @- only one Flight Plan may be provided via STDIN";
pub const REGION_SPEC: &str = "REGION SPEC
The regions are based on ISO 3166 alpha-2 continent codes with a few additions to capture
regulatory differences along with some more intuitive or common aliases. The currently
supported mappings are:
XA => Asia
XC => PRC => PeoplesRepublicofChina
XE => EU => Europe
XF => Africa
XN => NAmerica => NorthAmerica
XO => Oceania
XQ => Antarctica
XS => SAmerica => SouthAmerica
XU => UK => UnitedKingdom
This list is subject to change or expand.";
pub const IMAGE_SPEC: &str = r#"IMAGE SPEC
NOTE that a default registry of `registry.cplane.cloud` is used.
Valid images can be defined using the grammar
reference := name [ ":" tag ] [ "@" digest ]
name := [domain '/'] path-component ['/' path-component]*
domain := domain-component ['.' domain-component]* [':' port-number]
domain-component := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/
port-number := /[0-9]+/
path-component := alpha-numeric [separator alpha-numeric]*
alpha-numeric := /[a-z0-9]+/
separator := /[_.]|__|[-]*/
tag := /[\w][\w.-]{0,127}/
digest := digest-algorithm ":" digest-hex
digest-algorithm := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]*
digest-algorithm-separator := /[+.-_]/
digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/
digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value
identifier := /[a-f0-9]{64}/
short-identifier := /[a-f0-9]{6,64}/
EXAMPLES
registry.cplane.cloud/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa
registry.cplane.cloud/seaplane/busybox:latest"#;