user

package
v4.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MinPasswordLength int
	WordsPerMinute    float64
	Secret            []byte
	InvitationTimeout time.Duration
	FQDN              string
}

type Controller

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

func NewController

func NewController(usersRepository usersRepository, invitationsRepository invitationsRepository, usersCfg Config, sender Sender, translator i18n.Translator) *Controller

NewController returns a new instance of the users controller

func (*Controller) AcceptInvite added in v4.15.0

func (u *Controller) AcceptInvite(c fiber.Ctx) error

AcceptInvite processes the invitation acceptance

func (*Controller) AcceptInviteForm added in v4.15.0

func (u *Controller) AcceptInviteForm(c fiber.Ctx) error

AcceptInviteForm shows the form to accept an invitation

func (*Controller) Create

func (u *Controller) Create(c fiber.Ctx) error

Create gathers information coming from the new user form and creates a new user

func (*Controller) Delete

func (u *Controller) Delete(c fiber.Ctx) error

Delete removes a user from the database

func (*Controller) Edit

func (u *Controller) Edit(c fiber.Ctx) error

Edit renders the edit user form

func (*Controller) InviteForm added in v4.15.0

func (u *Controller) InviteForm(c fiber.Ctx) error

InviteForm shows the invitation form

func (*Controller) List

func (u *Controller) List(c fiber.Ctx) error

List list all users registered in the database

func (*Controller) New

func (u *Controller) New(c fiber.Ctx) error

New renders the new user form

func (*Controller) SendInvite added in v4.15.0

func (u *Controller) SendInvite(c fiber.Ctx) error

SendInvite sends an invitation email to the specified address

func (*Controller) ShareRecipients added in v4.19.0

func (u *Controller) ShareRecipients(c fiber.Ctx) error

ShareRecipients returns usernames and names for autocomplete.

func (*Controller) Update

func (u *Controller) Update(c fiber.Ctx) error

Update gathers information from the edit user form and updates user data

type Sender added in v4.10.0

type Sender interface {
	From() string
	Send(address, subject, body string) error
}

Jump to

Keyboard shortcuts

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