Files
darkstorm-server/internal/darkstorm_backend/app.go
T
Caleb Gardner 2040631737 Added cleanup loop
Added LogTable interface
2024-05-31 06:59:30 -05:00

17 lines
444 B
Go

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() LogTable
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)
}