adduser

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MinPassword = 8

MinPassword is the shortest password accepted, in runes.

Variables

View Source
var (
	ErrNoName        = errors.New("no account name given")
	ErrShortPassword = fmt.Errorf("the password needs %d characters or more", MinPassword)
	ErrNameTaken     = errors.New("an account with this name already exists")
	ErrBadInvite     = errors.New("this invitation is used, expired or unknown")
)

Functions

func Process

func Process(ctx context.Context, db bun.IDB, input Input) *run

Process creates an account.

Types

type Input

type Input struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	// The token of an invitation to consume, none when empty: the CLI, an admin, or the first account of a base.
	Invite string `json:"invite" binding:"optional"`
}

Input is an account as the admin or the invited person gives it.

Jump to

Keyboard shortcuts

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