Commit graph

106 commits

Author SHA1 Message Date
fef
ea7af860b2
util: move Structured Values parser to http module 2023-01-26 18:33:08 +01:00
fef
88b7268dcc
util: support parsing non-RFC8941 headers 2023-01-26 17:47:31 +01:00
fef
bda3a9027d
ap: refactor CachedLoader 2023-01-25 21:54:01 +01:00
fef
78fbbdfedd
util: add RFC 8941 parser 2023-01-25 18:40:39 +01:00
fef
a583875cd7
util: add slice cursor for parsers 2023-01-25 15:29:32 +01:00
fef
f945f5659f
fix build 2023-01-24 22:27:55 +01:00
fef
c7d5f6d78c
util: add base64 transcoding wrappers 2023-01-24 22:26:09 +01:00
fef
f54a172e07
data: use NonZeroUsize for memcache capacity 2023-01-23 21:23:36 +01:00
fef
89aa01c266
util: refactor crypto API 2023-01-23 21:14:30 +01:00
fef
96392afc39
util: refactor password API 2023-01-23 20:11:40 +01:00
fef
ac6d756acb
use newtypes for clear and hashed passwords 2023-01-20 20:23:13 +01:00
fef
27ccba5252
util: add ValidateField trait 2023-01-20 20:19:41 +01:00
fef
4be3bdda0c
add public/private keys for users 2023-01-20 19:24:32 +01:00
fef
888caba1d1
data: return Arc<T> from MemCache 2023-01-20 17:48:46 +01:00
fef
67053e0812
core: lift Size trait bound for Id<T> 2023-01-20 17:14:42 +01:00
fef
a0d2dc4151
refactor model IDs to use safe types
This is a major refactor that introduces a new
generic type Id<T, I> for tagging any ID with the
model they reference without any runtime overhead.
From now on, it should be pretty much impossible
to pass e.g. a note ID to a function that expects,
say, an account ID.

Furthermore, the follow and like tables have been
simplified to use the two IDs that define the
relationship as a composite primary key.

Finally, likes now have a memory cache.
2023-01-20 16:45:12 +01:00
fef
7845fb3680
data: refactor memcache 2023-01-20 12:37:03 +01:00
fef
2c96fa702e
conf: cargo fmt 2023-01-19 15:00:00 +01:00
fef
4bcaaa8f2f
ap/loader: fix tests
This removes some accidental bugs from mindlessly
retyping the original code as well as some
copy-paste errors.
Also adds tests for nyanoblog's extensions.
2023-01-19 14:59:31 +01:00
fef
605a7caa2c
util: refactor HTTP request API 2023-01-19 14:39:39 +01:00
fef
20b5cc32cc
core: move errors to separate module 2023-01-19 12:43:57 +01:00
fef
64739eeead
ap: add proper document loader
This still lacks caching, but it is slightly more
advanced than just using the ReqwestLoader that
the json_ld crate provides.
2023-01-18 20:04:14 +01:00
fef
7124590ff3
util: add reqwest wrapper 2023-01-18 19:56:19 +01:00
fef
da603511c4
cargo: update json-ld to 0.12 2023-01-18 11:50:44 +01:00
fef
af08336532
memcache: generalize indexing
This should also improve performance a little
because entries are now behind an Arc, so the
lock has to be held for shorter time periods.
2023-01-17 16:57:16 +01:00
fef
a07123f876
prevent unnecessary JWT key duplication
The HMAC secret was stored as raw bytes in the
config object, which required creating an
entirely new DecodingKey and EncodingKey struct
every whenever checking the password.
This patch stores these structures directly in
the config object, preventing new allocations.
2023-01-17 12:26:56 +01:00
fef
0000137461
web: refactor local globe icon 2023-01-10 16:08:31 +01:00
fef
d4be43c06f
web: improve button squishiness 2023-01-10 12:35:37 +01:00
fef
4c15d2ffc1
add favourite and unfavourite endpoints 2022-12-27 04:37:38 +01:00
fef
922fa83772
add some status endpoints 2022-12-27 04:18:20 +01:00
fef
aaf4ab53b7
memcache: support deleting stuff 2022-12-27 04:00:20 +01:00
fef
ef1bdfcf7c
data: add content_type field to notes 2022-12-27 02:30:03 +01:00
fef
56db49bdfe
cargussy format 2022-12-27 02:17:02 +01:00
fef
5b985b0059
add stub ActivityStreams inbox endpoint & worker 2022-12-27 02:16:29 +01:00
fef
6e81a7198b
job: improve docs a little 2022-12-27 01:53:13 +01:00
fef
e387e43dab
add API entities and more accounts endpoints 2022-12-27 01:52:28 +01:00
fef
8ea3ebda54
data: add in-memory cache 2022-12-26 15:42:47 +01:00
fef
9eb7601f9d
add LOCAL_DOMAIN config value 2022-12-25 18:33:32 +01:00
fef
0d9504ca3b
add objects table 2022-12-25 18:29:33 +01:00
fef
f1a631efff
data: remove unnecessary generics
The repository layer is the central gateway to
the data storage subsystem, so it should also be
solely responsible for transforming data coming
from the rest of the app into the appropriate
format.
2022-12-25 18:11:45 +01:00
fef
4f542571e0
add iri column 2022-12-25 15:57:33 +01:00
fef
93182705d9
data: return newly crated entries in SQL 2022-12-25 05:19:08 +01:00
fef
fb8bf0f316
job: retry on failure, general refactor 2022-12-25 04:13:06 +01:00
fef
055a97a8e1
ap: add base object type 2022-12-22 19:12:33 +01:00
fef
6a4e753069
util: fix type 2022-12-22 18:57:01 +01:00
fef
369780f48f
ap: add tests for context 2022-12-22 13:44:18 +01:00
fef
e568927d4b
ap: add well-known NS URIs 2022-12-22 13:36:48 +01:00
fef
28b36a20b4
ap: refactor context deserialization 2022-12-21 01:24:04 +01:00
fef
9be5fa9a2c
ap: add @context implementation
I'm calling it now, the path to ActivityPub
compliance is going to be an excruciatingly
painful one.
2022-12-20 20:33:57 +01:00
fef
a5b097bce5
implement validate for bearcaps 2022-12-20 14:09:19 +01:00