-
Notifications
You must be signed in to change notification settings - Fork 9
/
CreateRoleResult.go
43 lines (38 loc) · 1.3 KB
/
CreateRoleResult.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
package moziacl
import (
"sync"
)
// CreateRoleResult 结构体
type CreateRoleResult struct {
// 创建角色返回data,此处无数据返回
Data string `json:"data,omitempty" xml:"data,omitempty"`
// 请求唯一id
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 响应message,若失败则返回失败原因
ResponseMessage string `json:"response_message,omitempty" xml:"response_message,omitempty"`
// 扩展字段,与入参扩展字段值相同
ResponseMetaData string `json:"response_meta_data,omitempty" xml:"response_meta_data,omitempty"`
// 响应code
ResponseCode string `json:"response_code,omitempty" xml:"response_code,omitempty"`
// 接口调用是否成功,若成功则为true
Success bool `json:"success,omitempty" xml:"success,omitempty"`
}
var poolCreateRoleResult = sync.Pool{
New: func() any {
return new(CreateRoleResult)
},
}
// GetCreateRoleResult() 从对象池中获取CreateRoleResult
func GetCreateRoleResult() *CreateRoleResult {
return poolCreateRoleResult.Get().(*CreateRoleResult)
}
// ReleaseCreateRoleResult 释放CreateRoleResult
func ReleaseCreateRoleResult(v *CreateRoleResult) {
v.Data = ""
v.RequestId = ""
v.ResponseMessage = ""
v.ResponseMetaData = ""
v.ResponseCode = ""
v.Success = false
poolCreateRoleResult.Put(v)
}