-
Notifications
You must be signed in to change notification settings - Fork 3
/
manifest.go
39 lines (31 loc) · 848 Bytes
/
manifest.go
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
package config
type Manifest struct {
Revision string `json:"revision"`
Usage string `json:"usage"`
Type ManifestType `json:"type"`
// Namespace only fields.
Plugins Plugins `json:"plugins,omitempty"`
// Command only fields.
Platforms []Platform `json:"platforms,omitempty"`
Args []Arg `json:"args,omitempty"`
Flags []Flag `json:"flags,omitempty"`
}
type ManifestType string
var (
CommandManifest ManifestType = "command"
NamespaceManifest ManifestType = "namespace"
)
type Platform struct {
OS string `json:"os"`
Architecture string `json:"architecture"`
Digest string `json:"digest"`
}
type Arg struct {
Type string `json:"type"`
Usage string `json:"usage"`
}
type Flag struct {
Name string `json:"name"`
Type string `json:"type"`
Usage string `json:"usage"`
}