tangled
alpha
login
or
join now
moth11.net
/
rvcx
3
fork
atom
backend for xcvr appview
3
fork
atom
overview
issues
4
pulls
pipelines
initial report stuff
moth11.net
1 month ago
8b981d08
52a01184
+33
3 changed files
expand all
collapse all
unified
split
migrations
009_initreports.down.sql
009_initreports.up.sql
server
internal
types
report.go
+1
migrations/009_initreports.down.sql
···
0
···
1
+
DROP TABLE IF EXISTS reports;
+8
migrations/009_initreports.up.sql
···
0
0
0
0
0
0
0
0
···
1
+
CREATE TABLE reports (
2
+
id SERIAL primary key,
3
+
uri TEXT NOT NULL,
4
+
reason TEXT NOT NULL,
5
+
did TEXT,
6
+
addr TEXT,
7
+
posted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
8
+
);
+24
server/internal/types/report.go
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
package types
2
+
3
+
import (
4
+
"time"
5
+
)
6
+
7
+
type ReportRequest struct {
8
+
URI string `json:"uri"`
9
+
Reason string `json:"reason"`
10
+
}
11
+
12
+
type AnonReport struct {
13
+
Addr string `json:"addr"`
14
+
URI string `json:"uri"`
15
+
Reason string `json:"reason"`
16
+
ReportedAt time.Time `json:"reportedAt"`
17
+
}
18
+
19
+
type AuthReport struct {
20
+
DID string `json:"did"`
21
+
URI string `json:"uri"`
22
+
Reason string `json:"reason"`
23
+
ReportedAt time.Time `json:"reportedAt"`
24
+
}