Documentation
¶
Index ¶
- type AdminActionResponse
- type ApologyEmailRequest
- type AuthErrorResponse
- type BulkEmailRequest
- type ChangePasswordRequest
- type ChangePasswordResponse
- type DeleteAccountResponse
- type GetUsersResponse
- type LoginRequest
- type LoginResponse
- type LogoutResponse
- type PasswordResetConfirmRequest
- type PasswordResetConfirmResponse
- type PasswordResetRequest
- type PasswordResetResponse
- type RegistrationRequest
- type RegistrationResponse
- type ResendOTPRequest
- type ResendOTPResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type UserData
- type UserProfileResponse
- type UserStatsResponse
- type VerifyOTPRequest
- type VerifyOTPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminActionResponse ¶
type AdminActionResponse struct {
Success bool `json:"success"`
StatusCode int `json:"status_code"`
Message string `json:"message"`
}
Admin Management DTOs
type ApologyEmailRequest ¶
type AuthErrorResponse ¶
type AuthErrorResponse struct {
Error string `json:"error,omitempty"`
Success bool `json:"success"`
StatusCode int `json:"status_code"`
ErrorMessage string `json:"error_message,omitempty"`
Errors interface{} `json:"errors,omitempty"`
}
Generic Auth Error Response
type BulkEmailRequest ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct {
OldPassword string `json:"old_password" binding:"required"`
NewPassword string `json:"new_password" binding:"required,min=8"`
}
Change Password DTOs (Django's ChangeUserPasswordSerializer equivalent)
type ChangePasswordResponse ¶
type DeleteAccountResponse ¶
type DeleteAccountResponse struct {
Detail string `json:"detail"`
}
Delete Account Response
type GetUsersResponse ¶
type LoginRequest ¶
type LoginRequest struct {
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required"`
}
Login DTOs (Django's UserLoginSerializer equivalent)
type LoginResponse ¶
type LoginResponse struct {
Message string `json:"message,omitempty"`
UserID string `json:"user_id,omitempty"`
UserEmail string `json:"user_email,omitempty"`
Token string `json:"token,omitempty"`
StatusCode int `json:"status_code"`
Success bool `json:"success,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
}
type LogoutResponse ¶
type LogoutResponse struct {
Message string `json:"message"`
Success bool `json:"success"`
StatusCode int `json:"status_code"`
}
Logout Response
type PasswordResetRequest ¶
type PasswordResetRequest struct {
Email string `json:"email" binding:"required,email"`
}
Password Reset DTOs
type PasswordResetResponse ¶
type RegistrationRequest ¶
type RegistrationRequest struct {
Username string `json:"username" binding:"required"`
Email string `json:"email" binding:"required,email"`
FirstName string `json:"first_name" binding:"required"`
LastName string `json:"last_name" binding:"required"`
Password string `json:"password" binding:"required,min=8"`
}
Registration DTOs (Django's RegistrationSerializer equivalent)
type RegistrationResponse ¶
type RegistrationResponse struct {
Response string `json:"response"`
Success bool `json:"success"`
StatusCode int `json:"status_code"`
Data *UserData `json:"data,omitempty"`
UserID string `json:"user_id,omitempty"`
Token string `json:"token,omitempty"`
DateJoined time.Time `json:"date_joined,omitempty"`
IsVerified bool `json:"is_verified,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
}
type ResendOTPRequest ¶
type ResendOTPRequest struct {
Email string `json:"email" binding:"required,email"`
}
Resend OTP DTOs (Django's ResendOTPSerializer equivalent)
type ResendOTPResponse ¶
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Username string `json:"username,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Height float64 `json:"height,omitempty" binding:"min=0"`
Weight float64 `json:"weight,omitempty" binding:"min=0"`
}
User Management DTOs
type UpdateUserResponse ¶
type UserData ¶
type UserData struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
IsActive bool `json:"is_active"`
IsVerified bool `json:"is_verified"`
DateJoined time.Time `json:"date_joined"`
LastLogin *time.Time `json:"last_login"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ProfileImageURL string `json:"profile_image_url,omitempty"`
}
User Data DTOs (Django's UserSerializer equivalent)
type UserProfileResponse ¶
type UserStatsResponse ¶
type VerifyOTPRequest ¶
type VerifyOTPRequest struct {
Email string `json:"email" binding:"required,email"`
OTP string `json:"otp" binding:"required,len=6"`
}
OTP Verification DTOs (Django's VerifyUserSerializer equivalent)
type VerifyOTPResponse ¶
Click to show internal directories.
Click to hide internal directories.