generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
types.go
63 lines (49 loc) · 1.82 KB
/
types.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
Copyright 2021 Upbound Inc.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
// A StoreConfigSpec defines the desired state of a ProviderConfig.
type StoreConfigSpec struct {
xpv1.SecretStoreConfig `json:",inline"`
}
// A StoreConfigStatus represents the status of a StoreConfig.
type StoreConfigStatus struct {
xpv1.ConditionedStatus `json:",inline"`
}
// +kubebuilder:object:root=true
// A StoreConfig configures how GCP controller should store connection details.
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="TYPE",type="string",JSONPath=".spec.type"
// +kubebuilder:printcolumn:name="DEFAULT-SCOPE",type="string",JSONPath=".spec.defaultScope"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,store,gcp}
// +kubebuilder:subresource:status
type StoreConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec StoreConfigSpec `json:"spec"`
Status StoreConfigStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// StoreConfigList contains a list of StoreConfig
type StoreConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []StoreConfig `json:"items"`
}
// Note(turkenh): To be generated with AngryJet
// GetStoreConfig returns SecretStoreConfig
func (in *StoreConfig) GetStoreConfig() xpv1.SecretStoreConfig {
return in.Spec.SecretStoreConfig
}
// GetCondition of this StoreConfig.
func (in *StoreConfig) GetCondition(ct xpv1.ConditionType) xpv1.Condition {
return in.Status.GetCondition(ct)
}
// SetConditions of this StoreConfig.
func (in *StoreConfig) SetConditions(c ...xpv1.Condition) {
in.Status.SetConditions(c...)
}