user

package
v0.0.0-...-68e6ee4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: BSD-3-Clause Imports: 4 Imported by: 3

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 FirstName

type FirstName string

func NewFirstName

func NewFirstName(v string) (*FirstName, error)

func (*FirstName) String

func (i *FirstName) String() string

type LastName

type LastName string

func NewLastName

func NewLastName(v string) (*LastName, error)

func (*LastName) String

func (i *LastName) String() string

type User

type User struct {
	ID        *UserID   `json:"id"`
	FirstName FirstName `json:"first_name"`
	LastName  LastName  `json:"last_name"`
	Email     Email     `json:"email"`
}

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) 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