Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct {
OldPassword string `json:"old_password" validate:"required"`
NewPassword string `json:"new_password" validate:"required,min=8,max=72"`
}
ChangePasswordRequest represents password change request.
@Description Request to change user's password (requires old password for verification).
type LoginRequest ¶
type LoginRequest struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required"`
}
LoginRequest represents user login data.
@Description User login credentials.
type LoginResponse ¶
type LoginResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
User UserResponseDTO `json:"user"`
}
LoginResponse represents successful login response.
@Description Successful login response containing JWT token, refresh token, and user info.
type LogoutRequest ¶ added in v0.1.0
type LogoutRequest struct {
RefreshToken string `json:"refresh_token" validate:"required"`
}
LogoutRequest represents a logout request.
@Description Request to invalidate a refresh token on logout.
type RefreshRequest ¶ added in v0.1.0
type RefreshRequest struct {
RefreshToken string `json:"refresh_token" validate:"required"`
}
RefreshRequest represents a token refresh request.
@Description Request to refresh an access token using a refresh token.
type RefreshResponse ¶ added in v0.1.0
type RefreshResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
RefreshResponse represents a successful token refresh response.
@Description Response containing a new access token and a rotated refresh token.
type RegisterRequest ¶
type RegisterRequest struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required,min=8,max=72"`
}
RegisterRequest represents user registration data.
@Description User registration request with email and password.
type UserResponseDTO ¶
type UserResponseDTO struct {
ID int64 `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
Role users.Role `json:"role"`
Status users.Status `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
UserResponseDTO represents user data in responses (without password).
@Description User data returned in API responses (password excluded).
Click to show internal directories.
Click to hide internal directories.