user

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 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 IdFromUrn added in v0.5.0

func IdFromUrn(urn string) (string, error)

func Update

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

func Urn added in v0.2.0

func Urn(id string) string

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