Documentation
¶
Overview ¶
Package dto provides Data Transfer Objects (Params) for authentication operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordParams ¶
type ChangePasswordParams struct {
UserID string `json:"userId"`
CurrentPassword string `json:"currentPassword" binding:"required"`
NewPassword string `json:"newPassword" binding:"required,min=6"`
Extra map[string]any `json:"extra,omitempty"`
}
ChangePasswordParams defines the payload for password change requests.
func (*ChangePasswordParams) Get ¶ added in v0.7.0
func (p *ChangePasswordParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from ChangePasswordParams.
func (*ChangePasswordParams) Set ¶ added in v0.7.0
func (p *ChangePasswordParams) Set(key string, value any)
Set safely attaches dynamic metadata to ChangePasswordParams.
type CreateSessionParams ¶
type CreateSessionParams struct {
UserID string `json:"user_id" binding:"required"`
DeviceID string `json:"device_id"`
Token string `json:"token" binding:"required"`
IPAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
ImpersonatedBy *string `json:"impersonated_by,omitempty"`
ExpiresAt time.Time `json:"expires_at" binding:"required"`
CreatedAt time.Time `json:"created_at" binding:"required"`
Extra map[string]any `json:"extra,omitempty"`
}
CreateSessionParams defines full session parameters passed to repository implementations with dynamic extra metadata.
func (*CreateSessionParams) Get ¶
func (p *CreateSessionParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata by key.
func (*CreateSessionParams) Set ¶
func (p *CreateSessionParams) Set(key string, value any)
Set allows plugins or handlers to safely attach dynamic metadata.
type CreateUserParams ¶
type CreateUserParams struct {
Email string `json:"email"`
PasswordHash string `json:"-"`
Name string `json:"name"`
Role string `json:"role,omitempty"`
Extra map[string]any `json:"extra,omitempty"`
}
CreateUserParams defines the mutable parameter payload passed to repository user creation operations.
func (*CreateUserParams) Get ¶
func (p *CreateUserParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata by key.
func (*CreateUserParams) Set ¶
func (p *CreateUserParams) Set(key string, value any)
Set allows plugins or handlers to safely attach dynamic metadata.
type ForgotPasswordParams ¶
type ForgotPasswordParams struct {
Email string `json:"email" binding:"required,email"`
Extra map[string]any `json:"extra,omitempty"`
}
ForgotPasswordParams defines the payload for requesting a password reset email.
func (*ForgotPasswordParams) Get ¶ added in v0.7.0
func (p *ForgotPasswordParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from ForgotPasswordParams.
func (*ForgotPasswordParams) Set ¶ added in v0.7.0
func (p *ForgotPasswordParams) Set(key string, value any)
Set safely attaches dynamic metadata to ForgotPasswordParams.
type ResetPasswordParams ¶
type ResetPasswordParams struct {
Token string `json:"token" binding:"required"`
NewPassword string `json:"newPassword" binding:"required,min=6"`
Extra map[string]any `json:"extra,omitempty"`
}
ResetPasswordParams defines the payload for setting a new password using a reset token.
func (*ResetPasswordParams) Get ¶ added in v0.7.0
func (p *ResetPasswordParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from ResetPasswordParams.
func (*ResetPasswordParams) Set ¶ added in v0.7.0
func (p *ResetPasswordParams) Set(key string, value any)
Set safely attaches dynamic metadata to ResetPasswordParams.
type SendVerificationEmailParams ¶ added in v0.7.0
type SendVerificationEmailParams struct {
Email string `json:"email" binding:"required,email"`
Extra map[string]any `json:"extra,omitempty"`
}
SendVerificationEmailParams defines the payload for requesting an email verification link or token.
func (*SendVerificationEmailParams) Get ¶ added in v0.7.0
func (p *SendVerificationEmailParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from SendVerificationEmailParams.
func (*SendVerificationEmailParams) Set ¶ added in v0.7.0
func (p *SendVerificationEmailParams) Set(key string, value any)
Set safely attaches dynamic metadata to SendVerificationEmailParams.
type SignInParams ¶
type SignInParams struct {
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required,min=6"`
Extra map[string]any `json:"extra,omitempty"`
}
SignInParams defines the credentials payload for authentication.
func (*SignInParams) Get ¶ added in v0.7.0
func (p *SignInParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from SignInParams.
func (*SignInParams) Set ¶ added in v0.7.0
func (p *SignInParams) Set(key string, value any)
Set safely attaches dynamic metadata to SignInParams.
type SignUpParams ¶
type SignUpParams struct {
Name string `json:"name" binding:"required"`
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required,min=6"`
Extra map[string]any `json:"extra,omitempty"`
}
SignUpParams defines the data payload for user registration.
func (*SignUpParams) Get ¶ added in v0.7.0
func (p *SignUpParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from SignUpParams.
func (*SignUpParams) Set ¶ added in v0.7.0
func (p *SignUpParams) Set(key string, value any)
Set safely attaches dynamic metadata to SignUpParams.
type UpdateUserParams ¶
type UpdateUserParams struct {
Name string `json:"name" binding:"required"`
Email string `json:"email" binding:"required,email"`
Extra map[string]any `json:"extra,omitempty"`
}
UpdateUserParams defines the data payload for updating user details.
type VerifyEmailParams ¶
type VerifyEmailParams struct {
Token string `json:"token" binding:"required"`
Extra map[string]any `json:"extra,omitempty"`
}
VerifyEmailParams defines the token payload for email verification.
func (*VerifyEmailParams) Get ¶ added in v0.7.0
func (p *VerifyEmailParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from VerifyEmailParams.
func (*VerifyEmailParams) Set ¶ added in v0.7.0
func (p *VerifyEmailParams) Set(key string, value any)
Set safely attaches dynamic metadata to VerifyEmailParams.
type VerifyPasswordParams ¶ added in v0.7.0
type VerifyPasswordParams struct {
UserID string `json:"userId" binding:"required"`
Password string `json:"password" binding:"required"`
Extra map[string]any `json:"extra,omitempty"`
}
VerifyPasswordParams defines the payload for checking if the provided password matches the user's current password.
func (*VerifyPasswordParams) Get ¶ added in v0.7.0
func (p *VerifyPasswordParams) Get(key string) (any, bool)
Get safely retrieves dynamic metadata from VerifyPasswordParams.
func (*VerifyPasswordParams) Set ¶ added in v0.7.0
func (p *VerifyPasswordParams) Set(key string, value any)
Set safely attaches dynamic metadata to VerifyPasswordParams.