forked from huaweicloud/huaweicloud-sdk-go
/
results.go
99 lines (74 loc) · 2.16 KB
/
results.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package realnameauth
import "github.com/gophercloud/gophercloud"
type IndividualRealNameAuthResp struct {
//Error code.
ErrorCode string `json:"error_code"`
//Error description.
ErrorMsg string `json:"error_msg"`
//Whether to transfer to manual review
IsReview int `json:"isReview,omitempty"`
//Error list.
ErrorItems []string `json:"errorItems"`
}
type EnterpriseRealNameAuthResp struct {
//Error code.
ErrorCode string `json:"error_code"`
//Error description.
ErrorMsg string `json:"error_msg"`
//Whether to transfer to manual review
IsReview int `json:"isReview,omitempty"`
//Error list.
ErrorItems []string `json:"errorItems"`
}
type ChangeEnterpriseRealNameAuthResp struct {
//Error code.
ErrorCode string `json:"error_code"`
//Error description.
ErrorMsg string `json:"error_msg"`
//Whether to transfer to manual review
IsReview int `json:"isReview,omitempty"`
//Error list.
ErrorItems []string `json:"errorItems"`
}
type QueryRealNameAuthResp struct {
//Error code.
ErrorCode string `json:"error_code"`
//Error description.
ErrorMsg string `json:"error_msg"`
//Real-name authentication review result.
ReviewResult int `json:"reviewResult,omitempty"`
//Review comment.
Opinion string `json:"opinion"`
}
type IndividualRealNameAuthResult struct {
gophercloud.Result
}
type EnterpriseRealNameAuthResult struct {
gophercloud.Result
}
type ChangeEnterpriseRealNameAuthResult struct {
gophercloud.Result
}
type QueryRealNameAuthResult struct {
gophercloud.Result
}
func (r IndividualRealNameAuthResult) Extract() (*IndividualRealNameAuthResp, error) {
var res *IndividualRealNameAuthResp
err := r.ExtractInto(&res)
return res, err
}
func (r EnterpriseRealNameAuthResult) Extract() (*EnterpriseRealNameAuthResp, error) {
var res *EnterpriseRealNameAuthResp
err := r.ExtractInto(&res)
return res, err
}
func (r ChangeEnterpriseRealNameAuthResult) Extract() (*ChangeEnterpriseRealNameAuthResp, error) {
var res *ChangeEnterpriseRealNameAuthResp
err := r.ExtractInto(&res)
return res, err
}
func (r QueryRealNameAuthResult) Extract() (*QueryRealNameAuthResp, error) {
var res *QueryRealNameAuthResp
err := r.ExtractInto(&res)
return res, err
}