summaryrefslogtreecommitdiff
path: root/internal/transport/transport.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-01-08 11:29:40 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-08 11:29:40 +0100
commit451803b230084d5553962c2b3e3b2a921e9545e8 (patch)
tree9fde24ef1d70d77b7545c2a62126ea19ead2fb2a /internal/transport/transport.go
parent[chore] replace statuses.updated_at column with statuses.edited_at (#3636) (diff)
downloadgotosocial-451803b230084d5553962c2b3e3b2a921e9545e8.tar.xz
[feature] Fetch + create domain permissions from subscriptions nightly (#3635)
* peepeepoopoo * test domain perm subs * swagger * envparsing * dries your wets * start on docs * finish up docs * copy paste errors * rename actions package * rename force -> skipCache * move obfuscate parse nearer to where err is checked * make higherPrios a simple slice * don't use receiver for permsFrom funcs * add more context to error logs * defer finished log * use switch for permType instead of if/else * thanks linter, love you <3 * validate csv headers before full read * use bufio scanner
Diffstat (limited to 'internal/transport/transport.go')
-rw-r--r--internal/transport/transport.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/transport/transport.go b/internal/transport/transport.go
index 7f7e985fc..45d43ff18 100644
--- a/internal/transport/transport.go
+++ b/internal/transport/transport.go
@@ -78,6 +78,20 @@ type Transport interface {
// DereferenceInstance dereferences remote instance information, first by checking /api/v1/instance, and then by checking /.well-known/nodeinfo.
DereferenceInstance(ctx context.Context, iri *url.URL) (*gtsmodel.Instance, error)
+ // DereferenceDomainPermissions dereferences the
+ // permissions list present at the given permSub's URI.
+ //
+ // If "force", then If-Modified-Since and If-None-Match
+ // headers will *NOT* be sent with the outgoing request.
+ //
+ // If err == nil and Unmodified == false, then it's up
+ // to the caller to close the returned io.ReadCloser.
+ DereferenceDomainPermissions(
+ ctx context.Context,
+ permSub *gtsmodel.DomainPermissionSubscription,
+ force bool,
+ ) (*DereferenceDomainPermissionsResp, error)
+
// Finger performs a webfinger request with the given username and domain, and returns the bytes from the response body.
Finger(ctx context.Context, targetUsername string, targetDomain string) ([]byte, error)
}