user

package
v0.0.0-...-ee83092 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserNotFound      = errors.New("user not found")
	UserAlreadyPreset = errors.New("can't add a user with the same id of another")
)

Functions

This section is empty.

Types

type DB

type DB interface {
	Add(u User) error
	Delete(id string)
	GetByID(id string) (User, error)
	GetByEmail(email string) (User, error)
	List() ([]User, error)
}

func NewInMemoryDB

func NewInMemoryDB() DB

type User

type User struct {
	ID string `json:"id"`
	auth.AuthUser
}

func NewUser

func NewUser(u auth.AuthUser) User

Jump to

Keyboard shortcuts

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