Documentation ¶
Index ¶
- type Session
- type SessionRepository
- type Type
- type User
- func (u *User) ActiveSession() *Session
- func (u *User) BirthDate() time.Time
- func (u *User) Document() string
- func (u *User) Email() string
- func (u *User) ID() uuid.UUID
- func (u *User) Name() string
- func (u *User) NewSession(sessionId uuid.UUID, createdAt time.Time, d time.Duration, secretKey string) (string, error)
- func (u *User) Password() string
- func (u *User) Type() Type
- type UserOption
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionRepository ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(id uuid.UUID, document, name, email string, birthDate time.Time, userOpts ...UserOption) (*User, error)
NewUser creates a new user
func (*User) ActiveSession ¶
func (*User) NewSession ¶
type UserOption ¶
func WithPassword ¶
func WithPassword(password string) UserOption
func WithPasswordHashed ¶
func WithPasswordHashed(passwordHashed string) UserOption
func WithType ¶
func WithType(userType Type) UserOption
Click to show internal directories.
Click to hide internal directories.