Commit Graph

145 Commits

Author SHA1 Message Date
801ac8adbb Remove file storage possibility for now (awaits #12) 2019-11-09 21:46:40 +01:00
b738116f8a Flags for listen and metrics address; fix in newRedirectPasteSuccess.txt.tmpl
Fixes #9
2019-11-09 21:43:58 +01:00
Daan Sprenkels
e26e37c97d Merge branch 'structure_rework' of dsprenkels/rushlink into master 2019-11-09 17:44:53 +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
853945a138 Merge branch 'go-generate' of minnozz/rushlink into master
Thanks!
2019-11-08 11:45:48 +01:00
3e5eca40e3 Don't install/update go-bindata from //go:generate
Instead, add build instructions to the README.
2019-11-08 10:40:53 +01:00
2d2df99f75 Run go mod tidy 2019-11-08 10:40:31 +01:00
Daan Sprenkels
e193183f86 Allow internal server error using panic() 2019-10-15 23:19:45 +02:00
Daan Sprenkels
0ecdaafe2f refactor: Put paste model in separate file 2019-09-22 14:03:54 +02:00
Daan Sprenkels
f36ed4a4c7 Only provide deleteToken if requested by user 2019-09-22 13:40:33 +02:00
Daan Sprenkels
f45c132b41 Make deleteTokens strings 2019-09-21 21:03:31 +02:00
Daan Sprenkels
1c926a4864 Implement deleting of pastes 2019-09-21 13:18:15 +02:00
Daan Sprenkels
173ae7665b refactor: Make view logic private 2019-09-19 21:42:19 +02:00
Daan Sprenkels
a4ad82d6dd Refactor main into subdirs 2019-09-19 21:35:19 +02:00
Daan Sprenkels
60fd92c956 Put existing pages in templates 2019-09-15 22:54:07 +02:00
Daan Sprenkels
372d7c0487 Extract error rendering 2019-09-15 22:00:59 +02:00
Daan Sprenkels
ddd674e88a Create a rendering stub 2019-09-15 19:51:54 +02:00
Daan Sprenkels
b7a4b1fee8 Move packages out of dirs
Fixes #2
2019-09-15 18:21:02 +02:00
Daan Sprenkels
66bbac8a8a Use base64.RawURLEncoding as base64 encoder
Fixes #1
2019-09-11 00:12:31 +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
471a9c69db Run go mod tidy 2019-09-08 10:49:05 +02:00
Daan Sprenkels
e021e463ab Move rushlink command into cmd/ dir 2019-09-08 10:47:17 +02:00
Daan Sprenkels
8803281285 Put index in template 2019-09-06 00:17:50 +02:00
Daan Sprenkels
675245722f Revert "Format errors with HTML"
This reverts commit 80092dea5b.

After enabling both HTML and plain-text templating, I found that
this introduces a lot more complexity in the code than was desirable
for a project in this stage. The result looked fine, wrapping plain
text in <pre> tags. However, it was neccessary to keep duplicate
template files, for HTML and text. This was cumbersome, added a lot
of bloat, etc.

This feature is postponed to when there is more product.
2019-09-06 00:15:35 +02:00
Daan Sprenkels
80092dea5b Format errors with HTML 2019-09-05 23:07:54 +02:00
Daan Sprenkels
8a34f7e16c readme: Updates and typo fixes 2019-09-01 18:06:57 +02:00
Daan Sprenkels
73814e0f5b Add reserved keys 2019-09-01 12:04:43 +02:00
Daan Sprenkels
0d7f7c7808 Add meta viewer and owner tokens 2019-09-01 01:41:01 +02:00
Daan Sprenkels
5a7394ffd3 Rename main bucket to "pastes" and add /nr 2019-08-31 00:02:01 +02:00
Daan Sprenkels
498c84541b Add a small prometheus exporter 2019-08-29 23:41:00 +02:00
Daan Sprenkels
def0e6ed2b readme: Remove todos 2019-08-29 00:52:14 +02:00
Daan Sprenkels
3c4d0ca60e Implement retrieval of redirects 2019-08-29 00:51:40 +02:00
Daan Sprenkels
8322cbd0cf readme: Add more todos 2019-08-25 21:47:57 +02:00
Daan Sprenkels
d639b39afc readme: Add some todos 2019-08-25 21:33:32 +02:00
Daan Sprenkels
7926df7410 readme: Update description of key generation
In a recent commit, I updated the key generation to Lucus' solution, in which
we don't have to do any format-preserving encryption, but where the
probability of collisions is amortized away (basically by doing exponential
backoff) by adding a character every time we get a collision.
2019-08-25 21:30:10 +02:00
Daan Sprenkels
061bb23625 Initial commit 2019-08-25 21:33:56 +02:00
Daan Sprenkels
a9771a889b Add .gitignore file 2019-08-25 21:32:26 +02:00
Daan Sprenkels
a6edcd222e Add marshalling functions for gob
This removes a lot of the boilerplate code that comes with
(un)marshalling to gob encoding in Go.
2019-08-25 17:16:12 +02:00
Daan Sprenkels
983fa8d389 readme: Update errors dep to pkg/errors 2019-08-25 12:41:21 +02:00
Daan Sprenkels
827dc1d403 readme: Format regexp with slashes 2019-08-25 11:47:14 +02:00
Daan Sprenkels
b7118545c1 readme: Format number as not-commit 2019-08-25 11:46:30 +02:00
Daan Sprenkels
1c1f452919 Put some notes in a README.md file 2019-08-25 11:54:33 +02:00
Daan Sprenkels
881ae857cf Add go.mod file 2019-08-24 23:28:56 +02:00
Daan Sprenkels
e722a10443 Initial commit 2019-08-24 23:14:16 +02:00