userdm

package
v0.0.0-...-280d410 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Career

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

type CareerID

type CareerID string

func NewCareerID

func NewCareerID() CareerID

func NewCareerIDByVal

func NewCareerIDByVal(val string) (CareerID, error)

func (CareerID) Equal

func (id CareerID) Equal(CareerID2 CareerID) bool

func (CareerID) String

func (id CareerID) String() string

type CareerParamIfCreate

type CareerParamIfCreate struct {
	Detail string
}

type CareerParamIfUpdate

type CareerParamIfUpdate struct {
	ID     *string
	Detail string
}

type Skill

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

type SkillID

type SkillID string

func NewSkillID

func NewSkillID() SkillID

func NewSkillIDByVal

func NewSkillIDByVal(val string) (SkillID, error)

func (SkillID) Equal

func (id SkillID) Equal(SkillID2 SkillID) bool

func (SkillID) String

func (id SkillID) String() string

type SkillParamIfCreate

type SkillParamIfCreate struct {
	TagID string
}

type SkillParamIfUpdate

type SkillParamIfUpdate struct {
	ID    *string
	TagID string
}

type User

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

func GenForTest

func GenForTest(
	id UserID,
	first,
	last string,
	careers []Career,
	skills []Skill,
) (*User, error)

func GenIfCreate

func GenIfCreate(
	first,
	last string,
	reqCareers []CareerParamIfCreate,
	reqSkills []SkillParamIfCreate,
) (*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,
	reqCareers []CareerParamIfUpdate,
	reqSkills []SkillParamIfUpdate,
) 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