package application
import "github.com/go-arrower/arrower/contexts/auth/internal/application"
Index ¶
- Variables
- func NewBlockUserRequestHandler(repo domain.Repository) app.Request[BlockUserRequest, BlockUserResponse]
- func NewListUsersQueryHandler(repo domain.Repository) app.Query[ListUsersQuery, ListUsersResponse]
- func NewLoginUserRequestHandler( logger alog.Logger, repo domain.Repository, queue jobs.Enqueuer, authenticator *domain.AuthenticationService, ) app.Request[LoginUserRequest, LoginUserResponse]
- func NewNewUserCommandHandler( repo domain.Repository, registrator *domain.RegistrationService, ) app.Command[NewUserCommand]
- func NewRegisterUserRequestHandler( logger alog.Logger, repo domain.Repository, registrator *domain.RegistrationService, queue jobs.Enqueuer, ) app.Request[RegisterUserRequest, RegisterUserResponse]
- func NewSendNewUserVerificationEmailJobHandler( logger alog.Logger, repo domain.Repository, ) app.Job[NewUserVerificationEmail]
- func NewShowUserQueryHandler( repo domain.Repository, ) app.Query[ShowUserQuery, ShowUserResponse]
- func NewUnblockUserRequestHandler(repo domain.Repository) app.Request[UnblockUserRequest, UnblockUserResponse]
- func NewVerifyUserCommandHandler(repo domain.Repository) app.Command[VerifyUserCommand]
- type BlockUserRequest
- type BlockUserResponse
- type ListUsersQuery
- type ListUsersResponse
- type LoginUserRequest
- type LoginUserResponse
- type NewUserCommand
- type NewUserVerificationEmail
- type RegisterUserRequest
- type RegisterUserResponse
- type SendConfirmationNewDeviceLoggedIn
- type ShowUserQuery
- type ShowUserResponse
- type UnblockUserRequest
- type UnblockUserResponse
- type UserApplication
- type VerifyUserCommand
Variables ¶
Functions ¶
func NewBlockUserRequestHandler ¶
func NewBlockUserRequestHandler(repo domain.Repository) app.Request[BlockUserRequest, BlockUserResponse]
func NewListUsersQueryHandler ¶
func NewListUsersQueryHandler(repo domain.Repository) app.Query[ListUsersQuery, ListUsersResponse]
func NewLoginUserRequestHandler ¶
func NewLoginUserRequestHandler( logger alog.Logger, repo domain.Repository, queue jobs.Enqueuer, authenticator *domain.AuthenticationService, ) app.Request[LoginUserRequest, LoginUserResponse]
func NewNewUserCommandHandler ¶
func NewNewUserCommandHandler( repo domain.Repository, registrator *domain.RegistrationService, ) app.Command[NewUserCommand]
func NewRegisterUserRequestHandler ¶
func NewRegisterUserRequestHandler( logger alog.Logger, repo domain.Repository, registrator *domain.RegistrationService, queue jobs.Enqueuer, ) app.Request[RegisterUserRequest, RegisterUserResponse]
func NewSendNewUserVerificationEmailJobHandler ¶
func NewSendNewUserVerificationEmailJobHandler( logger alog.Logger, repo domain.Repository, ) app.Job[NewUserVerificationEmail]
func NewShowUserQueryHandler ¶
func NewShowUserQueryHandler( repo domain.Repository, ) app.Query[ShowUserQuery, ShowUserResponse]
func NewUnblockUserRequestHandler ¶
func NewUnblockUserRequestHandler(repo domain.Repository) app.Request[UnblockUserRequest, UnblockUserResponse]
func NewVerifyUserCommandHandler ¶
func NewVerifyUserCommandHandler(repo domain.Repository) app.Command[VerifyUserCommand]
Types ¶
type BlockUserRequest ¶
type BlockUserResponse ¶
type ListUsersQuery ¶
type ListUsersResponse ¶
type LoginUserRequest ¶
type LoginUserRequest struct { LoginEmail string `form:"login" validate:"max=1024,required,email"` Password string `form:"password" validate:"max=1024,min=8"` IsNewDevice bool UserAgent string `validate:"max=2048"` IP string `validate:"ip"` SessionKey string }
type LoginUserResponse ¶
type NewUserCommand ¶
type NewUserCommand struct { Email string `form:"email" validate:"max=1024,required,email"` FirstName string `form:"firstName" validate:"max=1024"` LastName string `form:"lastName" validate:"max=1024"` DisplayName string `form:"displayName" validate:"max=1024"` Superuser bool `form:"superuser" validate:"boolean"` }
type NewUserVerificationEmail ¶
type NewUserVerificationEmail struct { UserID domain.ID OccurredAt time.Time IP domain.ResolvedIP Device domain.Device }
type RegisterUserRequest ¶
type RegisterUserRequest struct { RegisterEmail string `form:"login" validate:"max=1024,required,email"` Password string `form:"password" validate:"max=1024,min=8"` PasswordConfirmation string `form:"password_confirmation" validate:"max=1024,eqfield=Password"` AcceptedTermsOfService bool `form:"tos" validate:"required"` UserAgent string `validate:"max=2048"` IP string `validate:"ip"` SessionKey string }
type RegisterUserResponse ¶
type RegisterUserResponse struct { User domain.Descriptor }
type SendConfirmationNewDeviceLoggedIn ¶
type SendConfirmationNewDeviceLoggedIn struct { UserID domain.ID OccurredAt time.Time IP domain.ResolvedIP Device domain.Device }
type ShowUserQuery ¶
type ShowUserResponse ¶
type UnblockUserRequest ¶
type UnblockUserResponse ¶
type UserApplication ¶
type UserApplication struct { RegisterUser app.Request[RegisterUserRequest, RegisterUserResponse] LoginUser app.Request[LoginUserRequest, LoginUserResponse] ListUsers app.Query[ListUsersQuery, ListUsersResponse] ShowUser app.Query[ShowUserQuery, ShowUserResponse] NewUser app.Command[NewUserCommand] VerifyUser app.Command[VerifyUserCommand] BlockUser app.Request[BlockUserRequest, BlockUserResponse] // todo refactor to a command UnblockUser app.Request[UnblockUserRequest, UnblockUserResponse] // todo refactor to a command }
type VerifyUserCommand ¶
type VerifyUserCommand struct { UserID domain.ID `validate:"required"` Token uuid.UUID `validate:"required"` }
Source Files ¶
app.go block-user.usecase.go list-users.usecase.go login-user.usecase.go new-user.usecase.go register-user.usecase.go send-new-user-verification-email.usecase.go show-user.usecase.go unblock-user.usecase.go verify-user.usecase.go
- Version
- v0.0.0-20250311203644-ab26c1152cb4 (latest)
- Published
- Mar 11, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 1 week ago –
Tools for package owners.