user

package
v3.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 11 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
}

type Controller

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

func NewController

func NewController(repository usersRepository, usersCfg Config) *Controller

NewController returns a new instance of the users controller

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) 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) Update

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

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

Jump to

Keyboard shortcuts

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