archive

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package archive provides the initial SQLite implementation of Discord's persistence boundary.

Index

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 (sink *SQLiteSink) AttachmentStored(ctx context.Context, attachmentID string) (bool, error)

func (*SQLiteSink) Close

func (sink *SQLiteSink) Close() error

func (*SQLiteSink) Health

func (sink *SQLiteSink) Health(ctx context.Context) error

func (*SQLiteSink) LoadCheckpoint

func (sink *SQLiteSink) LoadCheckpoint(ctx context.Context, channelID string) (string, error)

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 (sink *SQLiteSink) MarkGuildUnavailable(ctx context.Context, guildID string, unavailable bool) error

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 (sink *SQLiteSink) ReconcileChannel(ctx context.Context, channelID string, since time.Time, observedIDs []string) error

func (*SQLiteSink) RecordFailure

func (sink *SQLiteSink) RecordFailure(ctx context.Context, failure discord.Failure) error

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 (sink *SQLiteSink) UpsertChannel(ctx context.Context, channel discord.Channel) error

func (*SQLiteSink) UpsertGuild

func (sink *SQLiteSink) UpsertGuild(ctx context.Context, guild discord.Guild) error

func (*SQLiteSink) UpsertMessage

func (sink *SQLiteSink) UpsertMessage(ctx context.Context, message discord.Message) error

func (*SQLiteSink) UpsertUser

func (sink *SQLiteSink) UpsertUser(ctx context.Context, user discord.User) error

Jump to

Keyboard shortcuts

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