Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e13b22f

Browse files
authored
use common/tags instead of package-defined tags struct (#374)
1 parent 914ac54 commit e13b22f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

openstack/vpcep/v1/services/requests.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package services
22

33
import (
44
"github.com/huaweicloud/golangsdk"
5+
"github.com/huaweicloud/golangsdk/openstack/common/tags"
56
)
67

78
// CreateOptsBuilder allows extensions to add parameters to the
@@ -33,6 +34,8 @@ type CreateOpts struct {
3334
VipPortID string `json:"vip_port_id,omitempty"`
3435
// Specifies whether the client IP address and port number or marker_id information is transmitted to the server.
3536
TCPProxy string `json:"tcp_proxy,omitempty"`
37+
// Specifies the resource tags in key/value format
38+
Tags []tags.ResourceTag `json:"tags,omitempty"`
3639
}
3740

3841
// PortOpts contains the port mappings opened to the VPC endpoint service.

openstack/vpcep/v1/services/results.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package services
22

33
import (
44
"github.com/huaweicloud/golangsdk"
5+
"github.com/huaweicloud/golangsdk/openstack/common/tags"
56
)
67

78
// Service contains the response of the VPC endpoint service
@@ -33,7 +34,7 @@ type Service struct {
3334
// whether the client IP address and port number or marker_id information is transmitted to the server
3435
TCPProxy string `json:"tcp_proxy"`
3536
// the resource tags
36-
Tags []ResourceTags `json:"tags"`
37+
Tags []tags.ResourceTag `json:"tags"`
3738
// the error message when the status of the VPC endpoint service changes to failed
3839
Error []ErrorInfo `json:"error"`
3940
// the creation time of the VPC endpoint service
@@ -52,11 +53,6 @@ type PortMapping struct {
5253
ServerPort int `json:"server_port"`
5354
}
5455

55-
type ResourceTags struct {
56-
Key string `json:"key"`
57-
Value string `json:"value"`
58-
}
59-
6056
type ErrorInfo struct {
6157
Code string `json:"error_code"`
6258
Message string `json:"error_message"`

0 commit comments

Comments
 (0)