Move darkstorm_backend to just backend

Added MongoDB instances of DB tables
Updated some DB interfaces
Added logging to count cleanup
This commit is contained in:
Caleb Gardner
2024-06-12 03:31:09 -05:00
parent e3af23873f
commit 28654e237e
15 changed files with 246 additions and 22 deletions
+16
View File
@@ -0,0 +1,16 @@
package backend
import "net/http"
// An application interface. Both LogTable and CrashTable are optional, if they return nil then requests will be forbidden.
type App interface {
AppID() string
CountTable() CountTable
CrashTable() CrashTable
}
type ExtendedApp interface {
// Extension is called for any calls to /{appID}/
// Alternatively, use Backend.HandleFunc for more customizability
Extension(http.ResponseWriter, *http.Request)
}