domain

package
v0.0.0-...-2847b59 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 0 Imported by: 10

Documentation

Index

Constants

View Source
const CreateUserRegistrationEventType = "CreateUserRegistrationEvent"
View Source
const RegistrationStatusActive = "RegistrationStatusActive"
View Source
const RegistrationStatusDeleted = "RegistrationStatusDeleted"
View Source
const RegistrationStatusInactive = "RegistrationStatusInactive"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

type AuthRepository interface {
	GetRegistrationByEmail(email string) (*UserRegistration, error)
	Create(u *UserRegistration) error
}

type AuthService

type AuthService interface {
	GetRegistrationByEmail(email string) (*UserRegistration, error)
	Create(u *UserRegistration) error
}

type CreateUserRegistrationEvent

type CreateUserRegistrationEvent struct {
	Event
	UserEmail string
}

New user Registration event

func NewCreateUserRegistrationEvent

func NewCreateUserRegistrationEvent(id string, email string) CreateUserRegistrationEvent

type Event

type Event struct {
	EventId string
	Type    string
}

Type Event represents a

type RegistrationStatus

type RegistrationStatus string

type User

type User struct {
	Id      int64
	Uuid    string
	Name    string
	Surname string
	Email   string
}

User represents a user in the System

type UserRegistration

type UserRegistration struct {
	Id           int64              `db:"user_id"`
	Email        string             `db:"user_email"`
	Uuid         string             `db:"user_uuid"`
	Status       RegistrationStatus `db:"user_status"`
	PasswordHash string             `db:"user_password"`
}

type UserRepository

type UserRepository interface {
	All() ([]*User, error)
	Create(u *User) error
	Update(u *User) error
}

type UserService

type UserService interface {
	Users() ([]*User, error)
	Create(u *User) error
	Update(u *User) error
}

Jump to

Keyboard shortcuts

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