commands

package
v0.0.0-...-f4832eb Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLogin

func HandleLogin(w http.ResponseWriter, r *http.Request)

func HandleLogout

func HandleLogout(w http.ResponseWriter, r *http.Request)

func HandlePublishConfirmationEmails

func HandlePublishConfirmationEmails(w http.ResponseWriter, r *http.Request)

func HandleReSendConfirmationEmail

func HandleReSendConfirmationEmail(w http.ResponseWriter, r *http.Request)

func HandleRegistration

func HandleRegistration(w http.ResponseWriter, r *http.Request)

func HandleVerifyRegistration

func HandleVerifyRegistration(w http.ResponseWriter, r *http.Request)

Types

type EmailConfiguration

type EmailConfiguration struct {
	Sender string
}

type LoginCommand

type LoginCommand struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (LoginCommand) Validate

func (c LoginCommand) Validate() error

type LoginCommandHandler

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

func NewLoginCommandHandler

func NewLoginCommandHandler(db *sql.DB, passwordHasher domain.PasswordHasher) *LoginCommandHandler

func (*LoginCommandHandler) Handle

func (h *LoginCommandHandler) Handle(ctx context.Context, request LoginCommand) (domain.Session, error)

type ProcessActivationCodesCommand

type ProcessActivationCodesCommand struct{}

type ProcessActivationCodesCommandHandler

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

func NewProcessActivationCodesCommandHandler

func NewProcessActivationCodesCommandHandler(
	db *sql.DB,
	emailClient *core.EmailClient,
	emailConfig EmailConfiguration,
) *ProcessActivationCodesCommandHandler

func (*ProcessActivationCodesCommandHandler) Handle

type ReSendActivationEmailCommand

type ReSendActivationEmailCommand struct {
	UserID uuid.UUID `json:"user_id"`
}

func (ReSendActivationEmailCommand) Validate

func (c ReSendActivationEmailCommand) Validate() error

type ReSendActivationEmailCommandHandler

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

func NewReSendActivationEmailCommandHandler

func NewReSendActivationEmailCommandHandler(
	db *sql.DB,
	emailClient *core.EmailClient,
	emailSender string,
) *ReSendActivationEmailCommandHandler

func (ReSendActivationEmailCommandHandler) Handle

type RegisterCommand

type RegisterCommand struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

func (RegisterCommand) Validate

func (c RegisterCommand) Validate() error

type RegisterCommandHandler

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

func NewRegisterCommandHandler

func NewRegisterCommandHandler(db *sql.DB, passwordHasher domain.PasswordHasher) *RegisterCommandHandler

func (*RegisterCommandHandler) Handle

type VerifyRegistrationCommand

type VerifyRegistrationCommand struct {
	Token string `json:"token"`
}

func (VerifyRegistrationCommand) Validate

func (c VerifyRegistrationCommand) Validate() error

type VerifyRegistrationCommandHandler

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

func NewVerifyRegistrationCommandHandler

func NewVerifyRegistrationCommandHandler(db *sql.DB) *VerifyRegistrationCommandHandler

func (*VerifyRegistrationCommandHandler) Handle

Jump to

Keyboard shortcuts

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