database

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 15 Imported by: 1

README

Databases

Databases in go-activitypub are really more akin to traditional RDBMS "tables" in that all of the database (or tables) listed below have one or more associations with each other.

Each of these databases is defined as a Go-language interface with one or more default implementations provided by this package. For example:

type GetFollowersCallbackFunc func(context.Context, string) error

type FollowersDatabase interface {
	GetFollowersForAccount(context.Context, int64, GetFollowersCallbackFunc) error
	GetFollower(context.Context, int64, string) (*Follower, error)
	AddFollower(context.Context, *Follower) error
	RemoveFollower(context.Context, *Follower) error
	Close(context.Context) error
}

The idea here is that the various tools for performing actions (posting, serving ActivityPub requests, etc.) don't know anything about the underlying database implementation. Maybe you want to run things locally using a SQLite database, or you want to run it in "production" using a MySQL database or in a "serverless" environment using something like DynamoDB. The answer is: Yes. So long as your database of choice implements the different database (or table) interfaces then it is supported.

Implementations

Like everything else in the go-activitypub package these databases implement a subset of all the functionality defined in the ActivityPub and ActivityStream standards and reflect the ongoing investigation in translating those standards in to working code.

As of this writing two "classes" of databases are supported:

database/sql

Anything that implements the built-in Go database/sql DB interface. As of this writing only SQLite databases have been tested using the mattn/go-sqlite3 package. There are two things to note about the SQLite implementation:

  • The use of the mattn/go-sqlite3 package means you'll need to have a C complier to build the code.
  • The SQLite databases themselves not infrequenely get themselves in to a state where they are locked preventing other operations from completing. This is a SQLite thing so you probably don't want to deploy it to "production" but it is generally good enough for testing things. It's also possible that I am simply misconfiguring SQLite and if I am I would appreciate any pointers on how to fix these mistakes.

To add a different database "driver", for example MySQL, you will need to clone the respective tools and add the relevant import statement. For example to update the cmd/server tool to use MySQL you would replace the _ "github.com/mattn/go-sqlite3" import statement with _ "github.com/go-sql-driver/mysql" like this:

package main

import (
	"context"
	"os"

	_ "github.com/go-sql-driver/mysql"
	"github.com/sfomuseum/go-activitypub/app/server"
	"github.com/sfomuseum/go-activitypub/slog"
)

func main() {
	ctx := context.Background()
	logger := slog.Default()
	server.Run(ctx, logger)
}
SQL schemas
  • SQLite
  • MySQLNote: These have not been tested yet.
gocloud.dev/docstore

Anything that implements the gocloud.dev/docstore Docstore interface. As of this writing only DynamoDB document stores have been tested using the awsdynamodb and the aaronland/gocloud-docstore packages. A few things to note:

  • One side effect of using the aaronland/gocloud-docstore package is that the gocloud.dev/docstore/awsdynamodb "driver" is always imported and available regardless of whether you include in an import statement.
  • The "global secondary indices" for the schema/dynamodb definitions are inefficient and could stand to be optimized at some point in the future.

To add a different docstore "driver", for example MongoDB, you will need to clone the respective tools and add the relevant import statement. For example to update the cmd/server tool to use MongoDB you would replace the _ "github.com/mattn/go-sqlite3" import statement with _ "gocloud.dev/docstore/mongodocstore" like this:

package main

import (
	"context"
	"os"
	
	_ "gocloud.dev/docstore/mongodocstore"
	"github.com/sfomuseum/go-activitypub/app/server"
	"github.com/sfomuseum/go-activitypub/slog"
)

func main() {
	ctx := context.Background()
	logger := slog.Default()
	server.Run(ctx, logger)
}
Document Store table definitions

Interfaces

AccountsDatabase

This is where accounts specific to an atomic instance of the go-activitypub package, for example example1.social versus example2.social, are stored.

ActivitiesDatabase

This is where outbound (ActivityPub) actvities related to accounts are stored. This database stores both the raw (JSON-encoded) ActvityPub activity record as well as other properties (account id, activity type, etc.) specific to the go-activitypub package.

AliasesDatabase

This is where aliases (alternate names) for accounts are stored.

BlocksDatabase

This is where records describing external actors or hosts that are blocked by individual accounts are stored.

DeliveriesDatabase

This is where a log of outbound deliveries of (ActivityPub) actvities for individual accounts are stored.

FollowersDatabase

This is where records describing the external actors following (internal) accounts are stored.

FollowingDatabase

This is where records describing the external actors that (internal) accounts are following are stored.

LikesDatabase

This is where records describing boost activities by external actors (of activities by internal accounts) are stored.

There are currently no database tables for storing boost events by internal accounts.

MessagesDatabase

This is where the pointer to a "Note" activity (stored in an implementation of the NotesDatabase) delivered to a specific account is stored.

NotesDatabase

This is where the details of a "Note" activity from an external actor is stored.

PostTagsDatabase

This is where the details of the "Tags" associated with a post (or "Note") activitiy are stored.

Currently, this interface is tightly-coupled with "Notes" (posts) which may be revisited in the future.

PostsDatabase

This is where the details of a "Note" activity (or "post") by an account are stored. These details do not include ActivityStream "Tags" which are stored separately in an implementation of the PostTagsDatabase.

PropertiesDatabase

This is where arbitrary key-value property records for individual accounts are stored.

Documentation

Overview

Package database defines interfaces and default implementation for the underlying databases (or database tables) used to store ActivityPub related operations.

Index

Constants

View Source
const SQL_ACCOUNTS_TABLE_NAME string = "accounts"
View Source
const SQL_ACTIVITIES_TABLE_NAME string = "activities"
View Source
const SQL_ALIASES_TABLE_NAME string = "aliases"
View Source
const SQL_BLOCKS_TABLE_NAME string = "blocks"
View Source
const SQL_BOOSTS_TABLE_NAME string = "boosts"
View Source
const SQL_DELIVERIES_TABLE_NAME string = "deliveries"
View Source
const SQL_FOLLOWERS_TABLE_NAME string = "followers"
View Source
const SQL_FOLLOWING_TABLE_NAME string = "following"
View Source
const SQL_LIKES_TABLE_NAME string = "likes"
View Source
const SQL_MESSAGES_TABLE_NAME string = "messages"
View Source
const SQL_NOTES_TABLE_NAME string = "notes"
View Source
const SQL_POSTS_TABLE_NAME string = "posts"
View Source
const SQL_POST_TAGS_TABLE_NAME string = "posts_tags"
View Source
const SQL_PROPERTIES_TABLE_NAME string = "properties"

Variables

This section is empty.

Functions

func AccountsDatabaseSchemes

func AccountsDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func ActivitiesDatabaseSchemes

func ActivitiesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func AliasesDatabaseSchemes

func AliasesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func BlocksDatabaseSchemes

func BlocksDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func BoostsDatabaseSchemes

func BoostsDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func DeliveriesDatabaseSchemes

func DeliveriesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func FollowersDatabaseSchemes

func FollowersDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func FollowingDatabaseSchemes

func FollowingDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func LikesDatabaseSchemes

func LikesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func MessagesDatabaseSchemes

func MessagesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func NotesDatabaseSchemes

func NotesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func PostTagsDatabaseSchemes

func PostTagsDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func PostsDatabaseSchemes

func PostsDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func PropertiesDatabaseSchemes

func PropertiesDatabaseSchemes() []string

Schemes returns the list of schemes that have been registered.

func RegisterAccountsDatabase

func RegisterAccountsDatabase(ctx context.Context, scheme string, init_func AccountsDatabaseInitializationFunc) error

RegisterAccountsDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `AccountsDatabase` instances by the `NewAccountsDatabase` method.

func RegisterActivitiesDatabase

func RegisterActivitiesDatabase(ctx context.Context, scheme string, init_func ActivitiesDatabaseInitializationFunc) error

RegisterActivitiesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `ActivitiesDatabase` instances by the `NewActivitiesDatabase` method.

func RegisterAliasesDatabase

func RegisterAliasesDatabase(ctx context.Context, scheme string, init_func AliasesDatabaseInitializationFunc) error

RegisterAliasesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `AliasesDatabase` instances by the `NewAliasesDatabase` method.

func RegisterBlocksDatabase

func RegisterBlocksDatabase(ctx context.Context, scheme string, init_func BlocksDatabaseInitializationFunc) error

RegisterBlocksDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `BlocksDatabase` instances by the `NewBlocksDatabase` method.

func RegisterBoostsDatabase

func RegisterBoostsDatabase(ctx context.Context, scheme string, init_func BoostsDatabaseInitializationFunc) error

RegisterBoostsDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `BoostsDatabase` instances by the `NewBoostsDatabase` method.

func RegisterDeliveriesDatabase

func RegisterDeliveriesDatabase(ctx context.Context, scheme string, init_func DeliveriesDatabaseInitializationFunc) error

RegisterDeliveriesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `DeliveriesDatabase` instances by the `NewDeliveriesDatabase` method.

func RegisterFollowersDatabase

func RegisterFollowersDatabase(ctx context.Context, scheme string, init_func FollowersDatabaseInitializationFunc) error

RegisterFollowersDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `FollowersDatabase` instances by the `NewFollowersDatabase` method.

func RegisterFollowingDatabase

func RegisterFollowingDatabase(ctx context.Context, scheme string, init_func FollowingDatabaseInitializationFunc) error

RegisterFollowingDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `FollowingDatabase` instances by the `NewFollowingDatabase` method.

func RegisterLikesDatabase

func RegisterLikesDatabase(ctx context.Context, scheme string, init_func LikesDatabaseInitializationFunc) error

RegisterLikesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `LikesDatabase` instances by the `NewLikesDatabase` method.

func RegisterMessagesDatabase

func RegisterMessagesDatabase(ctx context.Context, scheme string, init_func MessagesDatabaseInitializationFunc) error

RegisterMessagesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `MessagesDatabase` instances by the `NewMessagesDatabase` method.

func RegisterNotesDatabase

func RegisterNotesDatabase(ctx context.Context, scheme string, init_func NotesDatabaseInitializationFunc) error

RegisterNotesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `NotesDatabase` instances by the `NewNotesDatabase` method.

func RegisterPostTagsDatabase

func RegisterPostTagsDatabase(ctx context.Context, scheme string, init_func PostTagsDatabaseInitializationFunc) error

RegisterPostTagsDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `PostTagsDatabase` instances by the `NewPostTagsDatabase` method.

func RegisterPostsDatabase

func RegisterPostsDatabase(ctx context.Context, scheme string, init_func PostsDatabaseInitializationFunc) error

RegisterPostsDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `PostsDatabase` instances by the `NewPostsDatabase` method.

func RegisterPropertiesDatabase

func RegisterPropertiesDatabase(ctx context.Context, scheme string, init_func PropertiesDatabaseInitializationFunc) error

RegisterPropertiesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `PropertiesDatabase` instances by the `NewPropertiesDatabase` method.

Types

type AccountsDatabase

type AccountsDatabase interface {
	// GetAccounts iterates through all the account records and dispatches each to an instance of `GetAccountsCallbackFunc`.
	GetAccounts(context.Context, GetAccountsCallbackFunc) error
	// GetAccountsForDateRange iterates through all the account records created between two dates and dispatches each to an instance of `GetAccountIdsCallbackFunc`.
	GetAccountIdsForDateRange(context.Context, int64, int64, GetAccountIdsCallbackFunc) error
	// GetAccountWithId returns the account matching a specific 64-bit ID.
	GetAccountWithId(context.Context, int64) (*activitypub.Account, error)
	// GetAccountWithId returns the account matching a specific name.
	GetAccountWithName(context.Context, string) (*activitypub.Account, error)
	// AddAccount adds a new `activitypub.Account` instance.
	AddAccount(context.Context, *activitypub.Account) error
	// RemoveAccount removes a specific `activitypub.Account` instance.
	RemoveAccount(context.Context, *activitypub.Account) error
	// UpdateAccount updates a specific `activitypub.Account` instance.
	UpdateAccount(context.Context, *activitypub.Account) error
	// Close performs any final operations to terminate the underlying database connection.
	Close(context.Context) error
}

AccountsDatabase defines an interface for working with individual accounts associated with an atomic instance of the `go-activity` tools and services.

func NewAccountsDatabase

func NewAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)

NewAccountsDatabase returns a new `AccountsDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `AccountsDatabaseInitializationFunc` function used to instantiate the new `AccountsDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterAccountsDatabase` method.

func NewDocstoreAccountsDatabase

func NewDocstoreAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)

func NewNullAccountsDatabase

func NewNullAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)

func NewSQLAccountsDatabase

func NewSQLAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)

type AccountsDatabaseInitializationFunc

type AccountsDatabaseInitializationFunc func(ctx context.Context, uri string) (AccountsDatabase, error)

AccountsDatabaseInitializationFunc is a function defined by individual account_database package and used to create an instance of that account_database

type ActivitiesDatabase

type ActivitiesDatabase interface {
	AddActivity(context.Context, *activitypub.Activity) error
	GetActivityWithId(context.Context, int64) (*activitypub.Activity, error)
	GetActivityWithActivityPubId(context.Context, string) (*activitypub.Activity, error)
	GetActivityWithActivityTypeAnId(context.Context, activitypub.ActivityType, int64) (*activitypub.Activity, error)
	GetActivities(context.Context, GetActivitiesCallbackFunc) error
	GetActivitiesForAccount(context.Context, int64, GetActivitiesCallbackFunc) error
	Close(context.Context) error
}

func NewActivitiesDatabase

func NewActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error)

NewActivitiesDatabase returns a new `ActivitiesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `ActivitiesDatabaseInitializationFunc` function used to instantiate the new `ActivitiesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterActivitiesDatabase` method.

func NewDocstoreActivitiesDatabase

func NewDocstoreActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error)

func NewNullActivitiesDatabase

func NewNullActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error)

func NewSQLActivitiesDatabase

func NewSQLActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error)

type ActivitiesDatabaseInitializationFunc

type ActivitiesDatabaseInitializationFunc func(ctx context.Context, uri string) (ActivitiesDatabase, error)

ActivitiesDatabaseInitializationFunc is a function defined by individual activities_database package and used to create an instance of that activities_database

type AliasesDatabase

type AliasesDatabase interface {
	GetAliasesForAccount(context.Context, int64, GetAliasesCallbackFunc) error
	GetAliasWithName(context.Context, string) (*activitypub.Alias, error)
	AddAlias(context.Context, *activitypub.Alias) error
	RemoveAlias(context.Context, *activitypub.Alias) error
	Close(context.Context) error
}

func NewAliasesDatabase

func NewAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)

NewAliasesDatabase returns a new `AliasesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `AliasesDatabaseInitializationFunc` function used to instantiate the new `AliasesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterAliasesDatabase` method.

func NewDocstoreAliasesDatabase

func NewDocstoreAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)

func NewNullAliasesDatabase

func NewNullAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)

func NewSQLAliasesDatabase

func NewSQLAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)

type AliasesDatabaseInitializationFunc

type AliasesDatabaseInitializationFunc func(ctx context.Context, uri string) (AliasesDatabase, error)

AliasesDatabaseInitializationFunc is a function defined by individual alias_database package and used to create an instance of that alias_database

type BlocksDatabase

type BlocksDatabase interface {
	GetBlockIdsForDateRange(context.Context, int64, int64, GetBlockIdsCallbackFunc) error
	GetBlockWithAccountIdAndAddress(context.Context, int64, string, string) (*activitypub.Block, error)
	GetBlockWithId(context.Context, int64) (*activitypub.Block, error)
	AddBlock(context.Context, *activitypub.Block) error
	RemoveBlock(context.Context, *activitypub.Block) error
	Close(context.Context) error
}

func NewBlocksDatabase

func NewBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)

NewBlocksDatabase returns a new `BlocksDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `BlocksDatabaseInitializationFunc` function used to instantiate the new `BlocksDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterBlocksDatabase` method.

func NewDocstoreBlocksDatabase

func NewDocstoreBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)

func NewNullBlocksDatabase

func NewNullBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)

func NewSQLBlocksDatabase

func NewSQLBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)

type BlocksDatabaseInitializationFunc

type BlocksDatabaseInitializationFunc func(ctx context.Context, uri string) (BlocksDatabase, error)

BlocksDatabaseInitializationFunc is a function defined by individual block_database package and used to create an instance of that block_database

type BoostsDatabase

type BoostsDatabase interface {
	GetBoostIdsForDateRange(context.Context, int64, int64, GetBoostIdsCallbackFunc) error
	GetBoostsForPost(context.Context, int64, GetBoostsCallbackFunc) error
	GetBoostsForAccount(context.Context, int64, GetBoostsCallbackFunc) error
	// GetBoostsForActor(context.Context, string, GetBoostsCallbackFunc) error
	GetBoostWithPostIdAndActor(context.Context, int64, string) (*activitypub.Boost, error)
	GetBoostWithId(context.Context, int64) (*activitypub.Boost, error)
	AddBoost(context.Context, *activitypub.Boost) error
	RemoveBoost(context.Context, *activitypub.Boost) error
	Close(context.Context) error
}

func NewBoostsDatabase

func NewBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)

NewBoostsDatabase returns a new `BoostsDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `BoostsDatabaseInitializationFunc` function used to instantiate the new `BoostsDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterBoostsDatabase` method.

func NewDocstoreBoostsDatabase

func NewDocstoreBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)

func NewNullBoostsDatabase

func NewNullBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)

func NewSQLBoostsDatabase

func NewSQLBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)

type BoostsDatabaseInitializationFunc

type BoostsDatabaseInitializationFunc func(ctx context.Context, uri string) (BoostsDatabase, error)

BoostsDatabaseInitializationFunc is a function defined by individual boost_database package and used to create an instance of that boost_database

type DeliveriesDatabase

type DeliveriesDatabase interface {
	AddDelivery(context.Context, *activitypub.Delivery) error
	GetDeliveryWithId(context.Context, int64) (*activitypub.Delivery, error)
	GetDeliveries(context.Context, GetDeliveriesCallbackFunc) error
	GetDeliveriesWithActivityIdAndRecipient(context.Context, int64, string, GetDeliveriesCallbackFunc) error
	GetDeliveriesWithActivityPubIdAndRecipient(context.Context, string, string, GetDeliveriesCallbackFunc) error
	GetDeliveryIdsForDateRange(context.Context, int64, int64, GetDeliveryIdsCallbackFunc) error
	Close(context.Context) error
}

func NewDeliveriesDatabase

func NewDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)

NewDeliveriesDatabase returns a new `DeliveriesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `DeliveriesDatabaseInitializationFunc` function used to instantiate the new `DeliveriesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterDeliveriesDatabase` method.

func NewDocstoreDeliveriesDatabase

func NewDocstoreDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)

func NewNullDeliveriesDatabase

func NewNullDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)

func NewSQLDeliveriesDatabase

func NewSQLDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)

func NewSlogDeliveriesDatabase

func NewSlogDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)

type DeliveriesDatabaseInitializationFunc

type DeliveriesDatabaseInitializationFunc func(ctx context.Context, uri string) (DeliveriesDatabase, error)

DeliveriesDatabaseInitializationFunc is a function defined by individual deliveries_database package and used to create an instance of that deliveries_database

type DocstoreAccountsDatabase

type DocstoreAccountsDatabase struct {
	AccountsDatabase
	// contains filtered or unexported fields
}

func (*DocstoreAccountsDatabase) AddAccount

func (db *DocstoreAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error

func (*DocstoreAccountsDatabase) Close

func (*DocstoreAccountsDatabase) GetAccountIdsForDateRange

func (db *DocstoreAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error

func (*DocstoreAccountsDatabase) GetAccountWithId

func (db *DocstoreAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error)

func (*DocstoreAccountsDatabase) GetAccountWithName

func (db *DocstoreAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error)

func (*DocstoreAccountsDatabase) GetAccounts

func (*DocstoreAccountsDatabase) RemoveAccount

func (db *DocstoreAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error

func (*DocstoreAccountsDatabase) UpdateAccount

func (db *DocstoreAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error

type DocstoreActivitiesDatabase

type DocstoreActivitiesDatabase struct {
	ActivitiesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreActivitiesDatabase) AddActivity

func (db *DocstoreActivitiesDatabase) AddActivity(ctx context.Context, f *activitypub.Activity) error

func (*DocstoreActivitiesDatabase) Close

func (*DocstoreActivitiesDatabase) GetActivities

func (*DocstoreActivitiesDatabase) GetActivitiesForAccount

func (db *DocstoreActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error

func (*DocstoreActivitiesDatabase) GetActivityWithActivityPubId

func (db *DocstoreActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error)

func (*DocstoreActivitiesDatabase) GetActivityWithActivityTypeAndId

func (db *DocstoreActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, id int64) (*activitypub.Activity, error)

func (*DocstoreActivitiesDatabase) GetActivityWithId

func (db *DocstoreActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error)

type DocstoreAliasesDatabase

type DocstoreAliasesDatabase struct {
	AliasesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreAliasesDatabase) AddAlias

func (db *DocstoreAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error

func (*DocstoreAliasesDatabase) Close

func (*DocstoreAliasesDatabase) GetAliasWithName

func (db *DocstoreAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error)

func (*DocstoreAliasesDatabase) GetAliasesForAccount

func (db *DocstoreAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error

func (*DocstoreAliasesDatabase) RemoveAlias

func (db *DocstoreAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error

type DocstoreBlocksDatabase

type DocstoreBlocksDatabase struct {
	BlocksDatabase
	// contains filtered or unexported fields
}

func (*DocstoreBlocksDatabase) AddBlock

func (db *DocstoreBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error

func (*DocstoreBlocksDatabase) Close

func (*DocstoreBlocksDatabase) GetBlockIdsForDateRange

func (db *DocstoreBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error

func (*DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress

func (db *DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error)

func (*DocstoreBlocksDatabase) GetBlockWithId

func (db *DocstoreBlocksDatabase) GetBlockWithId(ctx context.Context, id int64) (*activitypub.Block, error)

func (*DocstoreBlocksDatabase) RemoveBlock

func (db *DocstoreBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error

func (*DocstoreBlocksDatabase) UpdateBlock

func (db *DocstoreBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error

type DocstoreBoostsDatabase

type DocstoreBoostsDatabase struct {
	BoostsDatabase
	// contains filtered or unexported fields
}

func (*DocstoreBoostsDatabase) AddBoost

func (db *DocstoreBoostsDatabase) AddBoost(ctx context.Context, boost *activitypub.Boost) error

func (*DocstoreBoostsDatabase) Close

func (*DocstoreBoostsDatabase) GetBoostIdsForDateRange

func (db *DocstoreBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error

func (*DocstoreBoostsDatabase) GetBoostWithId

func (db *DocstoreBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error)

func (*DocstoreBoostsDatabase) GetBoostWithPostIdAndActor

func (db *DocstoreBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Boost, error)

func (*DocstoreBoostsDatabase) GetBoostsForAccount

func (db *DocstoreBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error

func (*DocstoreBoostsDatabase) GetBoostsForPost

func (db *DocstoreBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error

func (*DocstoreBoostsDatabase) RemoveBoost

func (db *DocstoreBoostsDatabase) RemoveBoost(ctx context.Context, boost *activitypub.Boost) error

type DocstoreDeliveriesDatabase

type DocstoreDeliveriesDatabase struct {
	DeliveriesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreDeliveriesDatabase) AddDelivery

func (db *DocstoreDeliveriesDatabase) AddDelivery(ctx context.Context, f *activitypub.Delivery) error

func (*DocstoreDeliveriesDatabase) Close

func (*DocstoreDeliveriesDatabase) GetDeliveries

func (db *DocstoreDeliveriesDatabase) GetDeliveries(ctx context.Context, deliveries_callback GetDeliveriesCallbackFunc) error

func (*DocstoreDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient

func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, deliveries_callback GetDeliveriesCallbackFunc) error

func (*DocstoreDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient

func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, deliveries_callback GetDeliveriesCallbackFunc) error

func (*DocstoreDeliveriesDatabase) GetDeliveryIdsForDateRange

func (db *DocstoreDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error

func (*DocstoreDeliveriesDatabase) GetDeliveryWithId

func (db *DocstoreDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error)

type DocstoreFollowersDatabase

type DocstoreFollowersDatabase struct {
	FollowersDatabase
	// contains filtered or unexported fields
}

func (*DocstoreFollowersDatabase) AddFollower

func (db *DocstoreFollowersDatabase) AddFollower(ctx context.Context, f *activitypub.Follower) error

func (*DocstoreFollowersDatabase) Close

func (*DocstoreFollowersDatabase) GetAllFollowers

func (*DocstoreFollowersDatabase) GetFollower

func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*activitypub.Follower, error)

func (*DocstoreFollowersDatabase) GetFollowerIdsForDateRange

func (db *DocstoreFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error

func (*DocstoreFollowersDatabase) GetFollowerWithId added in v0.0.3

func (db *DocstoreFollowersDatabase) GetFollowerWithId(ctx context.Context, follower_id int64) (*activitypub.Follower, error)

func (*DocstoreFollowersDatabase) GetFollowersForAccount

func (db *DocstoreFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, cb GetFollowersCallbackFunc) error

func (*DocstoreFollowersDatabase) HasFollowers

func (db *DocstoreFollowersDatabase) HasFollowers(ctx context.Context, account_id int64) (bool, error)

func (*DocstoreFollowersDatabase) RemoveFollower

func (db *DocstoreFollowersDatabase) RemoveFollower(ctx context.Context, f *activitypub.Follower) error

type DocstoreFollowingDatabase

type DocstoreFollowingDatabase struct {
	FollowingDatabase
	// contains filtered or unexported fields
}

func (*DocstoreFollowingDatabase) AddFollowing

func (db *DocstoreFollowingDatabase) AddFollowing(ctx context.Context, f *activitypub.Following) error

func (*DocstoreFollowingDatabase) Close

func (*DocstoreFollowingDatabase) GetFollowing

func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*activitypub.Following, error)

func (*DocstoreFollowingDatabase) GetFollowingForAccount

func (db *DocstoreFollowingDatabase) GetFollowingForAccount(ctx context.Context, account_id int64, following_callback GetFollowingCallbackFunc) error

func (*DocstoreFollowingDatabase) GetFollowingIdsForDateRange

func (db *DocstoreFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowingIdsCallbackFunc) error

func (*DocstoreFollowingDatabase) RemoveFollowing

func (db *DocstoreFollowingDatabase) RemoveFollowing(ctx context.Context, f *activitypub.Following) error

type DocstoreLikesDatabase

type DocstoreLikesDatabase struct {
	LikesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreLikesDatabase) AddLike

func (db *DocstoreLikesDatabase) AddLike(ctx context.Context, like *activitypub.Like) error

func (*DocstoreLikesDatabase) Close

func (db *DocstoreLikesDatabase) Close(ctx context.Context) error

func (*DocstoreLikesDatabase) GetLikeIdsForDateRange

func (db *DocstoreLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error

func (*DocstoreLikesDatabase) GetLikeWithId

func (db *DocstoreLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error)

func (*DocstoreLikesDatabase) GetLikeWithPostIdAndActor

func (db *DocstoreLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Like, error)

func (*DocstoreLikesDatabase) GetLikesForPost

func (db *DocstoreLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error

func (*DocstoreLikesDatabase) RemoveLike

func (db *DocstoreLikesDatabase) RemoveLike(ctx context.Context, like *activitypub.Like) error

type DocstoreMessagesDatabase

type DocstoreMessagesDatabase struct {
	MessagesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreMessagesDatabase) AddMessage

func (db *DocstoreMessagesDatabase) AddMessage(ctx context.Context, message *activitypub.Message) error

func (*DocstoreMessagesDatabase) Close

func (*DocstoreMessagesDatabase) GetMessageIdsForDateRange

func (db *DocstoreMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error

func (*DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds

func (db *DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*activitypub.Message, error)

func (*DocstoreMessagesDatabase) GetMessageWithId

func (db *DocstoreMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*activitypub.Message, error)

func (*DocstoreMessagesDatabase) GetMessagesForAccount

func (db *DocstoreMessagesDatabase) GetMessagesForAccount(ctx context.Context, account_id int64, callback_func GetMessagesCallbackFunc) error

func (*DocstoreMessagesDatabase) GetMessagesForAccountAndAuthor

func (db *DocstoreMessagesDatabase) GetMessagesForAccountAndAuthor(ctx context.Context, account_id int64, author_address string, callback_func GetMessagesCallbackFunc) error

func (*DocstoreMessagesDatabase) RemoveMessage

func (db *DocstoreMessagesDatabase) RemoveMessage(ctx context.Context, message *activitypub.Message) error

func (*DocstoreMessagesDatabase) UpdateMessage

func (db *DocstoreMessagesDatabase) UpdateMessage(ctx context.Context, message *activitypub.Message) error

type DocstoreNotesDatabase

type DocstoreNotesDatabase struct {
	NotesDatabase
	// contains filtered or unexported fields
}

func (*DocstoreNotesDatabase) AddNote

func (db *DocstoreNotesDatabase) AddNote(ctx context.Context, note *activitypub.Note) error

func (*DocstoreNotesDatabase) Close

func (db *DocstoreNotesDatabase) Close(ctx context.Context) error

func (*DocstoreNotesDatabase) GetNoteIdsForDateRange

func (db *DocstoreNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start int64, end int64, cb GetNoteIdsCallbackFunc) error

func (*DocstoreNotesDatabase) GetNoteWithId

func (db *DocstoreNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*activitypub.Note, error)

func (*DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress

func (db *DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, note_uuid string, author_address string) (*activitypub.Note, error)

func (*DocstoreNotesDatabase) RemoveNote

func (db *DocstoreNotesDatabase) RemoveNote(ctx context.Context, note *activitypub.Note) error

func (*DocstoreNotesDatabase) UpdateNote

func (db *DocstoreNotesDatabase) UpdateNote(ctx context.Context, note *activitypub.Note) error

type DocstorePostTagsDatabase

type DocstorePostTagsDatabase struct {
	PostTagsDatabase
	// contains filtered or unexported fields
}

func (*DocstorePostTagsDatabase) AddPostTag

func (db *DocstorePostTagsDatabase) AddPostTag(ctx context.Context, tag *activitypub.PostTag) error

func (*DocstorePostTagsDatabase) Close

func (*DocstorePostTagsDatabase) GetPostTagIdsForDateRange

func (db *DocstorePostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error

func (*DocstorePostTagsDatabase) GetPostTagWithId

func (db *DocstorePostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error)

func (*DocstorePostTagsDatabase) GetPostTagsForAccount

func (db *DocstorePostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error

func (*DocstorePostTagsDatabase) GetPostTagsForName

func (db *DocstorePostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error

func (*DocstorePostTagsDatabase) GetPostTagsForPost

func (db *DocstorePostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error

func (*DocstorePostTagsDatabase) RemovePostTag

func (db *DocstorePostTagsDatabase) RemovePostTag(ctx context.Context, tag *activitypub.PostTag) error

type DocstorePostsDatabase

type DocstorePostsDatabase struct {
	PostsDatabase
	// contains filtered or unexported fields
}

func (*DocstorePostsDatabase) AddPost

func (db *DocstorePostsDatabase) AddPost(ctx context.Context, p *activitypub.Post) error

func (*DocstorePostsDatabase) Close

func (db *DocstorePostsDatabase) Close(ctx context.Context) error

func (*DocstorePostsDatabase) GetPostIdsForDateRange

func (db *DocstorePostsDatabase) GetPostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostIdsCallbackFunc) error

func (*DocstorePostsDatabase) GetPostWithId

func (db *DocstorePostsDatabase) GetPostWithId(ctx context.Context, id int64) (*activitypub.Post, error)

func (*DocstorePostsDatabase) UpdatePost

func (db *DocstorePostsDatabase) UpdatePost(ctx context.Context, p *activitypub.Post) error

type DocstorePropertiesDatabase

type DocstorePropertiesDatabase struct {
	PropertiesDatabase
	// contains filtered or unexported fields
}

func (*DocstorePropertiesDatabase) AddProperty

func (db *DocstorePropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error

func (*DocstorePropertiesDatabase) Close

func (*DocstorePropertiesDatabase) GetProperties

func (*DocstorePropertiesDatabase) GetPropertiesForAccount

func (db *DocstorePropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error

func (*DocstorePropertiesDatabase) RemoveProperty

func (db *DocstorePropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error

func (*DocstorePropertiesDatabase) UpdateProperty

func (db *DocstorePropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error

type FollowersDatabase

type FollowersDatabase interface {
	GetFollowerWithId(context.Context, int64) (*activitypub.Follower, error)
	GetFollowerIdsForDateRange(context.Context, int64, int64, GetFollowerIdsCallbackFunc) error
	GetAllFollowers(context.Context, GetFollowersCallbackFunc) error
	GetFollowersForAccount(context.Context, int64, GetFollowersCallbackFunc) error
	HasFollowers(context.Context, int64) (bool, error)
	GetFollower(context.Context, int64, string) (*activitypub.Follower, error)
	AddFollower(context.Context, *activitypub.Follower) error
	RemoveFollower(context.Context, *activitypub.Follower) error
	Close(context.Context) error
}

func NewDocstoreFollowersDatabase

func NewDocstoreFollowersDatabase(ctx context.Context, uri string) (FollowersDatabase, error)

func NewFollowersDatabase

func NewFollowersDatabase(ctx context.Context, uri string) (FollowersDatabase, error)

NewFollowersDatabase returns a new `FollowersDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `FollowersDatabaseInitializationFunc` function used to instantiate the new `FollowersDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterFollowersDatabase` method.

func NewSQLFollowersDatabase

func NewSQLFollowersDatabase(ctx context.Context, uri string) (FollowersDatabase, error)

type FollowersDatabaseInitializationFunc

type FollowersDatabaseInitializationFunc func(ctx context.Context, uri string) (FollowersDatabase, error)

FollowersDatabaseInitializationFunc is a function defined by individual followers_database package and used to create an instance of that followers_database

type FollowingDatabase

type FollowingDatabase interface {
	GetFollowingIdsForDateRange(context.Context, int64, int64, GetFollowingIdsCallbackFunc) error
	GetFollowingForAccount(context.Context, int64, GetFollowingCallbackFunc) error
	GetFollowing(context.Context, int64, string) (*activitypub.Following, error)
	AddFollowing(context.Context, *activitypub.Following) error
	RemoveFollowing(context.Context, *activitypub.Following) error
	Close(context.Context) error
}

func NewDocstoreFollowingDatabase

func NewDocstoreFollowingDatabase(ctx context.Context, uri string) (FollowingDatabase, error)

func NewFollowingDatabase

func NewFollowingDatabase(ctx context.Context, uri string) (FollowingDatabase, error)

NewFollowingDatabase returns a new `FollowingDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `FollowingDatabaseInitializationFunc` function used to instantiate the new `FollowingDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterFollowingDatabase` method.

func NewSQLFollowingDatabase

func NewSQLFollowingDatabase(ctx context.Context, uri string) (FollowingDatabase, error)

type FollowingDatabaseInitializationFunc

type FollowingDatabaseInitializationFunc func(ctx context.Context, uri string) (FollowingDatabase, error)

FollowingDatabaseInitializationFunc is a function defined by individual following_database package and used to create an instance of that following_database

type GetAccountIdsCallbackFunc

type GetAccountIdsCallbackFunc func(context.Context, int64) error

GetAccountIdsCallbackFunc is a custom function used to process an `activitypub.Account` identifier.

type GetAccountsCallbackFunc

type GetAccountsCallbackFunc func(context.Context, *activitypub.Account) error

GetAccountsCallbackFunc is a custom function used to process an `activitypub.Account` record.

type GetActivitiesCallbackFunc

type GetActivitiesCallbackFunc func(context.Context, *activitypub.Activity) error

type GetAliasesCallbackFunc

type GetAliasesCallbackFunc func(context.Context, *activitypub.Alias) error

type GetBlockIdsCallbackFunc

type GetBlockIdsCallbackFunc func(context.Context, int64) error

type GetBlocksCallbackFunc

type GetBlocksCallbackFunc func(context.Context, *activitypub.Block) error

type GetBoostIdsCallbackFunc

type GetBoostIdsCallbackFunc func(context.Context, int64) error

type GetBoostsCallbackFunc

type GetBoostsCallbackFunc func(context.Context, *activitypub.Boost) error

type GetDeliveriesCallbackFunc

type GetDeliveriesCallbackFunc func(context.Context, *activitypub.Delivery) error

type GetDeliveryIdsCallbackFunc

type GetDeliveryIdsCallbackFunc func(context.Context, int64) error

type GetFollowerIdsCallbackFunc

type GetFollowerIdsCallbackFunc func(context.Context, int64) error

type GetFollowersCallbackFunc

type GetFollowersCallbackFunc func(context.Context, string) error

type GetFollowingCallbackFunc

type GetFollowingCallbackFunc func(context.Context, string) error

type GetFollowingIdsCallbackFunc

type GetFollowingIdsCallbackFunc func(context.Context, int64) error

type GetLikeIdsCallbackFunc

type GetLikeIdsCallbackFunc func(context.Context, int64) error

type GetLikesCallbackFunc

type GetLikesCallbackFunc func(context.Context, *activitypub.Like) error

type GetMessageIdsCallbackFunc

type GetMessageIdsCallbackFunc func(context.Context, int64) error

type GetMessagesCallbackFunc

type GetMessagesCallbackFunc func(context.Context, *activitypub.Message) error

type GetNoteIdsCallbackFunc

type GetNoteIdsCallbackFunc func(context.Context, int64) error

type GetNotesCallbackFunc

type GetNotesCallbackFunc func(context.Context, *activitypub.Note) error

type GetPostIdsCallbackFunc

type GetPostIdsCallbackFunc func(context.Context, int64) error

type GetPostTagIdsCallbackFunc

type GetPostTagIdsCallbackFunc func(context.Context, int64) error

type GetPostTagsCallbackFunc

type GetPostTagsCallbackFunc func(context.Context, *activitypub.PostTag) error

type GetPropertiesCallbackFunc

type GetPropertiesCallbackFunc func(context.Context, *activitypub.Property) error

type LikesDatabase

type LikesDatabase interface {
	GetLikeIdsForDateRange(context.Context, int64, int64, GetLikeIdsCallbackFunc) error
	GetLikesForPost(context.Context, int64, GetLikesCallbackFunc) error
	GetLikeWithPostIdAndActor(context.Context, int64, string) (*activitypub.Like, error)
	GetLikeWithId(context.Context, int64) (*activitypub.Like, error)
	AddLike(context.Context, *activitypub.Like) error
	RemoveLike(context.Context, *activitypub.Like) error
	Close(context.Context) error
}

func NewDocstoreLikesDatabase

func NewDocstoreLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)

func NewLikesDatabase

func NewLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)

NewLikesDatabase returns a new `LikesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `LikesDatabaseInitializationFunc` function used to instantiate the new `LikesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterLikesDatabase` method.

func NewNullLikesDatabase

func NewNullLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)

func NewSQLLikesDatabase

func NewSQLLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)

type LikesDatabaseInitializationFunc

type LikesDatabaseInitializationFunc func(ctx context.Context, uri string) (LikesDatabase, error)

LikesDatabaseInitializationFunc is a function defined by individual like_database package and used to create an instance of that like_database

type MessagesDatabase

type MessagesDatabase interface {
	GetMessageIdsForDateRange(context.Context, int64, int64, GetMessageIdsCallbackFunc) error
	GetMessagesForAccount(context.Context, int64, GetMessagesCallbackFunc) error
	GetMessagesForAccountAndAuthor(context.Context, int64, string, GetMessagesCallbackFunc) error
	GetMessageWithId(context.Context, int64) (*activitypub.Message, error)
	GetMessageWithAccountAndNoteIds(context.Context, int64, int64) (*activitypub.Message, error)
	AddMessage(context.Context, *activitypub.Message) error
	UpdateMessage(context.Context, *activitypub.Message) error
	RemoveMessage(context.Context, *activitypub.Message) error
	Close(context.Context) error
}

func NewDocstoreMessagesDatabase

func NewDocstoreMessagesDatabase(ctx context.Context, uri string) (MessagesDatabase, error)

func NewMessagesDatabase

func NewMessagesDatabase(ctx context.Context, uri string) (MessagesDatabase, error)

NewMessagesDatabase returns a new `MessagesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `MessagesDatabaseInitializationFunc` function used to instantiate the new `MessagesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterMessagesDatabase` method.

func NewSQLMessagesDatabase

func NewSQLMessagesDatabase(ctx context.Context, uri string) (MessagesDatabase, error)

type MessagesDatabaseInitializationFunc

type MessagesDatabaseInitializationFunc func(ctx context.Context, uri string) (MessagesDatabase, error)

MessagesDatabaseInitializationFunc is a function defined by individual messages_database package and used to create an instance of that messages_database

type NotesDatabase

type NotesDatabase interface {
	GetNoteIdsForDateRange(context.Context, int64, int64, GetNoteIdsCallbackFunc) error
	GetNoteWithId(context.Context, int64) (*activitypub.Note, error)
	GetNoteWithUUIDAndAuthorAddress(context.Context, string, string) (*activitypub.Note, error)
	AddNote(context.Context, *activitypub.Note) error
	UpdateNote(context.Context, *activitypub.Note) error
	RemoveNote(context.Context, *activitypub.Note) error
	Close(context.Context) error
}

func NewDocstoreNotesDatabase

func NewDocstoreNotesDatabase(ctx context.Context, uri string) (NotesDatabase, error)

func NewNotesDatabase

func NewNotesDatabase(ctx context.Context, uri string) (NotesDatabase, error)

NewNotesDatabase returns a new `NotesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `NotesDatabaseInitializationFunc` function used to instantiate the new `NotesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterNotesDatabase` method.

func NewSQLNotesDatabase

func NewSQLNotesDatabase(ctx context.Context, uri string) (NotesDatabase, error)

type NotesDatabaseInitializationFunc

type NotesDatabaseInitializationFunc func(ctx context.Context, uri string) (NotesDatabase, error)

NotesDatabaseInitializationFunc is a function defined by individual notes_database package and used to create an instance of that notes_database

type NullAccountsDatabase

type NullAccountsDatabase struct {
	AccountsDatabase
}

func (*NullAccountsDatabase) AddAccount

func (db *NullAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error

func (*NullAccountsDatabase) Close

func (db *NullAccountsDatabase) Close(ctx context.Context) error

func (*NullAccountsDatabase) GetAccountIdsForDateRange

func (db *NullAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error

func (*NullAccountsDatabase) GetAccountWithId

func (db *NullAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error)

func (*NullAccountsDatabase) GetAccountWithName

func (db *NullAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error)

func (*NullAccountsDatabase) GetAccounts

func (*NullAccountsDatabase) RemoveAccount

func (db *NullAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error

func (*NullAccountsDatabase) UpdateAccount

func (db *NullAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error

type NullActivitiesDatabase

type NullActivitiesDatabase struct {
	ActivitiesDatabase
}

func (*NullActivitiesDatabase) AddActivity

func (db *NullActivitiesDatabase) AddActivity(ctx context.Context, f *activitypub.Activity) error

func (*NullActivitiesDatabase) Close

func (*NullActivitiesDatabase) GetActivities

func (*NullActivitiesDatabase) GetActivitiesForAccount

func (db *NullActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error

func (*NullActivitiesDatabase) GetActivityWithActivityPubId

func (db *NullActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error)

func (*NullActivitiesDatabase) GetActivityWithActivityTypeAndId

func (db *NullActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, id int64) (*activitypub.Activity, error)

func (*NullActivitiesDatabase) GetActivityWithId

func (db *NullActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error)

type NullAliasesDatabase

type NullAliasesDatabase struct {
	AliasesDatabase
}

func (*NullAliasesDatabase) AddAlias

func (db *NullAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error

func (*NullAliasesDatabase) Close

func (db *NullAliasesDatabase) Close(ctx context.Context) error

func (*NullAliasesDatabase) GetAliasWithName

func (db *NullAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error)

func (*NullAliasesDatabase) GetAliasesForAccount

func (db *NullAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error

func (*NullAliasesDatabase) RemoveAlias

func (db *NullAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error

type NullBlocksDatabase

type NullBlocksDatabase struct {
	BlocksDatabase
}

func (*NullBlocksDatabase) AddBlock

func (db *NullBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error

func (*NullBlocksDatabase) GetBlockIdsForDateRange

func (db *NullBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error

func (*NullBlocksDatabase) GetBlockWithAccountIdAndAddress

func (db *NullBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error)

func (*NullBlocksDatabase) GetBlockWithId

func (db *NullBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*activitypub.Block, error)

func (*NullBlocksDatabase) IsBlockedByAccount

func (db *NullBlocksDatabase) IsBlockedByAccount(ctx context.Context, account_id int64, host string, name string) (bool, error)

func (*NullBlocksDatabase) RemoveBlock

func (db *NullBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error

func (*NullBlocksDatabase) UpdateBlock

func (db *NullBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error

type NullBoostsDatabase

type NullBoostsDatabase struct {
	BoostsDatabase
}

func (*NullBoostsDatabase) AddBoost

func (db *NullBoostsDatabase) AddBoost(ctx context.Context, boost *activitypub.Boost) error

func (*NullBoostsDatabase) Close

func (db *NullBoostsDatabase) Close(ctx context.Context) error

func (*NullBoostsDatabase) GetBoostIdsForDateRange

func (db *NullBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error

func (*NullBoostsDatabase) GetBoostWithId

func (db *NullBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error)

func (*NullBoostsDatabase) GetBoostWithPostIdAndActor

func (db *NullBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, id int64, actor string) (*activitypub.Boost, error)

func (*NullBoostsDatabase) GetBoostsForAccount

func (db *NullBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error

func (*NullBoostsDatabase) GetBoostsForPost

func (db *NullBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error

func (*NullBoostsDatabase) RemoveBoost

func (db *NullBoostsDatabase) RemoveBoost(ctx context.Context, boost *activitypub.Boost) error

type NullDeliveriesDatabase

type NullDeliveriesDatabase struct {
	DeliveriesDatabase
}

func (*NullDeliveriesDatabase) AddDelivery

func (db *NullDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error

func (*NullDeliveriesDatabase) Close

func (*NullDeliveriesDatabase) GetDeliveries

func (*NullDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient

func (db *NullDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error

func (*NullDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient

func (db *NullDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, cb GetDeliveriesCallbackFunc) error

func (*NullDeliveriesDatabase) GetDeliveryIdsForDateRange

func (db *NullDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error

func (*NullDeliveriesDatabase) GetDeliveryWithId

func (db *NullDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error)

type NullLikesDatabase

type NullLikesDatabase struct {
	LikesDatabase
}

func (*NullLikesDatabase) AddLike

func (db *NullLikesDatabase) AddLike(ctx context.Context, like *activitypub.Like) error

func (*NullLikesDatabase) Close

func (db *NullLikesDatabase) Close(ctx context.Context) error

func (*NullLikesDatabase) GetLikeIdsForDateRange

func (db *NullLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error

func (*NullLikesDatabase) GetLikeWithId

func (db *NullLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error)

func (*NullLikesDatabase) GetLikeWithPostIdAndActor

func (db *NullLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, id int64, actor string) (*activitypub.Like, error)

func (*NullLikesDatabase) GetLikesForPost

func (db *NullLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error

func (*NullLikesDatabase) RemoveLike

func (db *NullLikesDatabase) RemoveLike(ctx context.Context, like *activitypub.Like) error

type NullPostTagsDatabase

type NullPostTagsDatabase struct {
	PostTagsDatabase
}

func (*NullPostTagsDatabase) AddPostTag

func (db *NullPostTagsDatabase) AddPostTag(ctx context.Context, boost *activitypub.PostTag) error

func (*NullPostTagsDatabase) Close

func (db *NullPostTagsDatabase) Close(ctx context.Context) error

func (*NullPostTagsDatabase) GetLikeIdsForDateRange

func (db *NullPostTagsDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error

func (*NullPostTagsDatabase) GetPostTagWithId

func (db *NullPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error)

func (*NullPostTagsDatabase) GetPostTagsForAccount

func (db *NullPostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error

func (*NullPostTagsDatabase) GetPostTagsForName

func (db *NullPostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error

func (*NullPostTagsDatabase) GetPostTagsForPost

func (db *NullPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error

func (*NullPostTagsDatabase) RemovePostTag

func (db *NullPostTagsDatabase) RemovePostTag(ctx context.Context, boost *activitypub.PostTag) error

type NullPropertiesDatabase

type NullPropertiesDatabase struct {
	PropertiesDatabase
}

func (*NullPropertiesDatabase) AddProperty

func (db *NullPropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error

func (*NullPropertiesDatabase) Close

func (*NullPropertiesDatabase) GetProperties

func (*NullPropertiesDatabase) GetPropertiesForAccount

func (db *NullPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error

func (*NullPropertiesDatabase) RemoveProperty

func (db *NullPropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error

func (*NullPropertiesDatabase) UpdateProperty

func (db *NullPropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error

type PostTagsDatabase

type PostTagsDatabase interface {
	GetPostTagIdsForDateRange(context.Context, int64, int64, GetPostTagIdsCallbackFunc) error
	GetPostTagsForName(context.Context, string, GetPostTagsCallbackFunc) error
	GetPostTagsForAccount(context.Context, int64, GetPostTagsCallbackFunc) error
	GetPostTagsForPost(context.Context, int64, GetPostTagsCallbackFunc) error
	GetPostTagWithId(context.Context, int64) (*activitypub.PostTag, error)
	AddPostTag(context.Context, *activitypub.PostTag) error
	RemovePostTag(context.Context, *activitypub.PostTag) error
	Close(context.Context) error
}

func NewDocstorePostTagsDatabase

func NewDocstorePostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)

func NewNullPostTagsDatabase

func NewNullPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)

func NewPostTagsDatabase

func NewPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)

NewPostTagsDatabase returns a new `PostTagsDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `PostTagsDatabaseInitializationFunc` function used to instantiate the new `PostTagsDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterPostTagsDatabase` method.

func NewSQLPostTagsDatabase

func NewSQLPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)

type PostTagsDatabaseInitializationFunc

type PostTagsDatabaseInitializationFunc func(ctx context.Context, uri string) (PostTagsDatabase, error)

PostTagsDatabaseInitializationFunc is a function defined by individual post_tags_database package and used to create an instance of that post_tags_database

type PostsDatabase

type PostsDatabase interface {
	GetPostIdsForDateRange(context.Context, int64, int64, GetPostIdsCallbackFunc) error
	GetPostWithId(context.Context, int64) (*activitypub.Post, error)
	AddPost(context.Context, *activitypub.Post) error
	RemovePost(context.Context, *activitypub.Post) error
	UpdatePost(context.Context, *activitypub.Post) error
	Close(context.Context) error
}

func NewDocstorePostsDatabase

func NewDocstorePostsDatabase(ctx context.Context, uri string) (PostsDatabase, error)

func NewPostsDatabase

func NewPostsDatabase(ctx context.Context, uri string) (PostsDatabase, error)

NewPostsDatabase returns a new `PostsDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `PostsDatabaseInitializationFunc` function used to instantiate the new `PostsDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterPostsDatabase` method.

func NewSQLPostsDatabase

func NewSQLPostsDatabase(ctx context.Context, uri string) (PostsDatabase, error)

type PostsDatabaseInitializationFunc

type PostsDatabaseInitializationFunc func(ctx context.Context, uri string) (PostsDatabase, error)

PostsDatabaseInitializationFunc is a function defined by individual post_database package and used to create an instance of that post_database

type PropertiesDatabase

type PropertiesDatabase interface {
	GetProperties(context.Context, GetPropertiesCallbackFunc) error
	GetPropertiesForAccount(context.Context, int64, GetPropertiesCallbackFunc) error
	AddProperty(context.Context, *activitypub.Property) error
	UpdateProperty(context.Context, *activitypub.Property) error
	RemoveProperty(context.Context, *activitypub.Property) error
	Close(context.Context) error
}

func NewDocstorePropertiesDatabase

func NewDocstorePropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)

func NewNullPropertiesDatabase

func NewNullPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)

func NewPropertiesDatabase

func NewPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)

NewPropertiesDatabase returns a new `PropertiesDatabase` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `PropertiesDatabaseInitializationFunc` function used to instantiate the new `PropertiesDatabase`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterPropertiesDatabase` method.

func NewSQLPropertiesDatabase

func NewSQLPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)

type PropertiesDatabaseInitializationFunc

type PropertiesDatabaseInitializationFunc func(ctx context.Context, uri string) (PropertiesDatabase, error)

PropertiesDatabaseInitializationFunc is a function defined by individual properties_database package and used to create an instance of that properties_database

type SQLAccountsDatabase

type SQLAccountsDatabase struct {
	AccountsDatabase
	// contains filtered or unexported fields
}

func (*SQLAccountsDatabase) AddAccount

func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error

func (*SQLAccountsDatabase) Close

func (db *SQLAccountsDatabase) Close(ctx context.Context) error

func (*SQLAccountsDatabase) GetAccountIdsForDateRange

func (db *SQLAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error

func (*SQLAccountsDatabase) GetAccountWithId

func (db *SQLAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error)

func (*SQLAccountsDatabase) GetAccountWithName

func (db *SQLAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error)

func (*SQLAccountsDatabase) GetAccounts

func (*SQLAccountsDatabase) RemoveAccount

func (db *SQLAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error

func (*SQLAccountsDatabase) UpdateAccount

func (db *SQLAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error

type SQLActivitiesDatabase

type SQLActivitiesDatabase struct {
	ActivitiesDatabase
	// contains filtered or unexported fields
}

func (*SQLActivitiesDatabase) AddActivity

func (db *SQLActivitiesDatabase) AddActivity(ctx context.Context, a *activitypub.Activity) error

func (*SQLActivitiesDatabase) Close

func (db *SQLActivitiesDatabase) Close(ctx context.Context) error

func (*SQLActivitiesDatabase) GetActivities

func (*SQLActivitiesDatabase) GetActivitiesForAccount

func (db *SQLActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error

func (*SQLActivitiesDatabase) GetActivityWithActivityPubId

func (db *SQLActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error)

func (*SQLActivitiesDatabase) GetActivityWithActivityTypeAndId

func (db *SQLActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, activity_type_id int64) (*activitypub.Activity, error)

func (*SQLActivitiesDatabase) GetActivityWithId

func (db *SQLActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error)

type SQLAliasesDatabase

type SQLAliasesDatabase struct {
	AliasesDatabase
	// contains filtered or unexported fields
}

func (*SQLAliasesDatabase) AddAlias

func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error

func (*SQLAliasesDatabase) Close

func (db *SQLAliasesDatabase) Close(ctx context.Context) error

func (*SQLAliasesDatabase) GetAliasWithName

func (db *SQLAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error)

func (*SQLAliasesDatabase) GetAliasesForAccount

func (db *SQLAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error

func (*SQLAliasesDatabase) RemoveAlias

func (db *SQLAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error

type SQLBlocksDatabase

type SQLBlocksDatabase struct {
	BlocksDatabase
	// contains filtered or unexported fields
}

func (*SQLBlocksDatabase) AddBlock

func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error

func (*SQLBlocksDatabase) Close

func (db *SQLBlocksDatabase) Close(ctx context.Context) error

func (*SQLBlocksDatabase) GetBlockIdsForDateRange

func (db *SQLBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error

func (*SQLBlocksDatabase) GetBlockWithAccountIdAndAddress

func (db *SQLBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error)

func (*SQLBlocksDatabase) GetBlockWithId

func (db *SQLBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*activitypub.Block, error)

func (*SQLBlocksDatabase) RemoveBlock

func (db *SQLBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error

func (*SQLBlocksDatabase) UpdateBlock

func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error

type SQLBoostsDatabase

type SQLBoostsDatabase struct {
	BoostsDatabase
	// contains filtered or unexported fields
}

func (*SQLBoostsDatabase) AddBoost

func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *activitypub.Boost) error

func (*SQLBoostsDatabase) Close

func (db *SQLBoostsDatabase) Close(ctx context.Context) error

func (*SQLBoostsDatabase) GetBoostWithId

func (db *SQLBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error)

func (*SQLBoostsDatabase) GetBoostWithPostIdAndActor

func (db *SQLBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Boost, error)

func (*SQLBoostsDatabase) GetBoostsForAccount

func (db *SQLBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error

func (*SQLBoostsDatabase) GetBoostsForPostIdAndActor

func (db *SQLBoostsDatabase) GetBoostsForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetBoostsCallbackFunc) error

func (*SQLBoostsDatabase) GetBoostsForPosts

func (db *SQLBoostsDatabase) GetBoostsForPosts(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error

func (*SQLBoostsDatabase) RemoveBoost

func (db *SQLBoostsDatabase) RemoveBoost(ctx context.Context, b *activitypub.Boost) error

type SQLDeliveriesDatabase

type SQLDeliveriesDatabase struct {
	DeliveriesDatabase
	// contains filtered or unexported fields
}

func (*SQLDeliveriesDatabase) AddDelivery

func (db *SQLDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error

func (*SQLDeliveriesDatabase) Close

func (db *SQLDeliveriesDatabase) Close(ctx context.Context) error

func (*SQLDeliveriesDatabase) GetDeliveries

func (*SQLDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient

func (db *SQLDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error

func (*SQLDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient

func (db *SQLDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activitypub_id string, recipient string, cb GetDeliveriesCallbackFunc) error

func (*SQLDeliveriesDatabase) GetDeliveryIdsForDateRange

func (db *SQLDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error

func (*SQLDeliveriesDatabase) GetDeliveryWithId

func (db *SQLDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error)

type SQLFollowersDatabase

type SQLFollowersDatabase struct {
	FollowersDatabase
	// contains filtered or unexported fields
}

func (*SQLFollowersDatabase) AddFollower

func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *activitypub.Follower) error

func (*SQLFollowersDatabase) Close

func (db *SQLFollowersDatabase) Close(ctx context.Context) error

func (*SQLFollowersDatabase) GetAllFollowers

func (db *SQLFollowersDatabase) GetAllFollowers(ctx context.Context, followers_callback GetFollowersCallbackFunc) error

func (*SQLFollowersDatabase) GetFollower

func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*activitypub.Follower, error)

func (*SQLFollowersDatabase) GetFollowerIdsForDateRange

func (db *SQLFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error

func (*SQLFollowersDatabase) GetFollowerWithId added in v0.0.3

func (db *SQLFollowersDatabase) GetFollowerWithId(ctx context.Context, follower_id int64) (*activitypub.Follower, error)

func (*SQLFollowersDatabase) GetFollowersForAccount

func (db *SQLFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, followers_callback GetFollowersCallbackFunc) error

func (*SQLFollowersDatabase) HasFollower

func (db *SQLFollowersDatabase) HasFollower(ctx context.Context, account_id int64, follower_address string) (bool, error)

func (*SQLFollowersDatabase) RemoveFollower

func (db *SQLFollowersDatabase) RemoveFollower(ctx context.Context, f *activitypub.Follower) error

type SQLFollowingDatabase

type SQLFollowingDatabase struct {
	FollowingDatabase
	// contains filtered or unexported fields
}

func (*SQLFollowingDatabase) AddFollowing

func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *activitypub.Following) error

func (*SQLFollowingDatabase) Close

func (db *SQLFollowingDatabase) Close(ctx context.Context) error

func (*SQLFollowingDatabase) GetFollowing

func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*activitypub.Following, error)

func (*SQLFollowingDatabase) GetFollowingForAccount

func (db *SQLFollowingDatabase) GetFollowingForAccount(ctx context.Context, account_id int64, following_callback GetFollowingCallbackFunc) error

func (*SQLFollowingDatabase) GetFollowingIdsForDateRange

func (db *SQLFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowingIdsCallbackFunc) error

func (*SQLFollowingDatabase) RemoveFollowing

func (db *SQLFollowingDatabase) RemoveFollowing(ctx context.Context, f *activitypub.Following) error

type SQLLikesDatabase

type SQLLikesDatabase struct {
	LikesDatabase
	// contains filtered or unexported fields
}

func (*SQLLikesDatabase) AddLike

func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *activitypub.Like) error

func (*SQLLikesDatabase) Close

func (db *SQLLikesDatabase) Close(ctx context.Context) error

func (*SQLLikesDatabase) GetLikeIdsForDateRange

func (db *SQLLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error

func (*SQLLikesDatabase) GetLikeWithId

func (db *SQLLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error)

func (*SQLLikesDatabase) GetLikeWithPostIdAndActor

func (db *SQLLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Like, error)

func (*SQLLikesDatabase) GetLikesForPostIdAndActor

func (db *SQLLikesDatabase) GetLikesForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetLikesCallbackFunc) error

func (*SQLLikesDatabase) RemoveLike

func (db *SQLLikesDatabase) RemoveLike(ctx context.Context, b *activitypub.Like) error

type SQLMessagesDatabase

type SQLMessagesDatabase struct {
	MessagesDatabase
	// contains filtered or unexported fields
}

func (*SQLMessagesDatabase) AddMessage

func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *activitypub.Message) error

func (*SQLMessagesDatabase) Close

func (db *SQLMessagesDatabase) Close(ctx context.Context) error

func (*SQLMessagesDatabase) GetMessageIdsForDateRange

func (db *SQLMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error

func (*SQLMessagesDatabase) GetMessageWithAccountAndNoteIds

func (db *SQLMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*activitypub.Message, error)

func (*SQLMessagesDatabase) GetMessageWithId

func (db *SQLMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*activitypub.Message, error)

func (*SQLMessagesDatabase) GetMessagesForAccount

func (db *SQLMessagesDatabase) GetMessagesForAccount(ctx context.Context, account_id int64, callback_func GetMessagesCallbackFunc) error

func (*SQLMessagesDatabase) GetMessagesForAccountAndAuthor

func (db *SQLMessagesDatabase) GetMessagesForAccountAndAuthor(ctx context.Context, account_id int64, author_address string, callback_func GetMessagesCallbackFunc) error

func (*SQLMessagesDatabase) RemoveMessage

func (db *SQLMessagesDatabase) RemoveMessage(ctx context.Context, message *activitypub.Message) error

func (*SQLMessagesDatabase) UpdateMessage

func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *activitypub.Message) error

type SQLNotesDatabase

type SQLNotesDatabase struct {
	NotesDatabase
	// contains filtered or unexported fields
}

func (*SQLNotesDatabase) AddNote

func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *activitypub.Note) error

func (*SQLNotesDatabase) Close

func (db *SQLNotesDatabase) Close(ctx context.Context) error

func (*SQLNotesDatabase) GetNoteIdsForDateRange

func (db *SQLNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start int64, end int64, cb GetNoteIdsCallbackFunc) error

func (*SQLNotesDatabase) GetNoteWithId

func (db *SQLNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*activitypub.Note, error)

func (*SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress

func (db *SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, uuid string, author_address string) (*activitypub.Note, error)

func (*SQLNotesDatabase) RemoveNote

func (db *SQLNotesDatabase) RemoveNote(ctx context.Context, note *activitypub.Note) error

func (*SQLNotesDatabase) UpdateNote

func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *activitypub.Note) error

type SQLPostTagsDatabase

type SQLPostTagsDatabase struct {
	PostTagsDatabase
	// contains filtered or unexported fields
}

func (*SQLPostTagsDatabase) AddPostTag

func (db *SQLPostTagsDatabase) AddPostTag(ctx context.Context, post_tag *activitypub.PostTag) error

func (*SQLPostTagsDatabase) Close

func (db *SQLPostTagsDatabase) Close(ctx context.Context) error

func (*SQLPostTagsDatabase) GetPostTagIdsForDateRange

func (db *SQLPostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error

func (*SQLPostTagsDatabase) GetPostTagWithId

func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error)

func (*SQLPostTagsDatabase) GetPostTagsForAccount

func (db *SQLPostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error

func (*SQLPostTagsDatabase) GetPostTagsForName

func (db *SQLPostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error

func (*SQLPostTagsDatabase) GetPostTagsForPost

func (db *SQLPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error

func (*SQLPostTagsDatabase) RemovePostTag

func (db *SQLPostTagsDatabase) RemovePostTag(ctx context.Context, post_tag *activitypub.PostTag) error

type SQLPostsDatabase

type SQLPostsDatabase struct {
	PostsDatabase
	// contains filtered or unexported fields
}

func (*SQLPostsDatabase) AddPost

func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *activitypub.Post) error

func (*SQLPostsDatabase) Close

func (db *SQLPostsDatabase) Close(ctx context.Context) error

func (*SQLPostsDatabase) GetPostIdsForDateRange

func (db *SQLPostsDatabase) GetPostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostIdsCallbackFunc) error

func (*SQLPostsDatabase) GetPostWithId

func (db *SQLPostsDatabase) GetPostWithId(ctx context.Context, id int64) (*activitypub.Post, error)

type SQLPropertiesDatabase

type SQLPropertiesDatabase struct {
	PropertiesDatabase
	// contains filtered or unexported fields
}

func (*SQLPropertiesDatabase) AddProperty

func (db *SQLPropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error

func (*SQLPropertiesDatabase) Close

func (db *SQLPropertiesDatabase) Close(ctx context.Context) error

func (*SQLPropertiesDatabase) GetProperties

func (*SQLPropertiesDatabase) GetPropertiesForAccount

func (db *SQLPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error

func (*SQLPropertiesDatabase) RemoveProperty

func (db *SQLPropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error

func (*SQLPropertiesDatabase) UpdateProperty

func (db *SQLPropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error

type SlogDeliveriesDatabase

type SlogDeliveriesDatabase struct {
	DeliveriesDatabase
	// contains filtered or unexported fields
}

func (*SlogDeliveriesDatabase) AddDelivery

func (db *SlogDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error

func (*SlogDeliveriesDatabase) Close

func (*SlogDeliveriesDatabase) GetDeliveries

func (*SlogDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient

func (db *SlogDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error

func (*SlogDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient

func (db *SlogDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, cb GetDeliveriesCallbackFunc) error

func (*SlogDeliveriesDatabase) GetDeliveryIdsForDateRange

func (db *SlogDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error

func (*SlogDeliveriesDatabase) GetDeliveryWithId

func (db *SlogDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL