aa5dd55331
Merge pull request 'fix(deps): update module golang.org/x/sys to v0.5.0' ( #31 ) from renovate/golang.org-x-sys-0.x into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/31
2023-02-09 16:30:20 +00:00
e5aa88fa39
fix(deps): update module golang.org/x/sys to v0.5.0
2023-02-08 22:31:31 +00:00
24b6783fc9
Merge pull request 'feat: save zonefile to permanent directory' ( #28 ) from nds into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/28
2023-02-06 14:57:27 +00:00
12b219bf45
Small nitpicks
...
gitignore: add default zones directory
upload: fix typo in swagger docs
config: simplify default save location
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-06 14:39:08 +00:00
b8d4af58c8
adding sys.go and using /x/sys/unix for killing pomme, because syscall package is deprecated. Added small wrapper for killPomme().
2023-02-06 14:39:08 +00:00
25229f9c81
removed unnecessary byte slice conversions
2023-02-06 14:39:08 +00:00
cf1071b389
remove rawFileName from Zone db schema as no longer necessary, removed not needed code, and documentation. Made tests work with new zone file route consolidation.
2023-02-06 14:39:08 +00:00
bca521eb4e
wow woah, we don't need to save locally actually
2023-02-06 14:39:08 +00:00
f7f0a49512
update swagger docs
2023-02-06 14:39:08 +00:00
ae3e7a1ae6
capture error on defer, doc string, lint
2023-02-06 14:39:08 +00:00
92100e27a0
add fs.go to internal, make makeLocal do the majority of lifting for tmp and perm files, made save() call makeLocal
2023-02-06 14:39:08 +00:00
2426a8b393
turn into one route
2023-02-06 14:39:08 +00:00
a83ae1bff3
update sample config
2023-02-06 14:39:08 +00:00
a572f6841f
remove tmp file after saving to permanent directory
2023-02-06 14:39:08 +00:00
08eab3e6cb
lint
2023-02-06 14:39:08 +00:00
653670e6fa
return error if file being saved to /tmp is empty
2023-02-06 14:39:08 +00:00
ae488eb7d2
add ndr interface for handling dns reqs, add zonedir to config, add /save route to save zfs to zonedir, fix make local, and other small changes
2023-02-06 14:39:08 +00:00
edaeecc54b
fix(vscode): set CWD properly when debugging
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-06 15:38:49 +01:00
7ba7592d54
Merge pull request 'feat: login page' ( #25 ) from login-page into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/25
2023-02-04 00:00:28 +00:00
1a97dc9172
disable server-side rendering
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
5328d3f4ed
fix build + fix lint
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
49c46f9f72
redirect + error print + logout
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
20cf03818d
not needed either
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
445560d376
get rid of not needed environment variable
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
eae82fb235
scaffolding for a login page
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-03 23:44:51 +00:00
e2ff380184
Merge pull request 'fix(deps): update module gorm.io/gorm to v1.24.5' ( #26 ) from renovate/gorm.io-gorm-1.x into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/26
2023-02-03 20:43:48 +00:00
ecf6514b74
fix(deps): update module gorm.io/gorm to v1.24.5
2023-02-03 14:30:29 +00:00
419aa53d56
Merge pull request 'feat: Improved API error handling' ( #27 ) from API-error-handling into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/27
2023-02-03 13:59:53 +00:00
21db5c4166
add server death if cannot acccess DB with clean shutdown (drains connections), and other error handling, linting.
2023-02-02 18:02:22 -05:00
473597682c
remove unnecessary code, added switch fallthroughs for cleanup. remove status code from response (is in header)
2023-02-01 19:50:41 -05:00
295360fd05
swagger updates, moved structs and types into types.go, and made helpers.go for custom handlers
2023-02-01 19:41:38 -05:00
9d87ae4728
internal.response doesn't includes http status, api tests use header status code now, new generic APIError function
2023-02-01 15:59:34 -05:00
7e149d5996
oops
2023-02-01 00:43:23 -05:00
277de26561
updated swagger docs to look more like Gitea, moved all structs to types.go, removed username from response struct, removed other unnecessary code
2023-02-01 00:36:17 -05:00
3e839fdf5f
fix(api): 401 on bad auth
...
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-01-31 19:09:17 +01:00
33a2ce5bea
Merge pull request 'feat: adding api tests' ( #24 ) from api-tests into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/24
2023-01-31 14:21:41 +00:00
b4af648156
make test JWT expire in a minute
2023-01-30 23:24:44 -05:00
78671549c3
I <3 TESTS
2023-01-30 23:23:35 -05:00
5e8ba819bc
added read DB path from config, add DB paths to sample config, added render library for JSON responses, removed plaintext password from User struct, made error handler funcs return json and their calls to include http.Request, and made API tests use httptest server
2023-01-30 19:49:52 -05:00
849f5d28fa
small oops
2023-01-28 23:41:53 -05:00
9412d8ec28
added user creation, login, and logout test. Linted. Go mod. Adding http.StatusOK const in a few places I noticed it was not in.
2023-01-28 23:39:26 -05:00
7e72056a6e
Merge pull request 'fix(deps): update module github.com/swaggo/swag to v1.8.10' ( #23 ) from renovate/github.com-swaggo-swag-1.x into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/23
2023-01-27 16:54:34 +00:00
592807e18c
fix(deps): update module github.com/swaggo/swag to v1.8.10
2023-01-27 13:30:31 +00:00
6cd9416375
Merge pull request 'feat: add rate limiting to the API' ( #21 ) from rate-limiting into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/21
2023-01-27 13:24:40 +00:00
14601bd93c
chore(deps): update dependency vitest to ^0.28.0
2023-01-23 09:30:33 +00:00
7e6594f3c7
move defer file.Close() to before validateContentType because that could cause problems
2023-01-21 11:21:41 -05:00
320f757917
add confirmation of zonefile upload and add mimetype validation to only allow users to upload text/plain
2023-01-21 11:19:29 -05:00
27fd45a1f9
documented rate limiting, added check if file already exists and error out if it does, and small swagger edits
2023-01-20 20:33:56 -05:00
6c709b97a1
add rate limiting
2023-01-20 18:29:33 -05:00
653f8c67e7
Merge pull request 'feat: add swagger documentation' ( #20 ) from swagger into master
...
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/20
2023-01-20 23:12:33 +00:00