-
Notifications
You must be signed in to change notification settings - Fork 111
/
types.go
48 lines (42 loc) · 1.37 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
package pgdb
import (
"encoding/json"
"time"
)
type tag struct {
ID string `db:"id"`
Key string `db:"key"`
Value string `db:"value"`
}
// node used for DB operations(insert, delete)
type node struct {
ID string `db:"id"`
Name string `db:"name"`
Platform string `db:"platform"`
PlatformVersion string `db:"platform_version"`
Manager string `db:"manager"`
TargetConfig json.RawMessage `db:"target_config"`
Tags json.RawMessage `db:"-"`
Secrets []string `db:"-"`
}
// NodeTag used only to (de)serialize database access
type NodeTag struct {
NodeID string `db:"node_id"`
TagID string `db:"tag_id"`
}
// NodeSecret used only to (de)serialize database access
type NodeSecret struct {
NodeID string `db:"node_id"`
SecretID string `db:"secret_id"`
}
type nodeManager struct {
ID string `db:"id"`
Name string `db:"name"`
Type string `db:"type"`
Credential string `db:"credentials"`
InstanceCredentials json.RawMessage `db:"instance_credentials"`
Status string `db:"status_type"`
StatusMessage string `db:"status_message"`
AccountID string `db:"account_id"`
DateAdded time.Time `db:"date_added"`
}