users

package
v0.0.0-...-bc5f972 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthenticationFailure = errors.New("authentication failure")

ErrAuthenticationFailure indicates that the user cannot be identified with the provided information.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate(ctx context.Context, userID string, params ...string) (*User, error)
}

Authenticator allows to check whether a user is allowed in the system or not.

type Store

type Store interface {
	Authenticator
	CreateUser(ctx context.Context, name, email, password string) (*User, error)
	DeleteUser(ctx context.Context, user *User) error
}

type User

type User struct {
	Email string
	Name  string
}

User represent a users and its fields in the system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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