API Reference bonfire_umbrella v0.9.0-classic-beta.15
modules
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
Helper functions for building HTTP requests
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.
Instance.
Filter activities depending on their origin instance
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.
Generates RSA keys for HTTP message signatures
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
Generate SVG avatars from a string seed. It should always return the same avatar for the corresponding seed.
acls represent fully populated access control rules that can be reused
a grant applies to a subject
Helpers for writing common queries. In particular, access control.
A marker that identifies special context-dependent semantics to the system.
Reads fixtures in configuration and creates a default boundaries setup for a user
A library of common utils and helpers used across Bonfire extensions
Datagrabber for changelog generation, Versioce.Config.Changelog.datagrabber/0
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.
Missing functions from 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.
Backend module that provides functions to define new locales and display human-readable locale names for presentation purposes.
Implements cardinal plural rules for numbers.
Implements ordinal plural rules for numbers.
Implements plural rules for ranges
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
Utility to clone a module under a new name
Add items to extensions' navigation sidebar.
Properly query some data using the appropriate module depending on its schema.
Ecto Repo and related common functions
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).
Settings nav & components
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.
Widgets: components that can be added to the dashboard or sidebards
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.
A mixin for superpowers
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.
A mixin that stores [metadata about] encrypted secrets
Adapter functions delegated from the ActivityPub
Library
Filter activities depending on their origin instance, actor, or other criteria
A Global cache of known federation modules to be queried by activity and/or object type.
Federated instances
Context for Bonfire.Data.ActivityPub.Peer
Federated actors or objects
Context for Bonfire.Data.ActivityPub.Peered
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.
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.
Loads instance Settings from DB into Elixir's Config
Creates a changeset for publishing a page
Creates a changeset for publishing a section
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
Creates a changeset for publishing a post
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 library of common utils and helpers used across Bonfire extensions
Conveniences for translating and building error messages.
usage examples
Like a plug, but for a liveview
The classic modal
The classic modal
Static-site generator which can take a list of URLs served by the current Phoenix server and output static HTML for them
query_filter
brings convenience and shortens the boilterplate of ecto queries
Runs ecto migrations automatically on startup (add this to your app's supervision tree)
Helper functions for changesets
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.
Defines a paginator.
Defines a page.
Defines page page_info.
A context for working with Pointers, a sort of global foreign key scheme.
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 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
Helpers to make random generator functions more useful in tests
mix-tasks
Mix Tasks
Creates an account in the database, automatically activated
(re)compiles dependencies.
Extracts translations by recompiling the Elixir source code.
Generates secrets and prints to the terminal.
Creates an account in the database, automatically activated