forked from APSL/k8s-database-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
42 lines (34 loc) · 969 Bytes
/
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
/* vim:set sw=8 ts=8 noet:
*
* Copyright (c) 2017 Torchbox Ltd.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely. This software is provided 'as-is', without any express or implied
* warranty.
*/
package main
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type DatabaseSpec struct {
Type string `json:"type"`
Secret string `json:"secretName"`
Class string `json:"class"`
}
type DatabaseStatus struct {
Phase string `json:"phase"`
Error string `json:"error,omitempty"`
Server string `json:"server,omitempty"`
}
type Database struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec DatabaseSpec `json:"spec"`
Status DatabaseStatus `json:"status,omitempty"`
}
type DatabaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Database `json:"items"`
}