Documentation ¶
Index ¶
- func IsAuthError(err error) bool
- func RecoverPassword(req *RecoverPassRequest) error
- func ResendCode(req *ResendCodeRequest) error
- func ResetPassword(req *ResetPasswordRequest) error
- func UpdatePassword(req *UpdatePassRequest) error
- func VerifyRecCode(req *VerifyRecCodeRequest) error
- type AuthError
- type ErrorDetails
- type LoginRequest
- type LoginResponse
- type RecoverPassRequest
- type RegisterRequest
- type RegisterResponse
- type ResendCodeRequest
- type ResetPasswordRequest
- type UpdatePassRequest
- type UpdateProfileRequest
- type UpdateProfileResponse
- type VerifyRecCodeRequest
- type VerifyRequest
- type VerifyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthError ¶
func RecoverPassword ¶ added in v2.0.1
func RecoverPassword(req *RecoverPassRequest) error
func ResendCode ¶
func ResendCode(req *ResendCodeRequest) error
func ResetPassword ¶ added in v2.0.1
func ResetPassword(req *ResetPasswordRequest) error
func UpdatePassword ¶ added in v2.0.1
func UpdatePassword(req *UpdatePassRequest) error
func VerifyRecCode ¶ added in v2.0.1
func VerifyRecCode(req *VerifyRecCodeRequest) error
Types ¶
type AuthError ¶
type AuthError struct { Message string Err error StatusCode int Details *ErrorDetails }
type ErrorDetails ¶
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { User struct { OID string `json:"oid"` COID string `json:"coid"` Name string `json:"name"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` Role string `json:"role"` EmailVerifiedAt interface{} `json:"email_verified_at"` } `json:"user"` AccessToken string `json:"access_token,omitempty"` ExpireAt *time.Time `json:"expire_at,omitempty"` }
func LoginUser ¶
func LoginUser(req *LoginRequest) (*LoginResponse, error)
type RecoverPassRequest ¶ added in v2.0.1
type RecoverPassRequest struct {
Email string `json:"email"`
}
type RegisterRequest ¶
type RegisterResponse ¶
type RegisterResponse struct { User struct { OID string `json:"oid"` COID string `json:"coid"` Name string `json:"name"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` Role string `json:"role"` EmailVerifiedAt interface{} `json:"email_verified_at"` } `json:"user"` Company struct { OCID string `json:"ocid"` Title string `json:"title"` } `json:"company"` }
func RegisterUser ¶
func RegisterUser(req *RegisterRequest) (*RegisterResponse, error)
type ResendCodeRequest ¶
type ResendCodeRequest struct {
Email string `json:"email"`
}
type ResetPasswordRequest ¶ added in v2.0.1
type UpdatePassRequest ¶ added in v2.0.1
type UpdateProfileRequest ¶ added in v2.0.1
type UpdateProfileResponse ¶ added in v2.0.1
type UpdateProfileResponse struct { User struct { OID string `json:"oid"` COID string `json:"coid"` Name string `json:"name"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` Role string `json:"role"` EmailVerifiedAt *time.Time `json:"email_verified_at"` } `json:"user"` Company struct { OCID string `json:"ocid"` Title string `json:"title"` } `json:"company"` }
func UpdateProfile ¶ added in v2.0.1
func UpdateProfile(req *UpdateProfileRequest) (*UpdateProfileResponse, error)
type VerifyRecCodeRequest ¶ added in v2.0.1
type VerifyRequest ¶
type VerifyResponse ¶
type VerifyResponse struct { AccessToken string `json:"access_token,omitempty"` ExpireAt *time.Time `json:"expire_at,omitempty"` OID string `json:"oid"` }
func VerifyUser ¶
func VerifyUser(req *VerifyRequest) (*VerifyResponse, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.