-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
121 lines (104 loc) · 2.05 KB
/
models.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Code generated by sqlc. DO NOT EDIT.
package gensql
import (
"database/sql"
"database/sql/driver"
"encoding/json"
"fmt"
"time"
"github.com/google/uuid"
)
type ChartType string
const (
ChartTypeJupyterhub ChartType = "jupyterhub"
ChartTypeAirflow ChartType = "airflow"
)
func (e *ChartType) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ChartType(s)
case string:
*e = ChartType(s)
default:
return fmt.Errorf("unsupported scan type for ChartType: %T", src)
}
return nil
}
type NullChartType struct {
ChartType ChartType
Valid bool // Valid is true if ChartType is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullChartType) Scan(value interface{}) error {
if value == nil {
ns.ChartType, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ChartType.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullChartType) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ChartType), nil
}
type ChartGlobalValue struct {
ID uuid.UUID
Created sql.NullTime
Key string
Value string
ChartType ChartType
Encrypted bool
}
type ChartTeamValue struct {
ID uuid.UUID
Created sql.NullTime
Key string
Value string
ChartType ChartType
TeamID string
}
type ComputeInstance struct {
Owner string
Name string
DiskSize int32
}
type Event struct {
ID uuid.UUID
Type string
Payload json.RawMessage
Status string
Deadline string
CreatedAt time.Time
UpdatedAt time.Time
Owner string
RetryCount int32
}
type EventLog struct {
ID uuid.UUID
EventID uuid.UUID
LogType string
Message string
CreatedAt time.Time
}
type Session struct {
Token string
AccessToken string
Email string
Name string
Created time.Time
Expires time.Time
IsAdmin bool
}
type Team struct {
ID string
Slug string
Users []string
Created sql.NullTime
}
type UserGoogleSecretManager struct {
Owner string
Name string
}