Documentation ¶
Index ¶
- type ChangeEmailRequest
- type ChangePasswordRequest
- type ChangePasswordWithEmailRequest
- type ChangePasswordWithPhoneNumberRequest
- type DeleteSessionRequest
- type ErrorResponse
- type RefreshTokenRequest
- type ResetPasswordCompleteRequest
- type ResetPasswordRequest
- type ResetPasswordWithPhoneNumberRequest
- type SendVerificationCodeRequest
- type SignInRequest
- type SignInWithPhoneNumber
- type SignUpRequest
- type SocialAuth
- type SocialAuthComplete
- type StoreDeviceInfoRequest
- type UserPhoneNumberUpdateRequest
- type UserProfileUpdateRequest
- type UserUpdateRequest
- type VerifyEmailRequest
- type VerifyPhoneRequest
- type VerifyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeEmailRequest ¶
type ChangeEmailRequest struct { Email string `validate:"required,email,max=64" json:"email"` Password string `validate:"required,password" json:"password"` }
ChangeEmailRequest is the request body for updating a user's email
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { CurrentPassword string `validate:"required,password" json:"current_password"` NewPassword string `validate:"required,password" json:"new_password"` }
ChangePasswordRequest is the request body for updating a user's password
type DeleteSessionRequest ¶
type DeleteSessionRequest struct {
RefreshToken string `validate:"required" json:"refresh_token"`
}
type ErrorResponse ¶
type ErrorResponse struct { Field string `json:"field"` Reason string `json:"reason"` Expected string `json:"expected,omitempty"` }
func ValidateStruct ¶
func ValidateStruct(validatorStruct interface{}) []ErrorResponse
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
RefreshToken string `validate:"required" json:"refresh_token"`
}
type ResetPasswordRequest ¶
type ResetPasswordRequest struct {
Email string `validate:"required,email,min=5,max=64" json:"email"`
}
type ResetPasswordWithPhoneNumberRequest ¶
type ResetPasswordWithPhoneNumberRequest struct {
PhoneNumber string `validate:"required,min=10" json:"phone_number"`
}
type SendVerificationCodeRequest ¶
type SendVerificationCodeRequest struct {
Type string `validate:"required" json:"type"`
}
SendVerificationCodeRequest is the request body for sending a verification email or phone
type SignInRequest ¶
type SignInWithPhoneNumber ¶
type SignUpRequest ¶
type SocialAuth ¶
type SocialAuth struct { Provider string `validate:"required" json:"provider"` Name string `validate:"max=64,omitempty" json:"name"` Code string `validate:"required,min=10" json:"code"` Email string `validate:"max=64,omitempty" json:"email"` UserId string `validate:"omitempty" json:"user_id"` Picture string `validate:"omitempty" json:"picture"` }
type SocialAuthComplete ¶
type StoreDeviceInfoRequest ¶
type UserPhoneNumberUpdateRequest ¶
type UserPhoneNumberUpdateRequest struct {
PhoneNumber string `validate:"required" json:"phone_number"`
}
UserPhoneNumberUpdateRequest is the request body for updating a user's phone number
type UserProfileUpdateRequest ¶
type UserProfileUpdateRequest struct { Picture string `json:"picture,omitempty" validate:"omitempty,url"` Gender string `json:"gender,omitempty" validate:"oneof=F M O,omitempty,max=1"` Birthdate string `json:"birthdate,omitempty" validate:"omitempty"` Education string `json:"education,omitempty" validate:"omitempty"` Locale string `json:"locale,omitempty" validate:"omitempty"` Timezone string `json:"timezone,omitempty" validate:"omitempty"` }
UserProfileUpdateRequest @Description User profile update request
type UserUpdateRequest ¶
type UserUpdateRequest struct {
Name string `json:"name,omitempty" validate:"omitempty,min=2,max=50"`
}
UserUpdateRequest @Description User update request
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
VerificationCode string `validate:"required" json:"verification_code"`
}
type VerifyPhoneRequest ¶
type VerifyPhoneRequest struct {
VerificationCode string `validate:"required" json:"verification_code"`
}
type VerifyRequest ¶
type VerifyRequest struct {
Code string `validate:"required" json:"code"`
}
VerifyRequest is the request body for verifying a user's email
Click to show internal directories.
Click to hide internal directories.