Files
test_deploy/internal/auth/domain.go
Alex Shevchuk d84487d238 1
2025-08-18 17:12:04 +03:00

105 lines
1.6 KiB
Go

package auth
type (
User struct {
Email string
Password string
FirstName string
SecondName string
Patronymic *string
Number string
Permissions map[string]string
}
RegisterUserRequest struct {
User User
UserType int32
}
RegisterUserResponse struct {
UserId string
}
)
type (
LoginUserRequest struct {
Email string
Password string
}
LoginUserResponse struct {
UserId string `json:"user_id"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
)
type (
GetUserTokenResponse struct {
AccessToken string `json:"access_token"`
}
)
type (
LogoutUserRequest struct {
RefreshToken string
}
)
type (
GetNewAccessTokenRequest struct {
RefreshToken string
}
GetNewAccessTokenResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
)
type (
UserInfoFromToken struct {
UserId string
}
)
type (
GetPermissionsByUsersIdResponse struct {
Balance string
Company string
Employees string
Profile string
Submissions string
Vacancies string
}
)
type (
CheckPermissionsRequest struct {
UserId string
RequiredPermission string
RequiredPermissionLevel string
}
)
type (
ResetPasswordRequest struct {
Email string
NewPassword string
}
)
type (
UserInfo struct {
Email string
FirstName string
SecondName string
Patronymic *string
Permissions map[string]string
UserType int32
}
)
type GetEmailVerificationResponse struct {
EmailVerified bool `json:"email_verified"`
}