Versions in this module Expand all Collapse all v0 v0.17.0 Jul 7, 2023 Changes in this version + func NewBuilder(options ...Option) db.ClientInterface + func RunMigrations(ctx context.Context, tx utils.QueryWrapper, ...) error + func ScanMailbox(scanner utils.RowScanner) (*db.Mailbox, error) + func ScanMailboxWithAttr(scanner utils.RowScanner) (*db.MailboxWithAttr, error) + func ScanMessage(scanner utils.RowScanner) (*db.Message, error) + func ScanMessageWithFlags(scanner utils.RowScanner) (*db.MessageWithFlags, error) + func TestUpdateDBVersion(ctx context.Context, dbPath, userID string, version int) error + type Builder struct + func (Builder) Delete(dir string, userID string) error + func (b Builder) New(dir string, userID string) (db.Client, bool, error) + type Client struct + func NewClient(dir string, userID string, debug, trace bool) (*Client, bool, error) + func (c *Client) Close() error + func (c *Client) Init(ctx context.Context, generator imap.UIDValidityGenerator) error + func (c *Client) Read(ctx context.Context, op func(context.Context, db.ReadOnly) error) error + func (c *Client) Write(ctx context.Context, op func(context.Context, db.Transaction) error) error + type Migration interface + Run func(ctx context.Context, tx utils.QueryWrapper, ...) error + type Option interface + func Debug() Option + func Trace() Option