-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(operator): add Analytics module placeholder (#1612)
- Loading branch information
Showing
20 changed files
with
786 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
107 changes: 107 additions & 0 deletions
107
components/operator/api/formance.com/v1beta1/analytics_types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
Copyright 2023. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1beta1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// AnalyticsSpec defines the desired state of Analytics | ||
type AnalyticsSpec struct { | ||
ModuleProperties `json:",inline"` | ||
StackDependency `json:",inline"` | ||
} | ||
|
||
// AnalyticsStatus defines the observed state of Analytics | ||
type AnalyticsStatus struct { | ||
Status `json:",inline"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
//+kubebuilder:printcolumn:name="Stack",type=string,JSONPath=".spec.stack",description="Stack" | ||
//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready",description="Is ready" | ||
//+kubebuilder:printcolumn:name="Info",type=string,JSONPath=".status.info",description="Info" | ||
//+kubebuilder:metadata:labels=formance.com/kind=module | ||
//+kubebuilder:metadata:labels=formance.com/is-ee=true | ||
|
||
// Analytics is the Schema for the analytics API | ||
type Analytics struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec AnalyticsSpec `json:"spec,omitempty"` | ||
Status AnalyticsStatus `json:"status,omitempty"` | ||
} | ||
|
||
func (in *Analytics) SetReady(b bool) { | ||
in.Status.SetReady(b) | ||
} | ||
|
||
func (in *Analytics) IsReady() bool { | ||
//TODO implement me | ||
|
||
return in.Status.Ready | ||
} | ||
|
||
func (in *Analytics) SetError(s string) { | ||
in.Status.SetError(s) | ||
} | ||
|
||
func (in *Analytics) GetConditions() *Conditions { | ||
return &in.Status.Conditions | ||
} | ||
|
||
func (in *Analytics) GetStack() string { | ||
//TODO implement me | ||
|
||
return in.Spec.Stack | ||
} | ||
|
||
func (in *Analytics) GetVersion() string { | ||
//TODO implement me | ||
return in.Spec.Version | ||
} | ||
|
||
func (in *Analytics) IsDebug() bool { | ||
//TODO implement me | ||
return in.Spec.Debug | ||
} | ||
|
||
func (in *Analytics) IsDev() bool { | ||
//TODO implement me | ||
return in.Spec.Dev | ||
} | ||
|
||
func (in *Analytics) IsEE() bool { | ||
//TODO implement me | ||
return true | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// AnalyticsList contains a list of Analytics | ||
type AnalyticsList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []Analytics `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&Analytics{}, &AnalyticsList{}) | ||
} |
92 changes: 92 additions & 0 deletions
92
components/operator/api/formance.com/v1beta1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.