-
Notifications
You must be signed in to change notification settings - Fork 7
/
results.go
39 lines (31 loc) · 917 Bytes
/
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
package rules
import (
"github.com/huaweicloud/terraform-provider-hcs/huaweicloudstack/sdk/huaweicloud"
"github.com/huaweicloud/terraform-provider-hcs/huaweicloudstack/sdk/huaweicloud/openstack/iec/v1/common"
)
type commonResult struct {
golangsdk.Result
}
//RespSecurityGroupRule 获取安全组规则详情的结构体
type RespSecurityGroupRule struct {
SecurityGroupRule common.RespSecurityGroupRuleEntity `json:"security_group_rule"`
}
type CreateResult struct {
commonResult
}
func (r CreateResult) Extract() (*RespSecurityGroupRule, error) {
var entity RespSecurityGroupRule
err := r.ExtractIntoStructPtr(&entity, "")
return &entity, err
}
type DeleteResult struct {
golangsdk.ErrResult
}
type GetResult struct {
commonResult
}
func (r GetResult) Extract() (*RespSecurityGroupRule, error) {
var entity RespSecurityGroupRule
err := r.ExtractIntoStructPtr(&entity, "")
return &entity, err
}