user

package
v0.0.0-...-4d54a63 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: BSD-3-Clause Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email string

func NewEmail

func NewEmail(v string) (*Email, error)

func (*Email) String

func (i *Email) String() string

type Name

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

func NewName

func NewName(firstName string, lastName string) (*Name, error)

func (*Name) FullName

func (n *Name) FullName() string

func (*Name) String

func (n *Name) String() string

type User

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

func Load

func Load(
	id string,
	first_name string,
	last_name string,
	email string,
) (*User, error)

func New

func New(
	first_name string,
	last_name string,
	email string,
) (*User, error)

func (*User) FullName

func (u *User) FullName() string

func (User) MarshalJSON

func (u User) MarshalJSON() ([]byte, error)

func (*User) String

func (u *User) String() string

type UserID

type UserID string

func NewUserID

func NewUserID(v string) (*UserID, error)

func (*UserID) String

func (i *UserID) String() string

type UserRepository

type UserRepository interface {
	LoadByID(id UserID) (*User, error)
}

Jump to

Keyboard shortcuts

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