diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-02 16:23:43 -0800 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-02 16:23:57 -0800 |
commit | b19321bab542de35564127dc77781af44252bcb9 (patch) | |
tree | 37d12f7867124e8440ee46ae9f903b242e8d62af /template/api/types | |
parent | 321cd40fba0956e3aa697f9e7c7006159a032f58 (diff) | |
download | oldinfra-b19321bab542de35564127dc77781af44252bcb9.tar.gz oldinfra-b19321bab542de35564127dc77781af44252bcb9.zip |
create a base template :) and use it for a new service
Diffstat (limited to 'template/api/types')
-rw-r--r-- | template/api/types/types.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/template/api/types/types.go b/template/api/types/types.go new file mode 100644 index 0000000..d2a91a3 --- /dev/null +++ b/template/api/types/types.go @@ -0,0 +1,26 @@ +package types + +import ( + "database/sql" + "net/http" + "time" + + "{{ service_repo }}/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 |