summaryrefslogtreecommitdiff
path: root/api/types
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2024-04-03 17:53:50 -0600
committerElizabeth Hunt <elizabeth@simponic.xyz>2024-04-03 17:53:50 -0600
commitf38e8719c2a8537fe9b64ed8ceca45858a58e498 (patch)
tree5cf2c7c7f6396f75bdb841db00638e4eef8e81e8 /api/types
parente398cf05402c010d594cea4e2dea307ca1a36dbe (diff)
downloadhatecomputers.club-f38e8719c2a8537fe9b64ed8ceca45858a58e498.tar.gz
hatecomputers.club-f38e8719c2a8537fe9b64ed8ceca45858a58e498.zip
make it compile
Diffstat (limited to 'api/types')
-rw-r--r--api/types/types.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/api/types/types.go b/api/types/types.go
new file mode 100644
index 0000000..bbc25ea
--- /dev/null
+++ b/api/types/types.go
@@ -0,0 +1,28 @@
+package types
+
+import (
+ "database/sql"
+ "net/http"
+ "time"
+
+ "git.hatecomputers.club/hatecomputers/hatecomputers.club/args"
+ "git.hatecomputers.club/hatecomputers/hatecomputers.club/database"
+)
+
+type RequestContext struct {
+ DBConn *sql.DB
+ Args *args.Arguments
+
+ Id string
+ Start time.Time
+
+ TemplateData *map[string]interface{}
+ User *database.User
+}
+
+type FormError struct {
+ Errors []string
+}
+
+type Continuation func(*RequestContext, *http.Request, http.ResponseWriter) ContinuationChain
+type ContinuationChain func(Continuation, Continuation) ContinuationChain