GoActivityPub Wiki

The documentation was updated click OK to refresh.

Filters

The filters module of the library provides a set of types and functions that determine if ActivityPub objects match certain rules.

This is used mostly by the storage backends to filter items out of collections at display time.

The filters can be used to generate SQL query where clauses compatible with the sqlf library that can be used by backends using SQL databases for storage.

They can be encoded and decoded into/from url.Value query parameters, allowing for a quick way to link HTTP GET requests into the corresponding storage loads.

Authorization

Among more traditional filters (eg, on object type) the module offers a method to match an ACL built from the object’s recipients (it’s aggregated To, CC, Bto, BCC and Audience properties values) to an Actor loaded from a request’s Authorization or Signature header.

This is a very important mechanism for ensuring only authorized actors can access an object, or a collection’s items.

The Public namespace collection identifier as a recipient ensures that the object is publicly accessible.