mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Application interface * Application describe * Application list * Fix --output/-o flag * Test Run() * Tests on application pkg * Unit tests on kclient relative to application * comment * Add ComponentList method to Application * Project interface * Project CLI tests * Dharmit review
30 lines
620 B
Go
30 lines
620 B
Go
package application
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
)
|
|
|
|
const (
|
|
appKind = "Application"
|
|
appList = "List"
|
|
)
|
|
|
|
// Application
|
|
type App struct {
|
|
metav1.TypeMeta `json:",inline"`
|
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
Spec AppSpec `json:"spec,omitempty"`
|
|
}
|
|
|
|
// AppSpec is list of components present in given application
|
|
type AppSpec struct {
|
|
Components []string `json:"components,omitempty"`
|
|
}
|
|
|
|
// AppList is a list of applications
|
|
type AppList struct {
|
|
metav1.TypeMeta `json:",inline"`
|
|
metav1.ListMeta `json:"metadata,omitempty"`
|
|
Items []App `json:"items"`
|
|
}
|