backend

package
v0.0.0-...-78c831c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	UserRepo    *models.UserRepository
	MailboxRepo *models.MailboxRepository
	MessageRepo *models.MessageRepository

	SMTPBackend *smtpbackend.SMTPBackend
	IMAPBackend *imapbackend.IMAPBackend

	LoginAttempts *loginattempts.LoginAttempts
	// contains filtered or unexported fields
}

Backend represents the MistralMail backend.

func New

func New(dbURL string, logFullQueries bool) (*Backend, error)

New creates a new backend with the provided database url.

func (*Backend) Close

func (b *Backend) Close() error

Close the backend and its database

func (*Backend) CreateNewUser

func (b *Backend) CreateNewUser(email string, password string) (*models.User, error)

CreateNewUser creates and setups a new user with a mailbox

func (*Backend) ResetUserPassword

func (b *Backend) ResetUserPassword(email string, newPassword string) error

ResetUserPassword resets the passwords of a user.

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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