View Source API Reference bonfire_umbrella v0.9.8-cooperation-beta.31

Modules

Entrypoint to the ActivityPub API for processing incoming and outgoing federated objects (normalising, saving the the Object storage, passing them to the adapter, and queueing outgoing activities to be pushed out).

An ActivityPub Actor type and functions for dealing with actors.

Contract for ActivityPub module adapters

Handles fetching AS2 objects from remote instances.

Module for building and performing HTTP requests.

Specifies connection options for HTTP requests

Rate limit middleware for Tesla using Hammer Based on TeslaExtra.RateLimit and TeslaExtra.RetryAfter

Helper functions for building HTTP requests

Takes into account the Retry-After header returned by the server when the rate limit is exceeded.

Defines the contract used by federation implementations to publish messages to their peers.

This module normalises outgoing data to conform with AS2/AP specs and handles incoming objects and activities

Serves and fetches data (mainly actor URI) necessary for federation when only the username and host is known.

Helpers for workers to use

Instances context.

Filter activities depending on their origin instance

Prunes objects from the database.

The worker to prune old data from the database.

Contains queries for Object.

This module contains some useful functions for containing objects to specific origins and determining those origins. They previously lived in the ActivityPub Transformer module.

Handles RSA keys for Actors & helpers for HTTP signatures

Implementation for behaviour from HTTPSignatures library

Misc functions used for federation

The entrypoint for defining your web interface, such as controllers, views, channels and so on.

Endpoints for serving objects and collections, so the ActivityPub API can be used to read information from the server.

Conveniences for translating and building error messages.

Standard error view

Endpoints for the ActivityPub inbox

Ensures HTTP signature has been validated by previous plugs on ActivityPub requests.

Generate SVG avatars from a string seed. It should always return the same avatar for the corresponding seed.

A handful of (mostly) arrow macros with superpowers.

ACLs represent fully populated access control rules that can be reused. Can be reused to secure multiple objects, thus exists independently of any object.

An object is linked to one or more Acls by the Controlled multimixin, which pairs an object ID with an ACL ID. Because it is a multimixin, a given object can have multiple ACLs applied. In the case of overlap, permissions are combined with false being prioritised.

A grant is part of an Acl, and defines a permission (value boolean on a verb) for a subject

Helpers for writing common queries. In particular, access control.

Reads fixtures in configuration and creates a default boundaries setup for a user

A mixin used to record parent/child relationships between categories (eg. a topic that belongs to a group) and between objects and categories (eg. a post was published in a topic)

A library of common utils and helpers used across Bonfire extensions

Simple way to measure the execution time of functions. It is preferred to use @decorator from Untangle instead.

Helpers for caching data and operations

Loads instance Settings from DB into Elixir's Config

A global cache of runtime config modules to be loaded at app startup.

Find a context or query module via its schema, backed by a global cache of known modules.

Date/time helpers

Extra functions to manipulate enumerables, basically an extension of Enum

A Global cache of known Behaviours in Bonfire

A global cache of known Bonfire extensions and their metadata.

Module for building and performing HTTP requests.

Specifies connection options for HTTP requests

Helper functions for building HTTP requests

Various helpers for localisation

Provides the core functions to retrieve and manage the CLDR data that supports formatting and localisation.

Parses HTTP Accept-Language header values as defined in rfc2616.

Data functions to retrieve localised calendar information.

Interval formats allow for software to format intervals like "Jan 10-12, 2008" as a shorter and more natural format than "Jan 10, 2008 - Jan 12, 2008". They are designed to take a start and end date, time or datetime plus a formatting pattern and use that information to produce a localized format.

Manages the Date, TIme and DateTime formats defined by CLDR.

Implements the compilation and execution of date, time and datetime formats.

Interval formats allow for software to format intervals like "Jan 10-12, 2008" as a shorter and more natural format than "Jan 10, 2008 - Jan 12, 2008". They are designed to take a start and end date, time or datetime plus a formatting pattern and use that information to produce a localized format.

Interval formats allow for software to format intervals like "Jan 10-12, 2008" as a shorter and more natural format than "Jan 10, 2008 - Jan 12, 2008". They are designed to take a start and end date, time or datetime plus a formatting pattern and use that information to produce a localized format.

Cldr backend module that formats lists.

Backend module that provides functions to define new locales and display human-readable locale names for presentation purposes.

Formats numbers and currencies based upon CLDR's decimal formats specification.

Implements cardinal plural rules for numbers.

Functions to manage the collection of number patterns defined in Cldr.

Implements ordinal plural rules for numbers.

Implements plural rules for ranges

Transliteration for digits and separators.

Functions to implement the number system rule-based-number-format rules of CLDR.

Functions to implement the ordinal rule-based-number-format rules of CLDR.

Functions to implement the spellout rule-based-number-format rules of CLDR.

Interval formats allow for software to format intervals like "Jan 10-12, 2008" as a shorter and more natural format than "Jan 10, 2008 - Jan 12, 2008". They are designed to take a start and end date, time or datetime plus a formatting pattern and use that information to produce a localized format.

Supports the CLDR Units definitions which provide for the localization of many unit types.

Default Gettext module It is recommended to use the more convenient macros in Bonfire.Common.Localise.Gettext.Helpers instead.

A module providing Internationalization with a gettext-based API.

Defines a plural forms module for Gettext that uses CLDR plural rules https://cldr.unicode.org/index/cldr-spec/plural-rules

Helpers for handling images and media URLs

Utility to clone a module under a new name

Properly query some data using the appropriate module depending on its schema.

Ecto Repo and related common functions

query_filter brings convenience and shortens the boilterplate of ecto queries

Preload helpers for Ecto Repo

Helper functions for changesets

Find a context or query module via its schema, backed by a global cache of known schema modules to be queried by their schema, or vice versa (eg. via ContextModule).

Loads instance Settings from DB into Elixir's Config

Open the console without starting the app: iex -S mix run --no-start or just imix run --no-start

This utility allows to get the same effect of using fcwatch | mix test --stale --listen-on-stdin to watch for code changes and run stale tests, but with more control and without the starting time penalty.

Various very commonly used utility functions for the Bonfire application.

Conceptually, a complete list of all permissions for everybody. In practice, it's a partial specification, and anything not explicitly granted is assumed to be denied.

An object is linked to one or more Acls by the Controlled multimixin, which pairs an object ID with an ACL ID. Because it is a multimixin, a given object can have multiple ACLs applied. In the case of overlap, permissions are combined with false being prioritised.

A marker that identifies special context-dependent semantics to the system.

Federated instances

Federated actors or objects

A reusable table to link child or related items and also rank sibling items.

An account is an identity for authentication purposes. An account has one or more credentials with which it may identify.

A mixin for an account ID, indicating ownership

A mixin that stores a second factor secret to authenticate an account.

A recursive view of all entities taken care of by their root entities.

The entity responsible for something. In practice, it means that something is deleted when its caretaker is deleted.

A username mixin that denies reuse of the same or similar usernames even when the username has been deleted.

A Mixin that provides a password for local login.

A mixin that stores settings (of the instance, account, user, etc) as an Erlang Term (typically a map or keyword list) encoded to binary.

A persona. A person (account) may have more than one user, but this is not exposed publicly (except to local instance administrators), so it is as if they are different people.

A mixin for shared user personas (which multiple accounts can use)

A multimixin for an activity/object appearing in a feed.

Track seen/unseen (similar to read/unread, but only indicates that it was displayed in a feed or other listing for the user, not that they actually read it) status of things (usually an Activity)

Bonfire.Epics helpers for working with Ecto

An Act that enters a transaction unless it senses that it would be futile.

A placeholder marker used by Begin to identify when to commit the transaction.

An act that marks a changeset or struct for deletion

An act that performs queued up work in a transaction.

Adapter functions delegated from the ActivityPub Library

Filter activities depending on their origin instance, actor, or other criteria

A automatically-generated global list of federation modules which can queried by activity and/or object type.

This module contains general functions for handling files, and also an Ecto schema which is a multimixin for storing one or more media attached to a Pointable object.

Saves uploaded files as attachments to the post.

Fetch and save metadata of URLs

Uploader for larger images, for example, a profile page banner.

Extension to Waffle.Definition, adding support for checking against media types parsed through magic bytes instead of file extensions, which can be modified by the user.

Uploader for larger images, for example, a profile page banner.

Resizes images at compile time (when possible) or runtime

Creates a changeset for publishing a page

Runs at compile-time to include dynamic strings (like verb names and object types) in localisation string extraction.

Functions for checking the validity of email addresses and domains

An act that deals with maintaining a Caretaker record for a changeset.

An act that deals with maintaining a Created record for a changeset.

Creates a changeset for publishing a post

An act that enqueues publish/update/delete requests to meilisearch via an oban job queue.

Handles matching of needs & offers

A way to have data seeds that work similarly to migrations.

An Act that translates a post or changeset into some jobs for the AP publish worker. Handles creation, update and delete

NOT USED - Finds a list of appropriate feeds into which to post.

Delete something + specified associations with a changeset

Query and manipulate post contents

Track seen/unseen (similar to read/unread, but only indicates that it was displayed in a feed or other listing for the user, not that they actually read it) status of things (usually Activities)

A mixin used for adding tags to an object

A library of common utils and helpers used across Bonfire extensions

Conveniences for translating and building error messages.

Like a plug, but for a liveview

Like a plug, but for a liveview

Add items to extensions' navigation sidebar.

WIP for tracking online users. Used by PersistentLive

A special 'modal' for previewing objects from a feed without redirecting to a new view (so we can go back to where we were in the feed)

Settings nav & components

Find a smart input module via the object type(s) it can create, or vice versa. Backed by a global cache of known smart input modules.

Static-site generator which can take a list of URLs served by the current Phoenix server and output static HTML for them

Widgets: components that can be added to the dashboard or sidebards

Runs ecto migrations automatically on startup (add this to your app's supervision tree)

A behaviour implemented by our data migrations (generally backfills).

Configuration for a DataMigration behaviour module, used by the DataMigration.Runner.

Runs a DataMigration

A custom Ecto type for handling the serialization of arbitrary data types stored as binary data in the database. Requires the underlying DB field to be a binary.

Log slow Ecto queries

Checks a query against the previous one and increments counter of collisions or swaps previous query with the last one.

Provides functions for sanitising input on Ecto.Changeset string fields.

Configuration-driven Ecto Schemata.

Universal foreign keys, virtual schemas, and shared data mixins

Helpers for writing Pointer-aware migrations.

If a Pointer represents an object, mixins represent data about the object. Mixins collate optional additional information about an object. Different types of object will typically make use of different mixins. You can see these as aspects of the data if you like.

We could not find the requested object

Sets up an Ecto Schema for a Pointable table.

A Pointer is any object that can be referenced by its id.

A context for working with Needle, a sort of global foreign key scheme.

A securely randomly generated UUID keyed table. Not pointable.

One Table to rule them all. A record of a table participating in the pointers abstraction - mandatory if participating.

A Global cache of Tables to be queried by their (Pointer) IDs, table names or Ecto Schema module names.

An Ecto type for ULID strings.

Has a ULID primary key but is not pointable.

Sets up an Ecto Schema for a Virtual Pointable

Defines a paginator.

Defines a page.

Defines page page_info.

Serialization functions to create a version struct

Logging and debug printing that include location information

Mix Tasks

Creates an account in the database, automatically activated

(re)compiles dependencies.

mix docs.deps

Extracts translations by recompiling the Elixir source code.

Generates secrets and prints to the terminal.

Creates an account in the database, automatically activated

Creates an user in the database (and an account, automatically activated)