readme: Updates and typo fixes

This commit is contained in:
Daan Sprenkels 2019-09-01 18:06:57 +02:00
parent 73814e0f5b
commit 8a34f7e16c

View File

@ -11,6 +11,8 @@ are the exceptions:
- `github.com/gorilla/sessions` for session management.
- `go.etcd.io/bbolt` is our database driver.
- `github.com/pkg/errors` provides a [`Wrap`] function.
- `github.com/prometheus/client_golang/prometheus/...` has easy Prometheus
functionality.
[`Wrap`]: https://godoc.org/github.com/pkg/errors#Wrap
@ -29,18 +31,32 @@ That means that we have to separate every other page with some kind of
namespace. Ideas:
- `/z/` reserved for flat pages.
- `/p/` reserved for "pastes".
- `/u/` reserved for "users".
- `/f/` reserved for "files".
- `/z/static/` reserved for "static files".
## Paste types
Previous, I was planning to put pastes (not redirects) in a separate bucket
and below a url namespace. Then when one was created, we would immediately
generate a redirect link.
Turns out it's easier though to just save a unit (we call it a "paste") which
can be of different types. For example:
- Redirect
- Paste
- File
- Image
- Hypothetical other stuff:
- Dead-drop
- [...]?
## Shorten keys and collisions
First of all: A sexted is a value of 6 bits.
First of all: A sextet is a value of 6 bits.
For generating keys, we will initially generate a random value of 4 sextets,
where the first bit is set to `0`. If this collides with an existing key, we
will generate a new one made out of 5 sextexts, and set the prefix bits to
will generate a new one made out of 5 sextets, and set the prefix bits to
`0b10`. We will keep doing this until we don't have any collisions anymore.
To get proper-looking keys, we format the key to characters using the
@ -72,10 +88,10 @@ header that the client sends. We can still wrap the plain-text page in a single
forever, and store a user's data in there, without having to collect personal
data in any way.
- URL-shortening links will be retained for always, unless the submitter
revokes it, in which case it will be replaced by a `410 Gone` page*.
- The probles of pastes are not solved. This is an unsolved problem*.
revokes it, in which case it will be replaced by a `410 Gone` page[*].
- The probles of pastes are not solved. This is an unsolved problem[*].
* In any case, we going to comply with all European laws and reasonable
[*] In any case, we going to comply with all European laws and reasonable
requests for deletion.
## Privacy