Documentation ¶
Index ¶
- type User
- func (u *User) Email() string
- func (u *User) ImageData() []byte
- func (u *User) ImageUrl() string
- func (u *User) JobTitle() string
- func (u *User) Name() string
- func (u *User) Password() string
- func (u *User) SetEmail(email string) (*User, error)
- func (u *User) SetImageUrl(url string) *User
- func (u *User) SetJobTitle(title string) (*User, error)
- func (u *User) SetName(name string) (*User, error)
- func (u *User) SetSkills(skills []string) *User
- func (u *User) Skills() []string
- func (u User) WithImage(imageUrl string) User
- type UserParams
- type UserVerification
- type UserVerificationParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
User structure represents a user entity in the system
func New ¶
func New(params UserParams) (User, error)
New creates a new user entity & potentially an error
func (*User) SetImageUrl ¶
func (*User) SetJobTitle ¶
SetJobTitle sets the job title and returns a copy of the user
type UserParams ¶
type UserParams struct { // EntityParams contain common parameters for an entity entity.EntityParams // Name is the user's name Name string // Email is the user's email address Email string // Password is the hashed password when creating a user Password string // ImageData is the image URL for the user ImageData []byte // ImageUrl is the URL of the image ImageUrl string // Skills is the list of skills this user has Skills []string // JobTitle is a user's job title JobTitle string }
type UserVerification ¶
type UserVerification struct {
// contains filtered or unexported fields
}
UserVerification is a structure that contains user verification details
func NewVerification ¶
func NewVerification(params UserVerificationParams) UserVerification
NewVerification creates a new user verification structure from a given params
func (*UserVerification) Code ¶
func (v *UserVerification) Code() string
Code retrieves the code of the verification
func (*UserVerification) CreatedAt ¶
func (v *UserVerification) CreatedAt() time.Time
CreatedAt retrieves the created at timestamp of the verification
func (*UserVerification) ID ¶
func (v *UserVerification) ID() id.UUID
ID retrieves the ID of the verification
func (*UserVerification) IsVerified ¶
func (v *UserVerification) IsVerified() bool
IsVerified retrieves the verification status
func (*UserVerification) UpdatedAt ¶
func (v *UserVerification) UpdatedAt() time.Time
UpdatedAt retrieves the updated at timestamp of the verification
func (*UserVerification) UserID ¶
func (v *UserVerification) UserID() id.UUID
UserID retrieves the user ID of the verification
Click to show internal directories.
Click to hide internal directories.