(Probably) finished with docs and interfaces.

Starting to build out the actual logic.
This commit is contained in:
Caleb Gardner
2024-05-21 05:50:07 -05:00
parent 4244b6985a
commit e4f8b31e29
9 changed files with 235 additions and 96 deletions
+10
View File
@@ -1,6 +1,16 @@
package darkstorm
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
LogTable() Table[Log]
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)
}