Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_ap_gateway/constants.py @ 3729:86eea17cafa7
component AP gateway: split plugin in several files:
constants, HTTP server and Pubsub service have been put in separated files.
rel: 363
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 31 Jan 2022 18:35:49 +0100 |
parents | sat/plugins/plugin_comp_ap_gateway.py@b15644cae50d |
children | a8c7e5cef0cb |
comparison
equal
deleted
inserted
replaced
3728:b15644cae50d | 3729:86eea17cafa7 |
---|---|
1 #!/usr/bin/env python3 | |
2 | |
3 # Libervia ActivityPub Gateway | |
4 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) | |
5 | |
6 # This program is free software: you can redistribute it and/or modify | |
7 # it under the terms of the GNU Affero General Public License as published by | |
8 # the Free Software Foundation, either version 3 of the License, or | |
9 # (at your option) any later version. | |
10 | |
11 # This program is distributed in the hope that it will be useful, | |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 # GNU Affero General Public License for more details. | |
15 | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 | |
20 IMPORT_NAME = "ap-gateway" | |
21 CONF_SECTION = f"component {IMPORT_NAME}" | |
22 CONTENT_TYPE_AP = "application/activity+json; charset=utf-8" | |
23 TYPE_ACTOR = "actor" | |
24 TYPE_INBOX = "inbox" | |
25 TYPE_OUTBOX = "outbox" | |
26 TYPE_ITEM = "item" | |
27 MEDIA_TYPE_AP = "application/activity+json" | |
28 # mapping from AP metadata to microblog data | |
29 AP_MB_MAP = { | |
30 "content": "content_xhtml", | |
31 | |
32 } | |
33 AP_REQUEST_TYPES = {"actor", "outbox"} | |
34 PAGE_SIZE = 10 | |
35 | |
36 LRU_MAX_SIZE = 200 |