...
1 package api
2
3 import "github.com/devfile/library/v2/pkg/devfile/parser/data"
4
5
6 type DevfileData struct {
7 Devfile data.DevfileData `json:"devfile"`
8 Commands []DevfileCommand `json:"commands,omitempty"`
9 SupportedOdoFeatures *SupportedOdoFeatures `json:"supportedOdoFeatures,omitempty"`
10 }
11
12
13 type SupportedOdoFeatures struct {
14 Dev bool `json:"dev"`
15 Deploy bool `json:"deploy"`
16 Debug bool `json:"debug"`
17 }
18
19 type DevfileCommand struct {
20 Name string `json:"name,omitempty"`
21 Type DevfileCommandType `json:"type,omitempty"`
22 Group DevfileCommandGroup `json:"group,omitempty"`
23 IsDefault *bool `json:"isDefault,omitempty"`
24 CommandLine string `json:"commandLine,omitempty"`
25 Component string `json:"component,omitempty"`
26 ComponentType DevfileComponentType `json:"componentType,omitempty"`
27 ImageName string `json:"imageName,omitempty"`
28 }
29
30 type DevfileCommandType string
31
32 const (
33 ExecCommandType DevfileCommandType = "exec"
34 ApplyCommandType DevfileCommandType = "apply"
35 CompositeCommandType DevfileCommandType = "composite"
36 )
37
38 type DevfileCommandGroup string
39
40 const (
41 BuildCommandGroup DevfileCommandGroup = "build"
42 RunCommandGroup DevfileCommandGroup = "run"
43 TestCommandGroup DevfileCommandGroup = "test"
44 DebugCommandGroup DevfileCommandGroup = "debug"
45 DeployCommandGroup DevfileCommandGroup = "deploy"
46 )
47
48 type DevfileComponentType string
49
50 const (
51 ImageComponentType DevfileComponentType = "image"
52 ContainerComponentType DevfileComponentType = "container"
53 KubernetesComponentType DevfileComponentType = "kubernetes"
54 OpenshiftComponentType DevfileComponentType = "openshift"
55 )
56
View as plain text