-
Notifications
You must be signed in to change notification settings - Fork 0
/
Struct.go
54 lines (46 loc) · 1.49 KB
/
Struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package otplessAuthSdk
type UserDetailResult struct {
Success bool `json:"success"`
AuthTime int64 `json:"auth_time"`
Email string `json:"email"`
Name string `json:"name"`
PhoneNumber string `json:"phone_number"`
CountryCode string `json:"country_code"`
NationalPhoneNumber string `json:"national_phone_number"`
}
type MagicLinkResponse struct {
RequestIds []struct {
Type string `json:"type"`
Value string `json:"value"`
DestinationUri string `json:"destinationUri,omitempty"`
} `json:"requestIds"`
}
type SendOTPRequest struct {
PhoneNumber string `json:"phoneNumber,omitempty"`
Email string `json:"email,omitempty"`
Channel string `json:"channel,omitempty"`
Hash string `json:"hash,omitempty"`
OrderId string `json:"orderId,omitempty"`
Expiry int `json:"expiry,omitempty"`
OtpLength int `json:"otpLength,omitempty"`
TemplateId string `json:"templateId,omitempty"`
}
type SendOTPResponse struct {
OrderID string `json:"orderId"`
}
type ResendOTPRequest struct {
OrderID string `json:"orderId"`
}
type ResendOTPResponse struct {
OrderID string `json:"orderId"`
}
type VerifyOTPRequest struct {
OrderID string `json:"orderId"`
OTP string `json:"otp"`
Email string `json:"email"`
PhoneNumber string `json:"phoneNumber"`
}
type VerifyOTPResponse struct {
IsOTPVerified bool `json:"isOTPVerified"`
Reason string `json:"reason,omitempty"`
}