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