inmemory

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

type InMemory struct {
	// contains filtered or unexported fields
}

InMemory implements an in memory database

func GetInMemoryDB

func GetInMemoryDB() *InMemory

GetInMemoryDB returns a new InMemoryDB to use

func (*InMemory) DeleteExpiredData

func (im *InMemory) DeleteExpiredData()

DeleteExpiredData deletes data that has expired according to its TTL

func (*InMemory) EmailAddressExists

func (im *InMemory) EmailAddressExists(a string) (bool, error)

EmailAddressExists returns a bool depending on whether or not the given email address is already assigned to an inbox

func (*InMemory) GetInboxByAddress

func (im *InMemory) GetInboxByAddress(address string) (burner.Inbox, error)

GetInboxByAddress gets an inbox by the given address

func (*InMemory) GetInboxByID

func (im *InMemory) GetInboxByID(id string) (burner.Inbox, error)

GetInboxByID gets an inbox by the given inbox id

func (*InMemory) GetMessageByID

func (im *InMemory) GetMessageByID(i, m string) (burner.Message, error)

GetMessageByID gets a single message by the given inbox and message id

func (*InMemory) GetMessagesByInboxID

func (im *InMemory) GetMessagesByInboxID(id string) ([]burner.Message, error)

GetMessagesByInboxID returns all messages in a given inbox

func (*InMemory) SaveNewInbox

func (im *InMemory) SaveNewInbox(i burner.Inbox) error

SaveNewInbox saves a given inbox to memory

func (*InMemory) SaveNewMessage

func (im *InMemory) SaveNewMessage(m burner.Message) error

SaveNewMessage saves a given message to memory

func (*InMemory) SetInboxCreated

func (im *InMemory) SetInboxCreated(i burner.Inbox) error

SetInboxCreated updates the given inbox to reflect its created status

func (*InMemory) SetInboxFailed

func (im *InMemory) SetInboxFailed(i burner.Inbox) error

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

func (*InMemory) Start

func (im *InMemory) Start() error

Jump to

Keyboard shortcuts

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