mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-10 10:18:08 -06:00
[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
This commit is contained in:
parent
c013892ca2
commit
451803b230
95 changed files with 3320 additions and 626 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue