user

package
v0.0.0-...-34ec42c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 6 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 {
	entity.Entity
	// contains filtered or unexported fields
}

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

func (u *User) Email() string

Email returns the user's email address

func (*User) ImageData

func (u *User) ImageData() []byte

ImageUrl returns the user's image URL

func (*User) ImageUrl

func (u *User) ImageUrl() string

func (*User) JobTitle

func (u *User) JobTitle() string

JobTitle is the user's job title

func (*User) Name

func (u *User) Name() string

Name returns the user's name

func (*User) Password

func (u *User) Password() string

Password retrieves the hashed user password

func (*User) SetEmail

func (u *User) SetEmail(email string) (*User, error)

SetEmail updates the user's email address

func (*User) SetImageUrl

func (u *User) SetImageUrl(url string) *User

func (*User) SetJobTitle

func (u *User) SetJobTitle(title string) (*User, error)

SetJobTitle sets the job title and returns a copy of the user

func (*User) SetName

func (u *User) SetName(name string) (*User, error)

SetName returns the user's name

func (*User) SetSkills

func (u *User) SetSkills(skills []string) *User

SetSkill

func (*User) Skills

func (u *User) Skills() []string

Skills is a list of all the skills a user has

func (User) WithImage

func (u User) WithImage(imageUrl string) User

WithImage updates the image URL

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

type UserVerificationParams

type UserVerificationParams struct {
	ID         id.UUID
	Code       string
	UserId     id.UUID
	IsVerified bool
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

UserVerificationParams defines a structure with fields used to create a user verification struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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