user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure()

func Update

func Update(ctx context.Context, u *User) error

Types

type CreateCommand

type CreateCommand struct {
	Email    string
	Password string
}

type User

type User struct {
	ID      string
	Email   string
	Enabled bool

	CreatedAt  time.Time
	LastSeenAt time.Time
	// contains filtered or unexported fields
}

func Create

func Create(ctx context.Context, cmd CreateCommand) (*User, error)

func Get

func Get(ctx context.Context, id string) (*User, error)

func List

func List(ctx context.Context) ([]*User, error)

func Login

func Login(ctx context.Context, email, password string) (*User, error)

func (*User) PasswordMatches

func (u *User) PasswordMatches(pw string) bool

func (*User) SetPassword

func (u *User) SetPassword(pw string) error

Jump to

Keyboard shortcuts

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