-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
41 lines (35 loc) · 923 Bytes
/
const.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
package main
const (
jwtKeyUID = "uid"
traefikFrontendName = "modoki"
traefikBackendName = "modoki_backend"
frontendFormat = "modokif_%d"
backendFormat = "modokib_%d"
serverName = "main"
dockerLabelModokiID = "com.cs3238.modoki.id"
dockerLabelModokiUID = "com.cs3238.modoki.uid"
dockerLabelModokiName = "com.cs3238.modoki.name"
// user.go
defaultShellKVFormat = "modoki/users/%d/defaultShell"
)
const containerSchema = `
CREATE TABLE IF NOT EXISTS containers (
id INT NOT NULL AUTO_INCREMENT,
cid VARCHAR(128) UNIQUE,
name VARCHAR(64) NOT NULL UNIQUE,
uid INT NOT NULL,
status VARCHAR(32),
message TEXT,
defaultShell TEXT,
PRIMARY KEY (id),
INDEX(cid, name, uid)
);`
const authorizedKeysSchema = `
CREATE TABLE IF NOT EXISTS authorizedKeys (
id INT NOT NULL AUTO_INCREMENT,
uid INT NOT NULL,
label VARCHAR(32),
` + "`key`" + ` TEXT,
PRIMARY KEY(id),
INDEX(uid, label)
);`