sqldb

package
v0.0.0-...-ffaa3c7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLDatabase

type SQLDatabase struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

SQLDatabase implements the database interface for sqldb

func New

func New(dbType string, dbURL string) *SQLDatabase

New returns a new db or panics

func (*SQLDatabase) EmailAddressExists

func (s *SQLDatabase) EmailAddressExists(email string) (bool, error)

EmailAddressExists checks if an address already exists

func (*SQLDatabase) GetInboxByAddress

func (s *SQLDatabase) GetInboxByAddress(address string) (burner.Inbox, error)

GetInboxByAddress gets an inbox by address

func (*SQLDatabase) GetInboxByID

func (s *SQLDatabase) GetInboxByID(id string) (burner.Inbox, error)

GetInboxByID gets an inbox by id

func (*SQLDatabase) GetMessageByID

func (s *SQLDatabase) GetMessageByID(i, m string) (burner.Message, error)

GetMessageByID gets a single message

func (*SQLDatabase) GetMessagesByInboxID

func (s *SQLDatabase) GetMessagesByInboxID(id string) ([]burner.Message, error)

GetMessagesByInboxID gets all messages for an inbox

func (*SQLDatabase) RunTTLDelete

func (s *SQLDatabase) RunTTLDelete() (int, error)

RunTTLDelete runs the TTL delete process

func (*SQLDatabase) SaveNewInbox

func (s *SQLDatabase) SaveNewInbox(i burner.Inbox) error

SaveNewInbox saves a new inbox

func (*SQLDatabase) SaveNewMessage

func (s *SQLDatabase) SaveNewMessage(m burner.Message) error

SaveNewMessage saves a new message to the db

func (*SQLDatabase) SetInboxCreated

func (s *SQLDatabase) SetInboxCreated(i burner.Inbox) error

SetInboxCreated creates a new inbox

func (*SQLDatabase) SetInboxFailed

func (s *SQLDatabase) SetInboxFailed(i burner.Inbox) error

SetInboxFailed sets a given inbox as having failed to register with the mail provider

func (*SQLDatabase) Start

func (s *SQLDatabase) Start() error

Jump to

Keyboard shortcuts

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