Commit Graph

20 Commits

Author SHA1 Message Date
0643176ed1
Run go fmt 2023-04-30 21:04:55 +02:00
788e75c4c1
Add users system, required for uploading new pastes 2023-04-30 12:06:09 +02:00
Daan Sprenkels
9ff11cc14c Remove boltdb leftovers 2021-05-13 10:44:32 +02:00
Daan Sprenkels
3f09c1517d migrate: Fix 'no such table: migrations' err
Apparently, if you CREATE TABLE inside of a transaction, and then
(in the same transaction) do a SELECT on the same table before
committing, the table will not exist yet.

Now we do the migration in two steps: first initialize the schema;
then migrate the data.
2020-12-31 14:34:33 +01:00
Daan Sprenkels
f527f2fb38 Automigrate when opening db 2020-12-17 15:14:45 +01:00
Daan Sprenkels
0048004252 Use sql database instead of bolt 2020-10-25 17:33:51 +01:00
Daan Sprenkels
f36fa30eff Rename current db to boltdb 2020-10-23 16:14:57 +02:00
Daan Sprenkels
ffeb9a3362 Rename --host => --root-url 2019-12-17 15:43:32 +05:30
Daan Sprenkels
0bffde1dc1 Implement --host flag to override {{.Host}}
Fixes #15
2019-12-15 16:48:50 +05:30
Daan Sprenkels
62e82d831e db: Migrate FileUpload.ContentTypes to auto-detect 2019-12-10 11:59:02 +01:00
Daan Sprenkels
da5806a6f7 metrict: Commit change that was forgotten in cf95650 2019-12-08 22:02:30 +01:00
Daan Sprenkels
0cfad96b68 Refactor database login into a separate module 2019-12-06 18:03:56 +01:00
Daan Sprenkels
66eb0bf97a Add support for file uploads 2019-11-10 19:03:57 +01:00
b738116f8a Flags for listen and metrics address; fix in newRedirectPasteSuccess.txt.tmpl
Fixes #9
2019-11-09 21:43:58 +01:00
1b3ba9443a Move several packages to root package 2019-11-09 15:50:12 +01:00
Daan Sprenkels
ab0cf15c7b Move flag handling into cmd/ 2019-11-08 22:17:05 +01:00
Daan Sprenkels
a4ad82d6dd Refactor main into subdirs 2019-09-19 21:35:19 +02:00
Daan Sprenkels
b7a4b1fee8 Move packages out of dirs
Fixes #2
2019-09-15 18:21:02 +02:00
Daan Sprenkels
544c093c35 Use a more standardized project layout
In #2, mrngm made the point that we should move to a more
standardized project structure. This commit does exactly that.
The new project structure is based on the repository listed at
<https://github.com/golang-standards/project-layout>.

Fixes #2.
2019-09-10 17:52:45 +02:00
Daan Sprenkels
e021e463ab Move rushlink command into cmd/ dir 2019-09-08 10:47:17 +02:00