Documentation
¶
Overview ¶
Package archive provides the initial SQLite implementation of Discord's persistence boundary.
Index ¶
- type SQLiteSink
- func (sink *SQLiteSink) AttachmentStored(ctx context.Context, attachmentID string) (bool, error)
- func (sink *SQLiteSink) Close() error
- func (sink *SQLiteSink) Health(ctx context.Context) error
- func (sink *SQLiteSink) LoadCheckpoint(ctx context.Context, channelID string) (string, error)
- func (sink *SQLiteSink) LoadThreadCatalog(ctx context.Context, guildID string) (map[string]discord.ThreadCatalogState, error)
- func (sink *SQLiteSink) MarkChannelDeleted(ctx context.Context, guildID, channelID string) error
- func (sink *SQLiteSink) MarkGuildRemoved(ctx context.Context, guildID string) error
- func (sink *SQLiteSink) MarkGuildUnavailable(ctx context.Context, guildID string, unavailable bool) error
- func (sink *SQLiteSink) MarkMessageDeleted(ctx context.Context, channelID, messageID string) error
- func (sink *SQLiteSink) PendingAttachments(ctx context.Context, limit int) ([]discord.Attachment, error)
- func (sink *SQLiteSink) ReconcileChannel(ctx context.Context, channelID string, since time.Time, observedIDs []string) error
- func (sink *SQLiteSink) RecordFailure(ctx context.Context, failure discord.Failure) error
- func (sink *SQLiteSink) SaveCheckpoint(ctx context.Context, channelID, messageID string) error
- func (sink *SQLiteSink) SaveThreadCatalog(ctx context.Context, guildID string, ...) error
- func (sink *SQLiteSink) StoreAttachment(ctx context.Context, attachment discord.Attachment, reader io.Reader) error
- func (sink *SQLiteSink) UpsertChannel(ctx context.Context, channel discord.Channel) error
- func (sink *SQLiteSink) UpsertGuild(ctx context.Context, guild discord.Guild) error
- func (sink *SQLiteSink) UpsertMessage(ctx context.Context, message discord.Message) error
- func (sink *SQLiteSink) UpsertUser(ctx context.Context, user discord.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteSink ¶
type SQLiteSink struct {
// contains filtered or unexported fields
}
SQLiteSink stores normalized Discord records in SQLite and attachment bodies in a content-addressed filesystem tree.
func OpenSQLite ¶
func OpenSQLite(ctx context.Context, databasePath, attachmentsDir string) (*SQLiteSink, error)
func (*SQLiteSink) AttachmentStored ¶
func (*SQLiteSink) Close ¶
func (sink *SQLiteSink) Close() error
func (*SQLiteSink) LoadCheckpoint ¶
func (*SQLiteSink) LoadThreadCatalog ¶
func (sink *SQLiteSink) LoadThreadCatalog(ctx context.Context, guildID string) (map[string]discord.ThreadCatalogState, error)
func (*SQLiteSink) MarkChannelDeleted ¶
func (sink *SQLiteSink) MarkChannelDeleted(ctx context.Context, guildID, channelID string) error
func (*SQLiteSink) MarkGuildRemoved ¶
func (sink *SQLiteSink) MarkGuildRemoved(ctx context.Context, guildID string) error
func (*SQLiteSink) MarkGuildUnavailable ¶
func (*SQLiteSink) MarkMessageDeleted ¶
func (sink *SQLiteSink) MarkMessageDeleted(ctx context.Context, channelID, messageID string) error
func (*SQLiteSink) PendingAttachments ¶
func (sink *SQLiteSink) PendingAttachments(ctx context.Context, limit int) ([]discord.Attachment, error)
func (*SQLiteSink) ReconcileChannel ¶
func (*SQLiteSink) RecordFailure ¶
func (*SQLiteSink) SaveCheckpoint ¶
func (sink *SQLiteSink) SaveCheckpoint(ctx context.Context, channelID, messageID string) error
func (*SQLiteSink) SaveThreadCatalog ¶
func (sink *SQLiteSink) SaveThreadCatalog(ctx context.Context, guildID string, state map[string]discord.ThreadCatalogState) error
func (*SQLiteSink) StoreAttachment ¶
func (sink *SQLiteSink) StoreAttachment(ctx context.Context, attachment discord.Attachment, reader io.Reader) error
func (*SQLiteSink) UpsertChannel ¶
func (*SQLiteSink) UpsertGuild ¶
func (*SQLiteSink) UpsertMessage ¶
func (*SQLiteSink) UpsertUser ¶
Click to show internal directories.
Click to hide internal directories.