Documentation ¶
Index ¶
- Constants
- Variables
- func AccountsDatabaseSchemes() []string
- func AddFollower(ctx context.Context, db FollowersDatabase, account_id int64, ...) error
- func AddFollowing(ctx context.Context, db FollowingDatabase, account_id int64, ...) error
- func AddPost(ctx context.Context, opts *AddPostOptions, acct *Account, body string) (*Post, []*PostTag, error)
- func AliasesDatabaseSchemes() []string
- func ApplyPropertiesUpdates(ctx context.Context, properties_db PropertiesDatabase, acct *Account, ...) (int, int, error)
- func BlocksDatabaseSchemes() []string
- func BoostsDatabaseSchemes() []string
- func CountFollowers(ctx context.Context, db FollowersDatabase, account_id int64) (uint32, error)
- func CountFollowing(ctx context.Context, db FollowingDatabase, account_id int64) (uint32, error)
- func DefaultLimitedReader(r io.Reader) io.Reader
- func DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
- func DeliverPostToFollowers(ctx context.Context, opts *DeliverPostToFollowersOptions) error
- func DeliveriesDatabaseSchemes() []string
- func DeliveryQueueSchemes() []string
- func DerivePropertiesUpdates(ctx context.Context, acct *Account, props_lookup map[string]*Property, ...) ([]*Property, []*Property, error)
- func FollowersDatabaseSchemes() []string
- func FollowingDatabaseSchemes() []string
- func IsAccountNameTaken(ctx context.Context, accounts_db AccountsDatabase, name string) (bool, error)
- func IsAliasNameTaken(ctx context.Context, aliases_db AliasesDatabase, name string) (bool, error)
- func IsBlockedByAccount(ctx context.Context, db BlocksDatabase, account_id int64, host string, ...) (bool, error)
- func LikesDatabaseSchemes() []string
- func MessagesDatabaseSchemes() []string
- func NewLimitedReader(r io.Reader, n int64) io.Reader
- func NoteFromPost(ctx context.Context, uris_table *uris.URIs, acct *Account, post *Post, ...) (*ap.Note, error)
- func NotesDatabaseSchemes() []string
- func ParseAddress(addr string) (string, string, error)
- func ParseAddressFromRequest(req *http.Request) (string, string, error)
- func ParseAddressesFromString(body string) ([]string, error)
- func PostTagsDatabaseSchemes() []string
- func PostToAccount(ctx context.Context, opts *PostToAccountOptions) (string, error)
- func PostToInbox(ctx context.Context, opts *PostToInboxOptions) error
- func PostsDatabaseSchemes() []string
- func ProcessMessageQueueSchemes() []string
- func PropertiesDatabaseSchemes() []string
- func PropertiesMapForAccount(ctx context.Context, properties_db PropertiesDatabase, acct *Account) (map[string]*Property, error)
- func RegisterAccountsDatabase(ctx context.Context, scheme string, ...) error
- func RegisterAliasesDatabase(ctx context.Context, scheme string, ...) error
- func RegisterBlocksDatabase(ctx context.Context, scheme string, init_func BlocksDatabaseInitializationFunc) error
- func RegisterBoostsDatabase(ctx context.Context, scheme string, init_func BoostsDatabaseInitializationFunc) error
- func RegisterDeliveriesDatabase(ctx context.Context, scheme string, ...) error
- func RegisterDeliveryQueue(ctx context.Context, scheme string, init_func DeliveryQueueInitializationFunc) error
- func RegisterFollowersDatabase(ctx context.Context, scheme string, ...) error
- func RegisterFollowingDatabase(ctx context.Context, scheme string, ...) error
- func RegisterLikesDatabase(ctx context.Context, scheme string, init_func LikesDatabaseInitializationFunc) error
- func RegisterMessagesDatabase(ctx context.Context, scheme string, ...) error
- func RegisterNotesDatabase(ctx context.Context, scheme string, init_func NotesDatabaseInitializationFunc) error
- func RegisterPostTagsDatabase(ctx context.Context, scheme string, ...) error
- func RegisterPostsDatabase(ctx context.Context, scheme string, init_func PostsDatabaseInitializationFunc) error
- func RegisterProcessMessageQueue(ctx context.Context, scheme string, ...) error
- func RegisterPropertiesDatabase(ctx context.Context, scheme string, ...) error
- func RetrieveActor(ctx context.Context, id string, insecure bool) (*ap.Actor, error)
- type Account
- func (a *Account) AccountURL(ctx context.Context, uris_table *uris.URIs) *url.URL
- func (a *Account) Address(hostname string) string
- func (a *Account) FollowersResource(ctx context.Context, uris_table *uris.URIs, ...) (*ap.Followers, error)
- func (a *Account) FollowingResource(ctx context.Context, uris_table *uris.URIs, ...) (*ap.Following, error)
- func (a *Account) InboxURL(ctx context.Context, uris_table *uris.URIs) *url.URL
- func (a *Account) OutboxURL(ctx context.Context, uris_table *uris.URIs) *url.URL
- func (a *Account) PostURL(ctx context.Context, uris_table *uris.URIs, post *Post) *url.URL
- func (a *Account) PrivateKey(ctx context.Context) (string, error)
- func (a *Account) PrivateKeyRSA(ctx context.Context) (*rsa.PrivateKey, error)
- func (a *Account) ProfileResource(ctx context.Context, uris_table *uris.URIs) (*ap.Actor, error)
- func (a *Account) ProfileURL(ctx context.Context, uris_table *uris.URIs) *url.URL
- func (a *Account) PublicKey(ctx context.Context) (string, error)
- func (a *Account) PublicKeyRSA(ctx context.Context) (*rsa.PublicKey, error)
- func (a *Account) String() string
- func (a *Account) WebfingerResource(ctx context.Context, uris_table *uris.URIs) (*webfinger.Resource, error)
- func (a *Account) WebfingerURL(ctx context.Context, uris_table *uris.URIs) *url.URL
- type AccountType
- type AccountsDatabase
- func NewAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)
- func NewDocstoreAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)
- func NewNullAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)
- func NewSQLAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error)
- type AccountsDatabaseInitializationFunc
- type AddPostOptions
- type Alias
- type AliasesDatabase
- func NewAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)
- func NewDocstoreAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)
- func NewNullAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)
- func NewSQLAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error)
- type AliasesDatabaseInitializationFunc
- type Block
- type BlocksDatabase
- func NewBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)
- func NewDocstoreBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)
- func NewNullBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)
- func NewSQLBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error)
- type BlocksDatabaseInitializationFunc
- type Boost
- type BoostsDatabase
- func NewBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)
- func NewDocstoreBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)
- func NewNullBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)
- func NewSQLBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error)
- type BoostsDatabaseInitializationFunc
- type DeliverPostOptions
- type DeliverPostToFollowersOptions
- type DeliveriesDatabase
- func NewDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)
- func NewDocstoreDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)
- func NewNullDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)
- func NewSQLDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)
- func NewSlogDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error)
- type DeliveriesDatabaseInitializationFunc
- type Delivery
- type DeliveryQueue
- func NewDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- type DeliveryQueueInitializationFunc
- type DocstoreAccountsDatabase
- func (db *DocstoreAccountsDatabase) AddAccount(ctx context.Context, a *Account) error
- func (db *DocstoreAccountsDatabase) Close(ctx context.Context) error
- func (db *DocstoreAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error
- func (db *DocstoreAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error)
- func (db *DocstoreAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error)
- func (db *DocstoreAccountsDatabase) GetAccounts(ctx context.Context, cb GetAccountsCallbackFunc) error
- func (db *DocstoreAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
- func (db *DocstoreAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
- type DocstoreAliasesDatabase
- func (db *DocstoreAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
- func (db *DocstoreAliasesDatabase) Close(ctx context.Context) error
- func (db *DocstoreAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error)
- func (db *DocstoreAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error
- func (db *DocstoreAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error
- type DocstoreBlocksDatabase
- func (db *DocstoreBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
- func (db *DocstoreBlocksDatabase) Close(ctx context.Context) error
- func (db *DocstoreBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
- func (db *DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error)
- func (db *DocstoreBlocksDatabase) GetBlockWithId(ctx context.Context, id int64) (*Block, error)
- func (db *DocstoreBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
- func (db *DocstoreBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
- type DocstoreBoostsDatabase
- func (db *DocstoreBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error
- func (db *DocstoreBoostsDatabase) Close(ctx context.Context) error
- func (db *DocstoreBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error
- func (db *DocstoreBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error)
- func (db *DocstoreBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Boost, error)
- func (db *DocstoreBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error
- func (db *DocstoreBoostsDatabase) RemoveBoost(ctx context.Context, boost *Boost) error
- type DocstoreDeliveriesDatabase
- func (db *DocstoreDeliveriesDatabase) AddDelivery(ctx context.Context, f *Delivery) error
- func (db *DocstoreDeliveriesDatabase) Close(ctx context.Context) error
- func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, ...) error
- func (db *DocstoreDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error
- func (db *DocstoreDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error)
- type DocstoreFollowersDatabase
- func (db *DocstoreFollowersDatabase) AddFollower(ctx context.Context, f *Follower) error
- func (db *DocstoreFollowersDatabase) Close(ctx context.Context) error
- func (db *DocstoreFollowersDatabase) GetAllFollowers(ctx context.Context, cb GetFollowersCallbackFunc) error
- func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error)
- func (db *DocstoreFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error
- func (db *DocstoreFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, cb GetFollowersCallbackFunc) error
- func (db *DocstoreFollowersDatabase) HasFollowers(ctx context.Context, account_id int64) (bool, error)
- func (db *DocstoreFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error
- type DocstoreFollowingDatabase
- func (db *DocstoreFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error
- func (db *DocstoreFollowingDatabase) Close(ctx context.Context) error
- func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error)
- func (db *DocstoreFollowingDatabase) GetFollowingForAccount(ctx context.Context, account_id int64, ...) error
- func (db *DocstoreFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowingIdsCallbackFunc) error
- func (db *DocstoreFollowingDatabase) RemoveFollowing(ctx context.Context, f *Following) error
- type DocstoreLikesDatabase
- func (db *DocstoreLikesDatabase) AddLike(ctx context.Context, like *Like) error
- func (db *DocstoreLikesDatabase) Close(ctx context.Context) error
- func (db *DocstoreLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error
- func (db *DocstoreLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error)
- func (db *DocstoreLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Like, error)
- func (db *DocstoreLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error
- func (db *DocstoreLikesDatabase) RemoveLike(ctx context.Context, like *Like) error
- type DocstoreMessagesDatabase
- func (db *DocstoreMessagesDatabase) AddMessage(ctx context.Context, message *Message) error
- func (db *DocstoreMessagesDatabase) Close(ctx context.Context) error
- func (db *DocstoreMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error
- func (db *DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*Message, error)
- func (db *DocstoreMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*Message, error)
- func (db *DocstoreMessagesDatabase) GetMessagesForAccount(ctx context.Context, account_id int64, callback_func GetMessagesCallbackFunc) error
- func (db *DocstoreMessagesDatabase) GetMessagesForAccountAndAuthor(ctx context.Context, account_id int64, author_address string, ...) error
- func (db *DocstoreMessagesDatabase) RemoveMessage(ctx context.Context, message *Message) error
- func (db *DocstoreMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error
- type DocstoreNotesDatabase
- func (db *DocstoreNotesDatabase) AddNote(ctx context.Context, note *Note) error
- func (db *DocstoreNotesDatabase) Close(ctx context.Context) error
- func (db *DocstoreNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start int64, end int64, cb GetNoteIdsCallbackFunc) error
- func (db *DocstoreNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*Note, error)
- func (db *DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, note_uuid string, author_address string) (*Note, error)
- func (db *DocstoreNotesDatabase) RemoveNote(ctx context.Context, note *Note) error
- func (db *DocstoreNotesDatabase) UpdateNote(ctx context.Context, note *Note) error
- type DocstorePostTagsDatabase
- func (db *DocstorePostTagsDatabase) AddPostTag(ctx context.Context, tag *PostTag) error
- func (db *DocstorePostTagsDatabase) Close(ctx context.Context) error
- func (db *DocstorePostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error
- func (db *DocstorePostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error)
- func (db *DocstorePostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error
- func (db *DocstorePostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error
- func (db *DocstorePostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error
- func (db *DocstorePostTagsDatabase) RemovePostTag(ctx context.Context, tag *PostTag) error
- type DocstorePostsDatabase
- func (db *DocstorePostsDatabase) AddPost(ctx context.Context, p *Post) error
- func (db *DocstorePostsDatabase) Close(ctx context.Context) error
- func (db *DocstorePostsDatabase) GetPostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostIdsCallbackFunc) error
- func (db *DocstorePostsDatabase) GetPostWithId(ctx context.Context, id int64) (*Post, error)
- type DocstorePropertiesDatabase
- func (db *DocstorePropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
- func (db *DocstorePropertiesDatabase) Close(ctx context.Context) error
- func (db *DocstorePropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
- func (db *DocstorePropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error
- func (db *DocstorePropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error
- func (db *DocstorePropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
- type Follower
- func GetFollower(ctx context.Context, db FollowersDatabase, account_id int64, ...) (*Follower, error)
- func IsFollower(ctx context.Context, db FollowersDatabase, account_id int64, ...) (bool, *Follower, error)
- func NewFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error)
- type FollowersDatabase
- type FollowersDatabaseInitializationFunc
- type Following
- func GetFollowing(ctx context.Context, db FollowingDatabase, account_id int64, ...) (*Following, error)
- func IsFollowing(ctx context.Context, db FollowingDatabase, account_id int64, ...) (bool, *Following, error)
- func NewFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error)
- type FollowingDatabase
- type FollowingDatabaseInitializationFunc
- type GetAccountIdsCallbackFunc
- type GetAccountsCallbackFunc
- type GetAliasesCallbackFunc
- type GetBlockIdsCallbackFunc
- type GetBlocksCallbackFunc
- type GetBoostIdsCallbackFunc
- type GetBoostsCallbackFunc
- type GetDeliveriesCallbackFunc
- type GetDeliveriesQuery
- type GetDeliveryIdsCallbackFunc
- type GetFollowerIdsCallbackFunc
- type GetFollowersCallbackFunc
- type GetFollowingCallbackFunc
- type GetFollowingIdsCallbackFunc
- type GetLikeIdsCallbackFunc
- type GetLikesCallbackFunc
- type GetMessageIdsCallbackFunc
- type GetMessagesCallbackFunc
- type GetNoteIdsCallbackFunc
- type GetNotesCallbackFunc
- type GetPostIdsCallbackFunc
- type GetPostTagIdsCallbackFunc
- type GetPostTagsCallbackFunc
- type GetPropertiesCallbackFunc
- type Like
- type LikesDatabase
- func NewDocstoreLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)
- func NewLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)
- func NewNullLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)
- func NewSQLLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error)
- type LikesDatabaseInitializationFunc
- type Message
- func AddMessage(ctx context.Context, db MessagesDatabase, account_id int64, note_id int64, ...) (*Message, error)
- func GetMessage(ctx context.Context, db MessagesDatabase, account_id int64, note_id int64) (*Message, error)
- func NewMessage(ctx context.Context, account_id int64, note_id int64, author_address string) (*Message, error)
- func UpdateMessage(ctx context.Context, db MessagesDatabase, m *Message) (*Message, error)
- type MessagesDatabase
- type MessagesDatabaseInitializationFunc
- type Note
- type NotesDatabase
- type NotesDatabaseInitializationFunc
- type NullAccountsDatabase
- func (db *NullAccountsDatabase) AddAccount(ctx context.Context, a *Account) error
- func (db *NullAccountsDatabase) Close(ctx context.Context) error
- func (db *NullAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error
- func (db *NullAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error)
- func (db *NullAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error)
- func (db *NullAccountsDatabase) GetAccounts(ctx context.Context, cb GetAccountsCallbackFunc) error
- func (db *NullAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
- func (db *NullAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
- type NullAliasesDatabase
- func (db *NullAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
- func (db *NullAliasesDatabase) Close(ctx context.Context) error
- func (db *NullAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error)
- func (db *NullAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error
- func (db *NullAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error
- type NullBlocksDatabase
- func (db *NullBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
- func (db *NullBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
- func (db *NullBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error)
- func (db *NullBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*Block, error)
- func (db *NullBlocksDatabase) IsBlockedByAccount(ctx context.Context, account_id int64, host string, name string) (bool, error)
- func (db *NullBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
- func (db *NullBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
- type NullBoostsDatabase
- func (db *NullBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error
- func (db *NullBoostsDatabase) Close(ctx context.Context) error
- func (db *NullBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error
- func (db *NullBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error)
- func (db *NullBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, id int64, actor string) (*Boost, error)
- func (db *NullBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error
- func (db *NullBoostsDatabase) RemoveBoost(ctx context.Context, boost *Boost) error
- type NullDeliveriesDatabase
- func (db *NullDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error
- func (db *NullDeliveriesDatabase) Close(ctx context.Context) error
- func (db *NullDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, ...) error
- func (db *NullDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error)
- type NullDeliveryQueue
- type NullLikesDatabase
- func (db *NullLikesDatabase) AddLike(ctx context.Context, like *Like) error
- func (db *NullLikesDatabase) Close(ctx context.Context) error
- func (db *NullLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error
- func (db *NullLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error)
- func (db *NullLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, id int64, actor string) (*Like, error)
- func (db *NullLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error
- func (db *NullLikesDatabase) RemoveLike(ctx context.Context, like *Like) error
- type NullPostTagsDatabase
- func (db *NullPostTagsDatabase) AddPostTag(ctx context.Context, boost *PostTag) error
- func (db *NullPostTagsDatabase) Close(ctx context.Context) error
- func (db *NullPostTagsDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error
- func (db *NullPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error)
- func (db *NullPostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error
- func (db *NullPostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error
- func (db *NullPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error
- func (db *NullPostTagsDatabase) RemovePostTag(ctx context.Context, boost *PostTag) error
- type NullProcessMessageQueue
- type NullPropertiesDatabase
- func (db *NullPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
- func (db *NullPropertiesDatabase) Close(ctx context.Context) error
- func (db *NullPropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
- func (db *NullPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error
- func (db *NullPropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error
- func (db *NullPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
- type Post
- type PostTag
- type PostTagsDatabase
- func NewDocstorePostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)
- func NewNullPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)
- func NewPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)
- func NewSQLPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error)
- type PostTagsDatabaseInitializationFunc
- type PostToAccountOptions
- type PostToInboxOptions
- type PostsDatabase
- type PostsDatabaseInitializationFunc
- type ProcessMessageQueue
- func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewPubSubProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewSlogProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- type ProcessMessageQueueInitializationFunc
- type PropertiesDatabase
- func NewDocstorePropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)
- func NewNullPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)
- func NewPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)
- func NewSQLPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error)
- type PropertiesDatabaseInitializationFunc
- type Property
- type PubSubDeliveryQueue
- type PubSubDeliveryQueuePostOptions
- type PubSubProcessMessageQueue
- type SQLAccountsDatabase
- func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *Account) error
- func (db *SQLAccountsDatabase) Close(ctx context.Context) error
- func (db *SQLAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error
- func (db *SQLAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error)
- func (db *SQLAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error)
- func (db *SQLAccountsDatabase) GetAccounts(ctx context.Context, acct GetAccountsCallbackFunc) error
- func (db *SQLAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
- func (db *SQLAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
- type SQLAliasesDatabase
- func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
- func (db *SQLAliasesDatabase) Close(ctx context.Context) error
- func (db *SQLAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error)
- func (db *SQLAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_id int64, cb GetAliasesCallbackFunc) error
- func (db *SQLAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error
- type SQLBlocksDatabase
- func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
- func (db *SQLBlocksDatabase) Close(ctx context.Context) error
- func (db *SQLBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
- func (db *SQLBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error)
- func (db *SQLBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*Block, error)
- func (db *SQLBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
- func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
- type SQLBoostsDatabase
- func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *Boost) error
- func (db *SQLBoostsDatabase) Close(ctx context.Context) error
- func (db *SQLBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error)
- func (db *SQLBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Boost, error)
- func (db *SQLBoostsDatabase) GetBoostsForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetBoostsCallbackFunc) error
- func (db *SQLBoostsDatabase) RemoveBoost(ctx context.Context, b *Boost) error
- type SQLDeliveriesDatabase
- type SQLFollowersDatabase
- func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *Follower) error
- func (db *SQLFollowersDatabase) Close(ctx context.Context) error
- func (db *SQLFollowersDatabase) GetAllFollowers(ctx context.Context, followers_callback GetFollowersCallbackFunc) error
- func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error)
- func (db *SQLFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error
- func (db *SQLFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, ...) error
- func (db *SQLFollowersDatabase) HasFollower(ctx context.Context, account_id int64, follower_address string) (bool, error)
- func (db *SQLFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error
- type SQLFollowingDatabase
- func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error
- func (db *SQLFollowingDatabase) Close(ctx context.Context) error
- func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error)
- func (db *SQLFollowingDatabase) GetFollowingForAccount(ctx context.Context, account_id int64, ...) error
- func (db *SQLFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowingIdsCallbackFunc) error
- func (db *SQLFollowingDatabase) RemoveFollowing(ctx context.Context, f *Following) error
- type SQLLikesDatabase
- func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *Like) error
- func (db *SQLLikesDatabase) Close(ctx context.Context) error
- func (db *SQLLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error
- func (db *SQLLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error)
- func (db *SQLLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Like, error)
- func (db *SQLLikesDatabase) GetLikesForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetLikesCallbackFunc) error
- func (db *SQLLikesDatabase) RemoveLike(ctx context.Context, b *Like) error
- type SQLMessagesDatabase
- func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *Message) error
- func (db *SQLMessagesDatabase) Close(ctx context.Context) error
- func (db *SQLMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error
- func (db *SQLMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*Message, error)
- func (db *SQLMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*Message, error)
- func (db *SQLMessagesDatabase) GetMessagesForAccount(ctx context.Context, account_id int64, callback_func GetMessagesCallbackFunc) error
- func (db *SQLMessagesDatabase) GetMessagesForAccountAndAuthor(ctx context.Context, account_id int64, author_address string, ...) error
- func (db *SQLMessagesDatabase) RemoveMessage(ctx context.Context, message *Message) error
- func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error
- type SQLNotesDatabase
- func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *Note) error
- func (db *SQLNotesDatabase) Close(ctx context.Context) error
- func (db *SQLNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start int64, end int64, cb GetNoteIdsCallbackFunc) error
- func (db *SQLNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*Note, error)
- func (db *SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, uuid string, author_address string) (*Note, error)
- func (db *SQLNotesDatabase) RemoveNote(ctx context.Context, note *Note) error
- func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *Note) error
- type SQLPostTagsDatabase
- func (db *SQLPostTagsDatabase) AddPostTag(ctx context.Context, post_tag *PostTag) error
- func (db *SQLPostTagsDatabase) Close(ctx context.Context) error
- func (db *SQLPostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error
- func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error)
- func (db *SQLPostTagsDatabase) GetPostTagsForAccount(ctx context.Context, account_id int64, cb GetPostTagsCallbackFunc) error
- func (db *SQLPostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error
- func (db *SQLPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id int64, cb GetPostTagsCallbackFunc) error
- func (db *SQLPostTagsDatabase) RemovePostTag(ctx context.Context, post_tag *PostTag) error
- type SQLPostsDatabase
- func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *Post) error
- func (db *SQLPostsDatabase) Close(ctx context.Context) error
- func (db *SQLPostsDatabase) GetPostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostIdsCallbackFunc) error
- func (db *SQLPostsDatabase) GetPostWithId(ctx context.Context, id int64) (*Post, error)
- type SQLPropertiesDatabase
- func (db *SQLPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
- func (db *SQLPropertiesDatabase) Close(ctx context.Context) error
- func (db *SQLPropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
- func (db *SQLPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error
- func (db *SQLPropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error
- func (db *SQLPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
- type SlogDeliveriesDatabase
- func (db *SlogDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error
- func (db *SlogDeliveriesDatabase) Close(ctx context.Context) error
- func (db *SlogDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, ...) error
- func (db *SlogDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error)
- type SlogDeliveryQueue
- type SlogProcessMessageQueue
- type SynchronousDeliveryQueue
Constants ¶
const SQL_ACCOUNTS_TABLE_NAME string = "accounts"
const SQL_ALIASES_TABLE_NAME string = "aliases"
const SQL_BLOCKS_TABLE_NAME string = "blocks"
const SQL_BOOSTS_TABLE_NAME string = "boosts"
const SQL_DELIVERIES_TABLE_NAME string = "deliveries"
const SQL_FOLLOWERS_TABLE_NAME string = "followers"
const SQL_FOLLOWING_TABLE_NAME string = "following"
const SQL_LIKES_TABLE_NAME string = "likes"
const SQL_MESSAGES_TABLE_NAME string = "messages"
const SQL_NOTES_TABLE_NAME string = "notes"
const SQL_POSTS_TABLE_NAME string = "posts"
const SQL_POST_TAGS_TABLE_NAME string = "posts_tags"
const SQL_PROPERTIES_TABLE_NAME string = "properties"
Variables ¶
var ErrNotFound = errors.New("Not found")
var ErrNotImplemented = errors.New("Not implemented")
Functions ¶
func AccountsDatabaseSchemes ¶
func AccountsDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func AddFollower ¶
func AddFollowing ¶
func AddPost ¶
func AddPost(ctx context.Context, opts *AddPostOptions, acct *Account, body string) (*Post, []*PostTag, error)
AddPost creates a new post record for 'body' and adds it to the post database. Then it parses 'body' looking for other ActivityPub addresses and records each as a "mention" in the post tags database. It returns the post and the list of post tags (mentions) for further processing as needed.
func AliasesDatabaseSchemes ¶
func AliasesDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func ApplyPropertiesUpdates ¶
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 CountFollowers ¶
func CountFollowing ¶
func DeliverPost ¶
func DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
func DeliverPostToFollowers ¶
func DeliverPostToFollowers(ctx context.Context, opts *DeliverPostToFollowersOptions) error
func DeliveriesDatabaseSchemes ¶
func DeliveriesDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func DeliveryQueueSchemes ¶
func DeliveryQueueSchemes() []string
Schemes returns the list of schemes that have been registered.
func DerivePropertiesUpdates ¶
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 IsAccountNameTaken ¶
func IsAliasNameTaken ¶
func IsBlockedByAccount ¶
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 NoteFromPost ¶
func NotesDatabaseSchemes ¶
func NotesDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func ParseAddressFromRequest ¶
func PostTagsDatabaseSchemes ¶
func PostTagsDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func PostToAccount ¶
func PostToAccount(ctx context.Context, opts *PostToAccountOptions) (string, error)
func PostToInbox ¶
func PostToInbox(ctx context.Context, opts *PostToInboxOptions) error
func PostsDatabaseSchemes ¶
func PostsDatabaseSchemes() []string
Schemes returns the list of schemes that have been registered.
func ProcessMessageQueueSchemes ¶
func ProcessMessageQueueSchemes() []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 PropertiesMapForAccount ¶
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 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 RegisterDeliveryQueue ¶
func RegisterDeliveryQueue(ctx context.Context, scheme string, init_func DeliveryQueueInitializationFunc) error
RegisterDeliveryQueue registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `DeliveryQueue` instances by the `NewDeliveryQueue` 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 RegisterProcessMessageQueue ¶
func RegisterProcessMessageQueue(ctx context.Context, scheme string, init_func ProcessMessageQueueInitializationFunc) error
RegisterProcessMessageQueue registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `ProcessMessageQueue` instances by the `NewProcessMessageQueue` 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 Account ¶
type Account struct { // Id is a unique numeric identifier for the account Id int64 `json:"id"` // AccountType denotes the ActivityPub account type AccountType AccountType `json:"account_type"` // Name is the unique account name for the account Name string `json:"name"` // DisplayName is the long-form name for the account (which is not guaranteed to be unique across all accounts) DisplayName string `json:"display_name"` // Blurb is the descriptive text for the account Blurb string `json:"blurb"` // URL is the primary website associated with the account URL string `json:"url"` // PublicKeyURI is a valid `gocloud.dev/runtimevar` referencing the PEM-encoded public key for the account. PublicKeyURI string `json:"public_key_uri"` // PublicKeyURI is a valid `gocloud.dev/runtimevar` referencing the PEM-encoded private key for the account. PrivateKeyURI string `json:"private_key_uri"` // ManuallyApproveFollowers is a boolean flag signaling that follower requests need to be manually approved. Note: There are currently no tools or interfaces for handling those approvals. ManuallyApproveFollowers bool `json:"manually_approve_followers"` // Discoverable is a boolean flag signaling that the account is discoverable. Discoverable bool `json:"discoverable"` // IconURI is a valid `gocloud.dev/blob` URI (as in the bucket URI + filename) referencing the icon URI for the account. IconURI string `json:"icon_uri"` // Created is a Unix timestamp of when the account was created. Created int64 `json:"created"` // LastModified is a Unix timestamp of when the account was last modified. LastModified int64 `json:"lastmodified"` }
Account represents an individual ActivityPub account
func AddAccount ¶
func UpdateAccount ¶
func (*Account) AccountURL ¶
func (*Account) FollowersResource ¶
func (*Account) FollowingResource ¶
func (*Account) PrivateKeyRSA ¶
func (*Account) ProfileResource ¶
func (*Account) ProfileURL ¶
func (*Account) PublicKeyRSA ¶
func (*Account) WebfingerResource ¶
type AccountType ¶
type AccountType uint32
AccountType denotes the ActivityPub account type
const ( // PersonType is considered to be an actual human being PersonType AccountType // ServiceType is considered to be a "bot" or other automated account ServiceType )
func AccountTypeFromString ¶
func AccountTypeFromString(str_type string) (AccountType, error)
AccountTypeFromString returns a known AccountType derived from 'str_type' (an English-language label)
func (AccountType) String ¶
func (t AccountType) String() string
String returns an English-language label for the AccountType
type AccountsDatabase ¶
type AccountsDatabase interface { GetAccounts(context.Context, GetAccountsCallbackFunc) error GetAccountIdsForDateRange(context.Context, int64, int64, GetAccountIdsCallbackFunc) error GetAccountWithId(context.Context, int64) (*Account, error) GetAccountWithName(context.Context, string) (*Account, error) AddAccount(context.Context, *Account) error RemoveAccount(context.Context, *Account) error UpdateAccount(context.Context, *Account) error Close(context.Context) error }
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 AddPostOptions ¶
type AddPostOptions struct { URIs *uris.URIs PostsDatabase PostsDatabase PostTagsDatabase PostTagsDatabase }
type Alias ¶
type AliasesDatabase ¶
type AliasesDatabase interface { GetAliasesForAccount(context.Context, int64, GetAliasesCallbackFunc) error GetAliasWithName(context.Context, string) (*Alias, error) AddAlias(context.Context, *Alias) error RemoveAlias(context.Context, *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 Block ¶
type BlocksDatabase ¶
type BlocksDatabase interface { GetBlockIdsForDateRange(context.Context, int64, int64, GetBlockIdsCallbackFunc) error GetBlockWithAccountIdAndAddress(context.Context, int64, string, string) (*Block, error) GetBlockWithId(context.Context, int64) (*Block, error) AddBlock(context.Context, *Block) error RemoveBlock(context.Context, *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 Boost ¶
type BoostsDatabase ¶
type BoostsDatabase interface { GetBoostIdsForDateRange(context.Context, int64, int64, GetBoostIdsCallbackFunc) error GetBoostsForPost(context.Context, int64, GetBoostsCallbackFunc) error GetBoostWithPostIdAndActor(context.Context, int64, string) (*Boost, error) GetBoostWithId(context.Context, int64) (*Boost, error) AddBoost(context.Context, *Boost) error RemoveBoost(context.Context, *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 DeliverPostOptions ¶
type DeliverPostToFollowersOptions ¶
type DeliverPostToFollowersOptions struct { AccountsDatabase AccountsDatabase FollowersDatabase FollowersDatabase PostTagsDatabase PostTagsDatabase DeliveriesDatabase DeliveriesDatabase DeliveryQueue DeliveryQueue Post *Post PostTags []*PostTag `json:"post_tags"` MaxAttempts int `json:"max_attempts"` URIs *uris.URIs }
type DeliveriesDatabase ¶
type DeliveriesDatabase interface { GetDeliveryIdsForDateRange(context.Context, int64, int64, GetDeliveryIdsCallbackFunc) error AddDelivery(context.Context, *Delivery) error GetDeliveryWithId(context.Context, int64) (*Delivery, error) GetDeliveriesWithPostIdAndRecipient(context.Context, int64, string, GetDeliveriesCallbackFunc) 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 Delivery ¶
type Delivery struct { Id int64 `json:"id"` ActivityId string `json:"activity_id"` PostId int64 `json:"post_id"` AccountId int64 `json:"account_id"` Recipient string `json:"recipient"` Inbox string `json:"inbox"` Created int64 `json:"created"` Completed int64 `json:"completed"` Success bool `json:"success"` Error string `json:"error,omitempty"` }
type DeliveryQueue ¶
type DeliveryQueue interface {
DeliverPost(context.Context, *DeliverPostOptions) error
}
func NewDeliveryQueue ¶
func NewDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
NewDeliveryQueue returns a new `DeliveryQueue` 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 `DeliveryQueueInitializationFunc` function used to instantiate the new `DeliveryQueue`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterDeliveryQueue` method.
func NewNullDeliveryQueue ¶
func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewPubSubDeliveryQueue ¶
func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewSlogDeliveryQueue ¶
func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewSynchronousDeliveryQueue ¶
func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
type DeliveryQueueInitializationFunc ¶
type DeliveryQueueInitializationFunc func(ctx context.Context, uri string) (DeliveryQueue, error)
DeliveryQueueInitializationFunc is a function defined by individual delivery_queue package and used to create an instance of that delivery_queue
type DocstoreAccountsDatabase ¶
type DocstoreAccountsDatabase struct { AccountsDatabase // contains filtered or unexported fields }
func (*DocstoreAccountsDatabase) AddAccount ¶
func (db *DocstoreAccountsDatabase) AddAccount(ctx context.Context, a *Account) error
func (*DocstoreAccountsDatabase) Close ¶
func (db *DocstoreAccountsDatabase) Close(ctx context.Context) error
func (*DocstoreAccountsDatabase) GetAccountIdsForDateRange ¶
func (db *DocstoreAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error
func (*DocstoreAccountsDatabase) GetAccountWithId ¶
func (*DocstoreAccountsDatabase) GetAccountWithName ¶
func (*DocstoreAccountsDatabase) GetAccounts ¶
func (db *DocstoreAccountsDatabase) GetAccounts(ctx context.Context, cb GetAccountsCallbackFunc) error
func (*DocstoreAccountsDatabase) RemoveAccount ¶
func (db *DocstoreAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
func (*DocstoreAccountsDatabase) UpdateAccount ¶
func (db *DocstoreAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
type DocstoreAliasesDatabase ¶
type DocstoreAliasesDatabase struct { AliasesDatabase // contains filtered or unexported fields }
func (*DocstoreAliasesDatabase) AddAlias ¶
func (db *DocstoreAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
func (*DocstoreAliasesDatabase) Close ¶
func (db *DocstoreAliasesDatabase) Close(ctx context.Context) error
func (*DocstoreAliasesDatabase) GetAliasWithName ¶
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 *Alias) error
type DocstoreBlocksDatabase ¶
type DocstoreBlocksDatabase struct { BlocksDatabase // contains filtered or unexported fields }
func (*DocstoreBlocksDatabase) AddBlock ¶
func (db *DocstoreBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
func (*DocstoreBlocksDatabase) Close ¶
func (db *DocstoreBlocksDatabase) Close(ctx context.Context) error
func (*DocstoreBlocksDatabase) GetBlockIdsForDateRange ¶
func (db *DocstoreBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
func (*DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress ¶
func (*DocstoreBlocksDatabase) GetBlockWithId ¶
func (*DocstoreBlocksDatabase) RemoveBlock ¶
func (db *DocstoreBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
func (*DocstoreBlocksDatabase) UpdateBlock ¶
func (db *DocstoreBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
type DocstoreBoostsDatabase ¶
type DocstoreBoostsDatabase struct { BoostsDatabase // contains filtered or unexported fields }
func (*DocstoreBoostsDatabase) AddBoost ¶
func (db *DocstoreBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error
func (*DocstoreBoostsDatabase) Close ¶
func (db *DocstoreBoostsDatabase) Close(ctx context.Context) error
func (*DocstoreBoostsDatabase) GetBoostIdsForDateRange ¶
func (db *DocstoreBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error
func (*DocstoreBoostsDatabase) GetBoostWithId ¶
func (*DocstoreBoostsDatabase) GetBoostWithPostIdAndActor ¶
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 *Boost) error
type DocstoreDeliveriesDatabase ¶
type DocstoreDeliveriesDatabase struct { DeliveriesDatabase // contains filtered or unexported fields }
func (*DocstoreDeliveriesDatabase) AddDelivery ¶
func (db *DocstoreDeliveriesDatabase) AddDelivery(ctx context.Context, f *Delivery) error
func (*DocstoreDeliveriesDatabase) Close ¶
func (db *DocstoreDeliveriesDatabase) Close(ctx context.Context) error
func (*DocstoreDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient ¶
func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, 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 ¶
type DocstoreFollowersDatabase ¶
type DocstoreFollowersDatabase struct { FollowersDatabase // contains filtered or unexported fields }
func (*DocstoreFollowersDatabase) AddFollower ¶
func (db *DocstoreFollowersDatabase) AddFollower(ctx context.Context, f *Follower) error
func (*DocstoreFollowersDatabase) Close ¶
func (db *DocstoreFollowersDatabase) Close(ctx context.Context) error
func (*DocstoreFollowersDatabase) GetAllFollowers ¶
func (db *DocstoreFollowersDatabase) GetAllFollowers(ctx context.Context, cb GetFollowersCallbackFunc) error
func (*DocstoreFollowersDatabase) GetFollower ¶
func (*DocstoreFollowersDatabase) GetFollowerIdsForDateRange ¶
func (db *DocstoreFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error
func (*DocstoreFollowersDatabase) GetFollowersForAccount ¶
func (db *DocstoreFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, cb GetFollowersCallbackFunc) error
func (*DocstoreFollowersDatabase) HasFollowers ¶
func (*DocstoreFollowersDatabase) RemoveFollower ¶
func (db *DocstoreFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error
type DocstoreFollowingDatabase ¶
type DocstoreFollowingDatabase struct { FollowingDatabase // contains filtered or unexported fields }
func (*DocstoreFollowingDatabase) AddFollowing ¶
func (db *DocstoreFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error
func (*DocstoreFollowingDatabase) Close ¶
func (db *DocstoreFollowingDatabase) Close(ctx context.Context) error
func (*DocstoreFollowingDatabase) GetFollowing ¶
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 *Following) error
type DocstoreLikesDatabase ¶
type DocstoreLikesDatabase struct { LikesDatabase // contains filtered or unexported fields }
func (*DocstoreLikesDatabase) AddLike ¶
func (db *DocstoreLikesDatabase) AddLike(ctx context.Context, like *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 (*DocstoreLikesDatabase) GetLikeWithPostIdAndActor ¶
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 *Like) error
type DocstoreMessagesDatabase ¶
type DocstoreMessagesDatabase struct { MessagesDatabase // contains filtered or unexported fields }
func (*DocstoreMessagesDatabase) AddMessage ¶
func (db *DocstoreMessagesDatabase) AddMessage(ctx context.Context, message *Message) error
func (*DocstoreMessagesDatabase) Close ¶
func (db *DocstoreMessagesDatabase) Close(ctx context.Context) error
func (*DocstoreMessagesDatabase) GetMessageIdsForDateRange ¶
func (db *DocstoreMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error
func (*DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds ¶
func (*DocstoreMessagesDatabase) GetMessageWithId ¶
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 *Message) error
func (*DocstoreMessagesDatabase) UpdateMessage ¶
func (db *DocstoreMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error
type DocstoreNotesDatabase ¶
type DocstoreNotesDatabase struct { NotesDatabase // contains filtered or unexported fields }
func (*DocstoreNotesDatabase) AddNote ¶
func (db *DocstoreNotesDatabase) AddNote(ctx context.Context, note *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 (*DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress ¶
func (*DocstoreNotesDatabase) RemoveNote ¶
func (db *DocstoreNotesDatabase) RemoveNote(ctx context.Context, note *Note) error
func (*DocstoreNotesDatabase) UpdateNote ¶
func (db *DocstoreNotesDatabase) UpdateNote(ctx context.Context, note *Note) error
type DocstorePostTagsDatabase ¶
type DocstorePostTagsDatabase struct { PostTagsDatabase // contains filtered or unexported fields }
func (*DocstorePostTagsDatabase) AddPostTag ¶
func (db *DocstorePostTagsDatabase) AddPostTag(ctx context.Context, tag *PostTag) error
func (*DocstorePostTagsDatabase) Close ¶
func (db *DocstorePostTagsDatabase) Close(ctx context.Context) error
func (*DocstorePostTagsDatabase) GetPostTagIdsForDateRange ¶
func (db *DocstorePostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error
func (*DocstorePostTagsDatabase) GetPostTagWithId ¶
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 *PostTag) error
type DocstorePostsDatabase ¶
type DocstorePostsDatabase struct { PostsDatabase // contains filtered or unexported fields }
func (*DocstorePostsDatabase) AddPost ¶
func (db *DocstorePostsDatabase) AddPost(ctx context.Context, p *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 ¶
type DocstorePropertiesDatabase ¶
type DocstorePropertiesDatabase struct { PropertiesDatabase // contains filtered or unexported fields }
func (*DocstorePropertiesDatabase) AddProperty ¶
func (db *DocstorePropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
func (*DocstorePropertiesDatabase) Close ¶
func (db *DocstorePropertiesDatabase) Close(ctx context.Context) error
func (*DocstorePropertiesDatabase) GetProperties ¶
func (db *DocstorePropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
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 *Property) error
func (*DocstorePropertiesDatabase) UpdateProperty ¶
func (db *DocstorePropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
type Follower ¶
type Follower struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` FollowerAddress string `json:"follower_address"` Created int64 `json:"created"` }
func GetFollower ¶
func IsFollower ¶
func IsFollower(ctx context.Context, db FollowersDatabase, account_id int64, follower_address string) (bool, *Follower, error)
Is follower_address following account_id?
type FollowersDatabase ¶
type FollowersDatabase interface { 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) (*Follower, error) AddFollower(context.Context, *Follower) error RemoveFollower(context.Context, *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 Following ¶
type Following struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` FollowingAddress string `json:"following_address"` Created int64 `json:"created"` }
func GetFollowing ¶
func IsFollowing ¶
func IsFollowing(ctx context.Context, db FollowingDatabase, account_id int64, following_address string) (bool, *Following, error)
Is account_id following following_address?
type FollowingDatabase ¶
type FollowingDatabase interface { GetFollowingIdsForDateRange(context.Context, int64, int64, GetFollowingIdsCallbackFunc) error GetFollowingForAccount(context.Context, int64, GetFollowingCallbackFunc) error GetFollowing(context.Context, int64, string) (*Following, error) AddFollowing(context.Context, *Following) error RemoveFollowing(context.Context, *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 GetDeliveriesQuery ¶
type Like ¶
type LikesDatabase ¶
type LikesDatabase interface { GetLikeIdsForDateRange(context.Context, int64, int64, GetLikeIdsCallbackFunc) error GetLikesForPost(context.Context, int64, GetLikesCallbackFunc) error GetLikeWithPostIdAndActor(context.Context, int64, string) (*Like, error) GetLikeWithId(context.Context, int64) (*Like, error) AddLike(context.Context, *Like) error RemoveLike(context.Context, *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 Message ¶
type Message struct { Id int64 `json:"id"` NoteId int64 `json:"note_id"` AuthorAddress string `json:"author_uri"` AccountId int64 `json:"account_id"` Created int64 `json:"created"` LastModified int64 `json:"created"` }
func AddMessage ¶
func GetMessage ¶
func NewMessage ¶
func UpdateMessage ¶
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) (*Message, error) GetMessageWithAccountAndNoteIds(context.Context, int64, int64) (*Message, error) AddMessage(context.Context, *Message) error UpdateMessage(context.Context, *Message) error RemoveMessage(context.Context, *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 Note ¶
type Note struct { Id int64 `json:"id"` UUID string `json:"uuid"` AuthorAddress string `json:"author_address"` Body string `json:"body"` Created int64 `json:"created"` LastModified int64 `json:"lastmodified"` }
type NotesDatabase ¶
type NotesDatabase interface { GetNoteIdsForDateRange(context.Context, int64, int64, GetNoteIdsCallbackFunc) error GetNoteWithId(context.Context, int64) (*Note, error) GetNoteWithUUIDAndAuthorAddress(context.Context, string, string) (*Note, error) AddNote(context.Context, *Note) error UpdateNote(context.Context, *Note) error RemoveNote(context.Context, *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 *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 (*NullAccountsDatabase) GetAccountWithName ¶
func (*NullAccountsDatabase) GetAccounts ¶
func (db *NullAccountsDatabase) GetAccounts(ctx context.Context, cb GetAccountsCallbackFunc) error
func (*NullAccountsDatabase) RemoveAccount ¶
func (db *NullAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
func (*NullAccountsDatabase) UpdateAccount ¶
func (db *NullAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
type NullAliasesDatabase ¶
type NullAliasesDatabase struct {
AliasesDatabase
}
func (*NullAliasesDatabase) AddAlias ¶
func (db *NullAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
func (*NullAliasesDatabase) GetAliasWithName ¶
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 *Alias) error
type NullBlocksDatabase ¶
type NullBlocksDatabase struct {
BlocksDatabase
}
func (*NullBlocksDatabase) AddBlock ¶
func (db *NullBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
func (*NullBlocksDatabase) GetBlockIdsForDateRange ¶
func (db *NullBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
func (*NullBlocksDatabase) GetBlockWithAccountIdAndAddress ¶
func (*NullBlocksDatabase) GetBlockWithId ¶
func (*NullBlocksDatabase) IsBlockedByAccount ¶
func (*NullBlocksDatabase) RemoveBlock ¶
func (db *NullBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
func (*NullBlocksDatabase) UpdateBlock ¶
func (db *NullBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
type NullBoostsDatabase ¶
type NullBoostsDatabase struct {
BoostsDatabase
}
func (*NullBoostsDatabase) AddBoost ¶
func (db *NullBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error
func (*NullBoostsDatabase) GetBoostIdsForDateRange ¶
func (db *NullBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBoostIdsCallbackFunc) error
func (*NullBoostsDatabase) GetBoostWithId ¶
func (*NullBoostsDatabase) GetBoostWithPostIdAndActor ¶
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 *Boost) error
type NullDeliveriesDatabase ¶
type NullDeliveriesDatabase struct {
DeliveriesDatabase
}
func (*NullDeliveriesDatabase) AddDelivery ¶
func (db *NullDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error
func (*NullDeliveriesDatabase) Close ¶
func (db *NullDeliveriesDatabase) Close(ctx context.Context) error
func (*NullDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient ¶
func (db *NullDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, cb GetDeliveriesCallbackFunc) error
func (*NullDeliveriesDatabase) GetDeliveryWithId ¶
type NullDeliveryQueue ¶
type NullDeliveryQueue struct {
DeliveryQueue
}
func (*NullDeliveryQueue) DeliverPost ¶
func (q *NullDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
type NullLikesDatabase ¶
type NullLikesDatabase struct {
LikesDatabase
}
func (*NullLikesDatabase) AddLike ¶
func (db *NullLikesDatabase) AddLike(ctx context.Context, like *Like) error
func (*NullLikesDatabase) GetLikeIdsForDateRange ¶
func (db *NullLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error
func (*NullLikesDatabase) GetLikeWithId ¶
func (*NullLikesDatabase) GetLikeWithPostIdAndActor ¶
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 *Like) error
type NullPostTagsDatabase ¶
type NullPostTagsDatabase struct {
PostTagsDatabase
}
func (*NullPostTagsDatabase) AddPostTag ¶
func (db *NullPostTagsDatabase) AddPostTag(ctx context.Context, boost *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 (*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 *PostTag) error
type NullProcessMessageQueue ¶
type NullProcessMessageQueue struct {
ProcessMessageQueue
}
func (*NullProcessMessageQueue) ProcessMessage ¶
func (q *NullProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type NullPropertiesDatabase ¶
type NullPropertiesDatabase struct {
PropertiesDatabase
}
func (*NullPropertiesDatabase) AddProperty ¶
func (db *NullPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
func (*NullPropertiesDatabase) Close ¶
func (db *NullPropertiesDatabase) Close(ctx context.Context) error
func (*NullPropertiesDatabase) GetProperties ¶
func (db *NullPropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
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 *Property) error
func (*NullPropertiesDatabase) UpdateProperty ¶
func (db *NullPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
type Post ¶
type Post struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` // This is a string mostly because []byte thingies get encoded incorrectly // in DynamoDB Body string `json:"body"` InReplyTo string `json:"in_reply_to"` Created int64 `json:"created"` LastModified int64 `json:"lastmodified"` }
func GetPostFromObjectURI ¶
type PostTag ¶
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) (*PostTag, error) AddPostTag(context.Context, *PostTag) error RemovePostTag(context.Context, *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 PostToAccountOptions ¶
type PostToInboxOptions ¶
type PostToInboxOptions struct { From *Account Inbox string Activity *ap.Activity URIs *uris.URIs // Log POST requests before they are sent using the default [log/slog] Logger. Note that this will // include the HTTP signature sent with the request so you should apply all the necessary care that // these values are logged somewhere you don't want unauthorized eyes to see the. LogRequest bool // Log the body of the POST response if it contains a status code that is not 200-202 or 204 using // the default [log/slog] Logger LogResponseOnError bool }
type PostsDatabase ¶
type PostsDatabase interface { GetPostIdsForDateRange(context.Context, int64, int64, GetPostIdsCallbackFunc) error GetPostWithId(context.Context, int64) (*Post, error) AddPost(context.Context, *Post) error RemovePost(context.Context, *Post) error UpdatePost(context.Context, *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 ProcessMessageQueue ¶
func NewNullProcessMessageQueue ¶
func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
func NewProcessMessageQueue ¶
func NewProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
NewProcessMessageQueue returns a new `ProcessMessageQueue` 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 `ProcessMessageQueueInitializationFunc` function used to instantiate the new `ProcessMessageQueue`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterProcessMessageQueue` method.
func NewPubSubProcessMessageQueue ¶
func NewPubSubProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
func NewSlogProcessMessageQueue ¶
func NewSlogProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
type ProcessMessageQueueInitializationFunc ¶
type ProcessMessageQueueInitializationFunc func(ctx context.Context, uri string) (ProcessMessageQueue, error)
ProcessMessageQueueInitializationFunc is a function defined by individual process_message_queue package and used to create an instance of that process_message_queue
type PropertiesDatabase ¶
type PropertiesDatabase interface { GetProperties(context.Context, GetPropertiesCallbackFunc) error GetPropertiesForAccount(context.Context, int64, GetPropertiesCallbackFunc) error AddProperty(context.Context, *Property) error UpdateProperty(context.Context, *Property) error RemoveProperty(context.Context, *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 Property ¶
type Property struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` Key string `json:"key"` Value string `json:"value"` Created int64 `json:"created"` }
func NewProperty ¶
type PubSubDeliveryQueue ¶
type PubSubDeliveryQueue struct { DeliveryQueue // contains filtered or unexported fields }
func (*PubSubDeliveryQueue) DeliverPost ¶
func (q *PubSubDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
type PubSubProcessMessageQueue ¶
type PubSubProcessMessageQueue struct { ProcessMessageQueue // contains filtered or unexported fields }
func (*PubSubProcessMessageQueue) ProcessMessage ¶
func (q *PubSubProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type SQLAccountsDatabase ¶
type SQLAccountsDatabase struct { AccountsDatabase // contains filtered or unexported fields }
func (*SQLAccountsDatabase) AddAccount ¶
func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *Account) error
func (*SQLAccountsDatabase) GetAccountIdsForDateRange ¶
func (db *SQLAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error
func (*SQLAccountsDatabase) GetAccountWithId ¶
func (*SQLAccountsDatabase) GetAccountWithName ¶
func (*SQLAccountsDatabase) GetAccounts ¶
func (db *SQLAccountsDatabase) GetAccounts(ctx context.Context, acct GetAccountsCallbackFunc) error
func (*SQLAccountsDatabase) RemoveAccount ¶
func (db *SQLAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error
func (*SQLAccountsDatabase) UpdateAccount ¶
func (db *SQLAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error
type SQLAliasesDatabase ¶
type SQLAliasesDatabase struct { AliasesDatabase // contains filtered or unexported fields }
func (*SQLAliasesDatabase) AddAlias ¶
func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error
func (*SQLAliasesDatabase) GetAliasWithName ¶
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 *Alias) error
type SQLBlocksDatabase ¶
type SQLBlocksDatabase struct { BlocksDatabase // contains filtered or unexported fields }
func (*SQLBlocksDatabase) AddBlock ¶
func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *Block) error
func (*SQLBlocksDatabase) GetBlockIdsForDateRange ¶
func (db *SQLBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start int64, end int64, cb GetBlockIdsCallbackFunc) error
func (*SQLBlocksDatabase) GetBlockWithAccountIdAndAddress ¶
func (*SQLBlocksDatabase) GetBlockWithId ¶
func (*SQLBlocksDatabase) RemoveBlock ¶
func (db *SQLBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error
func (*SQLBlocksDatabase) UpdateBlock ¶
func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error
type SQLBoostsDatabase ¶
type SQLBoostsDatabase struct { BoostsDatabase // contains filtered or unexported fields }
func (*SQLBoostsDatabase) AddBoost ¶
func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *Boost) error
func (*SQLBoostsDatabase) GetBoostWithId ¶
func (*SQLBoostsDatabase) GetBoostWithPostIdAndActor ¶
func (*SQLBoostsDatabase) GetBoostsForPostIdAndActor ¶
func (db *SQLBoostsDatabase) GetBoostsForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetBoostsCallbackFunc) error
func (*SQLBoostsDatabase) RemoveBoost ¶
func (db *SQLBoostsDatabase) RemoveBoost(ctx context.Context, b *Boost) error
type SQLDeliveriesDatabase ¶
type SQLDeliveriesDatabase struct { DeliveriesDatabase // contains filtered or unexported fields }
func (*SQLDeliveriesDatabase) AddFollower ¶
func (db *SQLDeliveriesDatabase) AddFollower(ctx context.Context, d *Delivery) error
func (*SQLDeliveriesDatabase) Close ¶
func (db *SQLDeliveriesDatabase) Close(ctx context.Context) error
func (*SQLDeliveriesDatabase) GetDeliveryIdsForDateRange ¶
func (db *SQLDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error
type SQLFollowersDatabase ¶
type SQLFollowersDatabase struct { FollowersDatabase // contains filtered or unexported fields }
func (*SQLFollowersDatabase) AddFollower ¶
func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *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 (*SQLFollowersDatabase) GetFollowerIdsForDateRange ¶
func (db *SQLFollowersDatabase) GetFollowerIdsForDateRange(ctx context.Context, start int64, end int64, cb GetFollowerIdsCallbackFunc) error
func (*SQLFollowersDatabase) GetFollowersForAccount ¶
func (db *SQLFollowersDatabase) GetFollowersForAccount(ctx context.Context, account_id int64, followers_callback GetFollowersCallbackFunc) error
func (*SQLFollowersDatabase) HasFollower ¶
func (*SQLFollowersDatabase) RemoveFollower ¶
func (db *SQLFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error
type SQLFollowingDatabase ¶
type SQLFollowingDatabase struct { FollowingDatabase // contains filtered or unexported fields }
func (*SQLFollowingDatabase) AddFollowing ¶
func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error
func (*SQLFollowingDatabase) Close ¶
func (db *SQLFollowingDatabase) Close(ctx context.Context) error
func (*SQLFollowingDatabase) GetFollowing ¶
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 *Following) error
type SQLLikesDatabase ¶
type SQLLikesDatabase struct { LikesDatabase // contains filtered or unexported fields }
func (*SQLLikesDatabase) AddLike ¶
func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *Like) error
func (*SQLLikesDatabase) GetLikeIdsForDateRange ¶
func (db *SQLLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start int64, end int64, cb GetLikeIdsCallbackFunc) error
func (*SQLLikesDatabase) GetLikeWithId ¶
func (*SQLLikesDatabase) GetLikeWithPostIdAndActor ¶
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 *Like) error
type SQLMessagesDatabase ¶
type SQLMessagesDatabase struct { MessagesDatabase // contains filtered or unexported fields }
func (*SQLMessagesDatabase) AddMessage ¶
func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *Message) error
func (*SQLMessagesDatabase) GetMessageIdsForDateRange ¶
func (db *SQLMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, start int64, end int64, cb GetMessageIdsCallbackFunc) error
func (*SQLMessagesDatabase) GetMessageWithAccountAndNoteIds ¶
func (*SQLMessagesDatabase) GetMessageWithId ¶
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 *Message) error
func (*SQLMessagesDatabase) UpdateMessage ¶
func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error
type SQLNotesDatabase ¶
type SQLNotesDatabase struct { NotesDatabase // contains filtered or unexported fields }
func (*SQLNotesDatabase) AddNote ¶
func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *Note) error
func (*SQLNotesDatabase) GetNoteIdsForDateRange ¶
func (db *SQLNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start int64, end int64, cb GetNoteIdsCallbackFunc) error
func (*SQLNotesDatabase) GetNoteWithId ¶
func (*SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress ¶
func (*SQLNotesDatabase) RemoveNote ¶
func (db *SQLNotesDatabase) RemoveNote(ctx context.Context, note *Note) error
func (*SQLNotesDatabase) UpdateNote ¶
func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *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 *PostTag) error
func (*SQLPostTagsDatabase) GetPostTagIdsForDateRange ¶
func (db *SQLPostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostTagIdsCallbackFunc) error
func (*SQLPostTagsDatabase) GetPostTagWithId ¶
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 *PostTag) error
type SQLPostsDatabase ¶
type SQLPostsDatabase struct { PostsDatabase // contains filtered or unexported fields }
func (*SQLPostsDatabase) AddPost ¶
func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *Post) error
func (*SQLPostsDatabase) GetPostIdsForDateRange ¶
func (db *SQLPostsDatabase) GetPostIdsForDateRange(ctx context.Context, start int64, end int64, cb GetPostIdsCallbackFunc) error
func (*SQLPostsDatabase) GetPostWithId ¶
type SQLPropertiesDatabase ¶
type SQLPropertiesDatabase struct { PropertiesDatabase // contains filtered or unexported fields }
func (*SQLPropertiesDatabase) AddProperty ¶
func (db *SQLPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error
func (*SQLPropertiesDatabase) Close ¶
func (db *SQLPropertiesDatabase) Close(ctx context.Context) error
func (*SQLPropertiesDatabase) GetProperties ¶
func (db *SQLPropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error
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 *Property) error
func (*SQLPropertiesDatabase) UpdateProperty ¶
func (db *SQLPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error
type SlogDeliveriesDatabase ¶
type SlogDeliveriesDatabase struct {
DeliveriesDatabase
}
func (*SlogDeliveriesDatabase) AddDelivery ¶
func (db *SlogDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error
func (*SlogDeliveriesDatabase) Close ¶
func (db *SlogDeliveriesDatabase) Close(ctx context.Context) error
func (*SlogDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient ¶
func (db *SlogDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, cb GetDeliveriesCallbackFunc) error
func (*SlogDeliveriesDatabase) GetDeliveryWithId ¶
type SlogDeliveryQueue ¶
type SlogDeliveryQueue struct {
DeliveryQueue
}
func (*SlogDeliveryQueue) DeliverPost ¶
func (q *SlogDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
type SlogProcessMessageQueue ¶
type SlogProcessMessageQueue struct {
ProcessMessageQueue
}
func (*SlogProcessMessageQueue) ProcessMessage ¶
func (q *SlogProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type SynchronousDeliveryQueue ¶
type SynchronousDeliveryQueue struct {
DeliveryQueue
}
func (*SynchronousDeliveryQueue) DeliverPost ¶
func (q *SynchronousDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error
Source Files ¶
- account.go
- accounts_database.go
- accounts_database_docstore.go
- accounts_database_null.go
- accounts_database_sql.go
- actor.go
- address.go
- alias.go
- aliases_database.go
- aliases_database_docstore.go
- aliases_database_null.go
- aliases_database_sql.go
- block.go
- blocks_database.go
- blocks_database_docstore.go
- blocks_database_null.go
- blocks_database_sql.go
- boost.go
- boosts_database.go
- boosts_database_docstore.go
- boosts_database_null.go
- boosts_database_sql.go
- deliver.go
- deliveries.go
- deliveries_database.go
- deliveries_database_docstore.go
- deliveries_database_null.go
- deliveries_database_slog.go
- deliveries_database_sql.go
- delivery_queue.go
- delivery_queue_null.go
- delivery_queue_pubsub.go
- delivery_queue_slog.go
- delivery_queue_synchronous.go
- errors.go
- follower.go
- followers_database.go
- followers_database_docstore.go
- followers_database_sql.go
- following.go
- following_database.go
- following_database_docstore.go
- following_database_sql.go
- inbox.go
- like.go
- likes_database.go
- likes_database_docstore.go
- likes_database_null.go
- likes_database_sql.go
- mention.go
- message.go
- messages_database.go
- messages_database_docstore.go
- messages_database_sql.go
- note.go
- notes_database.go
- notes_database_docstore.go
- notes_database_sql.go
- post.go
- post_tag.go
- post_tags_database.go
- post_tags_database_docstore.go
- post_tags_database_null.go
- post_tags_database_sql.go
- posts_database.go
- posts_database_docstore.go
- posts_database_sql.go
- process_message_queue.go
- process_message_queue_null.go
- process_message_queue_pubsub.go
- process_message_queue_slog.go
- properties_database.go
- properties_database_docstore.go
- properties_database_null.go
- properties_database_sql.go
- property.go
- reader.go