generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 95
/
application_configuration.go
47 lines (39 loc) · 1.35 KB
/
application_configuration.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
40
41
42
43
44
45
46
47
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// Configuration is the structure for OAM Application Configuration
type Configuration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ConfigurationSpec `json:"spec,omitempty"`
}
// ConfigurationSpec is the structure for the OAM Application
// Configuration Spec
type ConfigurationSpec struct {
Components []ConfigurationSpecComponent
}
// ConfigurationSpecComponent is the struct for OAM Application
// Configuration's spec's components
type ConfigurationSpecComponent struct {
ComponentName string
Traits []ConfigurationSpecComponentTrait
Scopes []ConfigurationSpecComponentScope
}
// ConfigurationSpecComponentTrait is the struct
type ConfigurationSpecComponentTrait struct {
Name string
Properties map[string]interface{}
}
// ConfigurationSpecComponentScope struct defines the structure
// for scope of OAM application configuration's spec's component's scope
type ConfigurationSpecComponentScope struct {
ScopeRef ConfigurationSpecComponentScopeRef
}
// ConfigurationSpecComponentScopeRef struct defines the structure for
// scope of OAM application configuration's spec's component's scope's
// scopeRef
type ConfigurationSpecComponentScopeRef struct {
metav1.TypeMeta `json:",inline"`
Name string
}