summaryrefslogtreecommitdiff
path: root/api/types/types.go
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-04-21 18:46:40 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-04-21 18:46:40 -0700
commitd14605d1388aaa7cc9ef1c230eae5ba14c9cef44 (patch)
tree59fcda0fae7899ca577eed1f72d89bff17d5ad5d /api/types/types.go
downloadbackup-notify-d14605d1388aaa7cc9ef1c230eae5ba14c9cef44.tar.gz
backup-notify-d14605d1388aaa7cc9ef1c230eae5ba14c9cef44.zip
initial commit
Diffstat (limited to 'api/types/types.go')
-rw-r--r--api/types/types.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/api/types/types.go b/api/types/types.go
new file mode 100644
index 0000000..1898867
--- /dev/null
+++ b/api/types/types.go
@@ -0,0 +1,26 @@
+package types
+
+import (
+ "database/sql"
+ "net/http"
+ "time"
+
+ "git.simponic.xyz/simponic/backup-notify/args"
+)
+
+type RequestContext struct {
+ DBConn *sql.DB
+ Args *args.Arguments
+
+ Id string
+ Start time.Time
+
+ TemplateData *map[string]interface{}
+}
+
+type BannerMessages struct {
+ Messages []string
+}
+
+type Continuation func(*RequestContext, *http.Request, http.ResponseWriter) ContinuationChain
+type ContinuationChain func(Continuation, Continuation) ContinuationChain