userdm

package
v0.0.0-...-0e17d0c Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	// contains filtered or unexported fields
}

func GenForTest

func GenForTest(id UserID, first, last string) (*User, error)

func GenWhenCreate

func GenWhenCreate(first, last string) (*User, error)

func (*User) CreatedAt

func (u *User) CreatedAt() shared.CreatedAt

func (*User) FirstName

func (u *User) FirstName() string

func (*User) ID

func (u *User) ID() UserID

func (*User) LastName

func (u *User) LastName() string

func (*User) Update

func (u *User) Update(first, last string) error

type UserID

type UserID string

func NewUserID

func NewUserID() UserID

func NewUserIDByVal

func NewUserIDByVal(val string) (UserID, error)

func (UserID) Equal

func (id UserID) Equal(userID2 UserID) bool

func (UserID) String

func (id UserID) String() string

type UserRepository

type UserRepository interface {
	Store(ctx context.Context, user *User) error
	Update(ctx context.Context, user *User) error
	FindAll(ctx context.Context) ([]*User, error)
	FindByID(ctx context.Context, userID UserID) (*User, error)
}

Jump to

Keyboard shortcuts

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