user

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor interface {
	// ChangePassword changes the specified user's password from old => new,
	// or returns an error if the new password is too weak, or the old password is incorrect.
	ChangePassword(ctx context.Context, user *gtsmodel.User, oldPassword string, newPassword string) gtserror.WithCode
	// SendConfirmEmail sends a 'confirm-your-email-address' type email to a user.
	SendConfirmEmail(ctx context.Context, user *gtsmodel.User, username string) error
	// ConfirmEmail confirms an email address using the given token.
	ConfirmEmail(ctx context.Context, token string) (*gtsmodel.User, gtserror.WithCode)
}

Processor wraps a bunch of functions for processing user-level actions.

func New

func New(db db.DB, emailSender email.Sender) Processor

New returns a new user processor

Jump to

Keyboard shortcuts

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