Commit Graph

295 Commits

Author SHA1 Message Date
leo
f3b6075c27
ci: set GOPATH on arch to make use of caching
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 15:07:07 +02:00
leo
48e3c49b52
ci: run tests sooner
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 15:00:42 +02:00
leo
6c47b6e354
just: run pg with user namespaces [skip ci] 2023-05-04 00:12:39 +02:00
leo
ecd3330ea8
fix(just): mount actual data folder [skip ci] 2023-05-04 00:12:14 +02:00
leo
279514f350
just: add prod target [skip ci] 2023-05-03 23:58:40 +02:00
leo
6c061fb94f
just: add db{start,stop} targets [skip ci] 2023-05-03 23:58:23 +02:00
leo
0a5d4e7d30
go: use enttest in tests
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 23:21:47 +02:00
leo
0ac668d001
mod/usr: fix typo [skip ci]
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 22:43:51 +02:00
leo
4f2302143d
mod/user: rewrite some if statements as switches
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 22:42:08 +02:00
leo
0125bff8bd
embed: add specificity
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
2023-05-03 06:38:26 +02:00
leo
a2c17693c6
go: save,verify a bcrypt hash of the passwd
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:30:12 +02:00
leo
5a3ce50bb2
mod/user: don't print out the raw usr object
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:09:44 +02:00
leo
faefe3b577
mod/user: add check for when usr is not found
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:08:28 +02:00
leo
ce70bbe196
index.tmpl: credit gopher design
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:07:32 +02:00
leo
78774ac3ad
errorPage.tmpl: increase msg font size
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:06:32 +02:00
leo
24b62dad98
air: don't rebuild on tmpl changes [skip ci] 2023-05-03 06:05:07 +02:00
leo
864e2ec815
handlers.go: change msg log level
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 06:03:38 +02:00
leo
672132a109
go: die even more reliably on error
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 05:58:09 +02:00
leo
1359750c97
go: handle long running shutdowns better
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:58:47 +02:00
leo
6937eb7a80
go: explicitly close chan
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:57:04 +02:00
leo
ed14e45969
go: add more tests (+return instead of exit)
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:26:42 +02:00
leo
1ba95c3d37
fix(run.go): use a non-blocking channel receive
All checks were successful
continuous-integration/drone/push Build is passing
adding the started channel and receiving in a blocking fashion meant the
program flow never got to blocking on the quit channel after setting up
signal intercepts. this commit turns the blocking receive on `started`
to a non-blocking one.
2023-05-03 03:03:06 +02:00
leo
d5ed25f1f1
go: add a TODO [skip ci] 2023-05-03 02:38:35 +02:00
leo
d83a4bbc4c
rename app/startup.go to app/echoSettings.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 02:37:04 +02:00
leo
258d9a5352
fix: set develMode again
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 02:35:35 +02:00
leo
066d5da42f
chore: rm empty app/config.go [skip ci] 2023-05-03 02:26:24 +02:00
leo
c4d0cb209b
go: add settings struct
All checks were successful
continuous-integration/drone/push Build is passing
* let the settings struct be the single source of truth
* rm app fields that are covered by settings
* pass around a pointer to settings instead of config
* consolidate config+flags into settings on start-up
* update tests
* rm empty settings.go file

fixes #4
2023-05-03 02:18:29 +02:00
leo
9ab2d0ae0b
go: handle host+port combinations,shutdown better
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
* add log messages telling the user what went wrong if the app fails to
  start
* improve existing log messages
* cleanup: close channels when exiting
* cleanup: stop listening for signals when exiting
2023-05-02 00:04:04 +02:00
leo
a053103000
config: use the in-house logger
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 23:09:36 +02:00
leo
593454d616
go: add user email handling + improve sessions
All checks were successful
continuous-integration/drone/push Build is passing
* add Email field to User entity (+codegen)
* switch to Echo contrib sessions backed by Gorilla sessions
* use SessionCookieSecret value from the config
* stage mod,sum changes
* add clearer signup/signin redirect logic
* render error pages on 500/404s and only fall back to returning raw
  errors when the error is some unexpected kind
* add username/email "exists" funcs+tests - handle "not found" and "not
  unique" errors, return errors otherwise
2023-05-01 22:48:11 +02:00
leo
61ec8bfea1
app: add routes_test.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 15:48:53 +02:00
leo
3439ec7c2a
app: set devel mode earlier
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 15:47:39 +02:00
leo
1d421465f5
go: have a dynamic {asset,tmpl}Path
All checks were successful
continuous-integration/drone/push Build is passing
* handle errors more specifically when loading assets/tmpls
2023-04-28 23:16:58 +02:00
leo
ba869f9a65
app: handle global debug mode better
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 23:05:32 +02:00
leo
9b22ec35ee
log: allow setting log level dynamically
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 23:01:35 +02:00
leo
6bd3b2845b
log: add Debugf method
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 22:58:50 +02:00
leo
269c63c661
log: return logger on Init
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 22:54:09 +02:00
leo
3cb2da457e
routes: change 303 -> 301 for /static -> /assets
All checks were successful
continuous-integration/drone/push Build is passing
* should enable users' browsers to make use of the status code and cache
  the redirect (in case anybody accesses the older version of the app
  and hits /static)
2023-04-28 19:07:43 +02:00
leo
82bc22e192
head.tmpl: use canonical /assets to avoid redirect
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 19:07:02 +02:00
leo
946360e489
signin.tmpl: reorder attrs [skip ci] 2023-04-28 00:47:20 +02:00
leo
bde8cfc88e
fix: properly redirect /static/* to /assets/*
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-27 17:43:34 +02:00
leo
d99d86a2be
go(app): use embedded variable value
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 23:11:58 +02:00
leo
8c7c84f6f9
go: rm deadcode from app/routes.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 23:05:48 +02:00
leo
fe9fd0fa5a
ci: rm vet,fmt from os pipelines
All checks were successful
continuous-integration/drone/push Build is passing
...since it runs in the golangci-lint pipeline.

also, use `assets` instead of `static` for tailwind as per last commit.
2023-04-26 23:01:32 +02:00
leo
1655d6b792
go: /static -> /assets in varnames,routes,dirs
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 22:44:18 +02:00
leo
70ec7f5e53
config: add fields
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-23 19:23:00 +02:00
leo
e58c15f1c9
ent: add HIBP model
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-21 13:57:32 +02:00
leo
555bc65502
handlers: update error handling
All checks were successful
continuous-integration/drone/push Build is passing
* have a common error page tmpl
2023-04-21 12:33:14 +02:00
leo
b1c926befd
justfile: foolproof+document targets [skip ci] 2023-04-20 13:30:10 +02:00
leo
5b63997aaf
app: clarify log msg [skip ci] 2023-04-20 13:23:48 +02:00