bgpwtf/cccampix: draw the rest of the fucking owl
Change-Id: I49fd5906e69512e8f2d414f406edc0179522f225
diff --git a/bgpwtf/cccampix/verifier/model/schema.go b/bgpwtf/cccampix/verifier/model/schema.go
new file mode 100644
index 0000000..093ecc8
--- /dev/null
+++ b/bgpwtf/cccampix/verifier/model/schema.go
@@ -0,0 +1,65 @@
+package model
+
+import "database/sql"
+
+type sqlPeer struct {
+ ID string `db:"id"`
+ ASN string `db:"asn"`
+ Name string `db:"name"`
+ Source string `db:"source"`
+}
+
+type sqlPeerRouter struct {
+ ID string `db:"id"`
+ PeerID string `db:"peer_id"`
+ V6 sql.NullString `db:"v6"`
+ V4 sql.NullString `db:"v4"`
+ Source string `db:"source"`
+
+ // Fake, used by app logic.
+ ASN string `db:"asn"`
+}
+
+type sqlPeerCheck struct {
+ ID string `db:"id"`
+ PeerID string `db:"peer_id"`
+ CheckName string `db:"check_name"`
+ CheckTime int64 `db:"check_time"`
+ CheckStatus string `db:"check_status"`
+ CheckMessage string `db:"check_message"`
+ Delete bool `db:"delete"`
+
+ // Fake, used by app logic.
+ ASN string `db:"asn"`
+}
+
+type sqlPeerPGPKey struct {
+ ID string `db:"id"`
+ PeerID string `db:"peer_id"`
+ Fingerprint string `db:"fingerprint"`
+ TimeCreated int64 `db:"time_created"`
+
+ // Fake, used by app logic.
+ ASN string `db:"asn"`
+}
+
+type sqlSessionConfig struct {
+ ID string `db:"id"`
+ PeerID string `db:"peer_id"`
+ PeerRouterID string `db:"peer_router_id"`
+
+ BGPSecret string `db:"bgp_secret"`
+}
+
+type sqlAllowedPrefix struct {
+ ID string `db:"id"`
+ PeerID string `db:"peer_id"`
+ Timestamp int64 `db:"timestamp"`
+
+ Prefix string `db:"prefix"`
+ MaxLength int64 `db:"max_length"`
+ TA string `db:"ta"`
+
+ // Fake, used by app logic.
+ ASN string `db:"asn"`
+}