GoActivityPub Wiki

The documentation was updated click OK to refresh.

Storage modules

This is the list of storage backends that the library currently provides:

In order to simplify the API of the storage interfaces there isn’t a distinction between loading single objects and object collections.

The method Load(vocab.IRI, filters ...filters.Check) thus can receive a variable argument list of filters that can be applied when loading a collection.

This ensures that the collection contains only items that match those filters.

For more details about how filters work see the corresponding module.

Storage conformance suite

Alongside these modules, there is the storage-conformance-suite which provides a convenient helper module to make it easier for developers create their own storage backends on top of which ever foundational technology they need.

Its internal storage implementation contains some of the implicit rules that the storage backends need to implement in order to pass the suite, which are not apparent from the API.

Most of these are related to loading dependent objects that are represented just by an IRI in the stored value when the Load() method receives filters that refer to their respective properties.

Other functionality

On top of the functionality required by the ActivityPub specification through the processing module, there are some additional elements that other parts of the library make use of. The conformance suite provides tests for them also, but their absence is not fatal.

One such piece of functionality is saving and retrieving metadata based on the object IDs. This allows Actor objects for example to have an attached private key, or password, or in the cases of Application actors that are used as OAuth2 clients there are methods that facilitate the backends’ use with the osin library.

However this part of the API is not yet set in stone, it might evolve a little over time.