-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add UFS and part of USMS to private (#57)
- Loading branch information
Showing
30 changed files
with
1,522 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UFS ClearUFSVolumeWhiteList | ||
|
||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// ClearUFSVolumeWhiteListRequest is request schema for ClearUFSVolumeWhiteList action | ||
type ClearUFSVolumeWhiteListRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) | ||
// ProjectId *string `required:"false"` | ||
|
||
// 文件系统ID | ||
VolumeId *string `required:"true"` | ||
} | ||
|
||
// ClearUFSVolumeWhiteListResponse is response schema for ClearUFSVolumeWhiteList action | ||
type ClearUFSVolumeWhiteListResponse struct { | ||
response.CommonBase | ||
} | ||
|
||
// NewClearUFSVolumeWhiteListRequest will create request of ClearUFSVolumeWhiteList action. | ||
func (c *UFSClient) NewClearUFSVolumeWhiteListRequest() *ClearUFSVolumeWhiteListRequest { | ||
req := &ClearUFSVolumeWhiteListRequest{} | ||
|
||
// setup request with client config | ||
c.client.SetupRequest(req) | ||
|
||
// setup retryable with default retry policy (retry for non-create action and common error) | ||
req.SetRetryable(true) | ||
return req | ||
} | ||
|
||
// ClearUFSVolumeWhiteList - 清除文件系统白名单 | ||
func (c *UFSClient) ClearUFSVolumeWhiteList(req *ClearUFSVolumeWhiteListRequest) (*ClearUFSVolumeWhiteListResponse, error) { | ||
var err error | ||
var res ClearUFSVolumeWhiteListResponse | ||
|
||
err = c.client.InvokeAction("ClearUFSVolumeWhiteList", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/auth" | ||
) | ||
|
||
// UFSClient is the client of UFS | ||
type UFSClient struct { | ||
client *ucloud.Client | ||
} | ||
|
||
// NewClient will return a instance of UFSClient | ||
func NewClient(config *ucloud.Config, credential *auth.Credential) *UFSClient { | ||
client := ucloud.NewClient(config, credential) | ||
return &UFSClient{ | ||
client: client, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UFS AddUFSVolumeMountPoint | ||
|
||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// AddUFSVolumeMountPointRequest is request schema for AddUFSVolumeMountPoint action | ||
type AddUFSVolumeMountPointRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) | ||
// ProjectId *string `required:"false"` | ||
|
||
// 文件系统ID | ||
VolumeId *string `required:"true"` | ||
|
||
// 挂载点名称 | ||
MountPointName *string `required:"true"` | ||
|
||
// Vpc ID | ||
VpcId *string `required:"true"` | ||
|
||
// Subnet ID | ||
SubnetId *string `required:"true"` | ||
} | ||
|
||
// AddUFSVolumeMountPointResponse is response schema for AddUFSVolumeMountPoint action | ||
type AddUFSVolumeMountPointResponse struct { | ||
response.CommonBase | ||
} | ||
|
||
// NewAddUFSVolumeMountPointRequest will create request of AddUFSVolumeMountPoint action. | ||
func (c *UFSClient) NewAddUFSVolumeMountPointRequest() *AddUFSVolumeMountPointRequest { | ||
req := &AddUFSVolumeMountPointRequest{} | ||
|
||
// setup request with client config | ||
c.client.SetupRequest(req) | ||
|
||
// setup retryable with default retry policy (retry for non-create action and common error) | ||
req.SetRetryable(true) | ||
return req | ||
} | ||
|
||
// AddUFSVolumeMountPoint - 添加文件系统挂载点 | ||
func (c *UFSClient) AddUFSVolumeMountPoint(req *AddUFSVolumeMountPointRequest) (*AddUFSVolumeMountPointResponse, error) { | ||
var err error | ||
var res AddUFSVolumeMountPointResponse | ||
|
||
err = c.client.InvokeAction("AddUFSVolumeMountPoint", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/auth" | ||
) | ||
|
||
// UFSClient is the client of UFS | ||
type UFSClient struct { | ||
client *ucloud.Client | ||
} | ||
|
||
// NewClient will return a instance of UFSClient | ||
func NewClient(config *ucloud.Config, credential *auth.Credential) *UFSClient { | ||
client := ucloud.NewClient(config, credential) | ||
return &UFSClient{ | ||
client: client, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UFS CreateUFSVolume | ||
|
||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// CreateUFSVolumeRequest is request schema for CreateUFSVolume action | ||
type CreateUFSVolumeRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) | ||
// ProjectId *string `required:"false"` | ||
|
||
// 文件系统大小,大小1024G ~ 25600G (1T ~ 25T),必须为1024的整数倍。 | ||
Size *int `required:"true"` | ||
|
||
// 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 | ||
StorageType *string `required:"false"` | ||
|
||
// 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 | ||
ProtocolType *string `required:"false"` | ||
|
||
// 文件系统名称 | ||
VolumeName *string `required:"false"` | ||
|
||
// 备注 | ||
Remark *string `required:"false"` | ||
|
||
// 文件系统所属业务组 | ||
Tag *string `required:"false"` | ||
|
||
// 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic | ||
ChargeType *string `required:"false"` | ||
|
||
// 购买时长 默认: 1 | ||
Quantity *int `required:"false"` | ||
|
||
// 使用的代金券id | ||
CouponId *string `required:"false"` | ||
} | ||
|
||
// CreateUFSVolumeResponse is response schema for CreateUFSVolume action | ||
type CreateUFSVolumeResponse struct { | ||
response.CommonBase | ||
|
||
// 文件系统名称 | ||
VolumeName string | ||
|
||
// 文件系统ID | ||
VolumeId string | ||
|
||
// 文件系统挂载点状态 | ||
VolumeStatus string | ||
} | ||
|
||
// NewCreateUFSVolumeRequest will create request of CreateUFSVolume action. | ||
func (c *UFSClient) NewCreateUFSVolumeRequest() *CreateUFSVolumeRequest { | ||
req := &CreateUFSVolumeRequest{} | ||
|
||
// setup request with client config | ||
c.client.SetupRequest(req) | ||
|
||
// setup retryable with default retry policy (retry for non-create action and common error) | ||
req.SetRetryable(true) | ||
return req | ||
} | ||
|
||
// CreateUFSVolume - 创建文件系统 | ||
func (c *UFSClient) CreateUFSVolume(req *CreateUFSVolumeRequest) (*CreateUFSVolumeResponse, error) { | ||
var err error | ||
var res CreateUFSVolumeResponse | ||
|
||
err = c.client.InvokeAction("CreateUFSVolume", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UFS DescribeUFSVolume | ||
|
||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// DescribeUFSVolumeRequest is request schema for DescribeUFSVolume action | ||
type DescribeUFSVolumeRequest struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) | ||
// ProjectId *string `required:"false"` | ||
|
||
// 文件系统ID | ||
VolumeId *string `required:"false"` | ||
|
||
// 文件列表起始 | ||
Offset *int `required:"false"` | ||
|
||
// 文件列表长度 | ||
Limit *int `required:"false"` | ||
} | ||
|
||
// DescribeUFSVolumeResponse is response schema for DescribeUFSVolume action | ||
type DescribeUFSVolumeResponse struct { | ||
response.CommonBase | ||
|
||
// 文件系统总数 | ||
TotalCount int | ||
|
||
// 文件系统详细信息列表 | ||
DataSet []UFSVolumeInfo | ||
} | ||
|
||
// NewDescribeUFSVolumeRequest will create request of DescribeUFSVolume action. | ||
func (c *UFSClient) NewDescribeUFSVolumeRequest() *DescribeUFSVolumeRequest { | ||
req := &DescribeUFSVolumeRequest{} | ||
|
||
// setup request with client config | ||
c.client.SetupRequest(req) | ||
|
||
// setup retryable with default retry policy (retry for non-create action and common error) | ||
req.SetRetryable(true) | ||
return req | ||
} | ||
|
||
// DescribeUFSVolume - 获取文件系统列表 | ||
func (c *UFSClient) DescribeUFSVolume(req *DescribeUFSVolumeRequest) (*DescribeUFSVolumeResponse, error) { | ||
var err error | ||
var res DescribeUFSVolumeResponse | ||
|
||
err = c.client.InvokeAction("DescribeUFSVolume", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors. | ||
//go:generate ucloud-gen-go-api UFS DescribeUFSVolume2 | ||
|
||
package ufs | ||
|
||
import ( | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/request" | ||
"github.com/ucloud/ucloud-sdk-go/ucloud/response" | ||
) | ||
|
||
// DescribeUFSVolume2Request is request schema for DescribeUFSVolume2 action | ||
type DescribeUFSVolume2Request struct { | ||
request.CommonBase | ||
|
||
// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) | ||
// Region *string `required:"true"` | ||
|
||
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) | ||
// ProjectId *string `required:"false"` | ||
|
||
// 文件系统ID | ||
VolumeId *string `required:"false"` | ||
|
||
// 文件列表起始 | ||
Offset *int `required:"false"` | ||
|
||
// 文件列表长度 | ||
Limit *int `required:"false"` | ||
|
||
// 枚举值,是否拉取性能型文件系统列表,1表示只拉取容量型文件系统列表,默认为0 | ||
OnlyBasic *int `required:"false"` | ||
} | ||
|
||
// DescribeUFSVolume2Response is response schema for DescribeUFSVolume2 action | ||
type DescribeUFSVolume2Response struct { | ||
response.CommonBase | ||
|
||
// 文件系统总数 | ||
TotalCount int | ||
|
||
// 文件系统详细信息列表 | ||
DataSet []UFSVolumeInfo2 | ||
} | ||
|
||
// NewDescribeUFSVolume2Request will create request of DescribeUFSVolume2 action. | ||
func (c *UFSClient) NewDescribeUFSVolume2Request() *DescribeUFSVolume2Request { | ||
req := &DescribeUFSVolume2Request{} | ||
|
||
// setup request with client config | ||
c.client.SetupRequest(req) | ||
|
||
// setup retryable with default retry policy (retry for non-create action and common error) | ||
req.SetRetryable(true) | ||
return req | ||
} | ||
|
||
// DescribeUFSVolume2 - 获取文件系统列表 | ||
func (c *UFSClient) DescribeUFSVolume2(req *DescribeUFSVolume2Request) (*DescribeUFSVolume2Response, error) { | ||
var err error | ||
var res DescribeUFSVolume2Response | ||
|
||
err = c.client.InvokeAction("DescribeUFSVolume2", req, &res) | ||
if err != nil { | ||
return &res, err | ||
} | ||
|
||
return &res, nil | ||
} |
Oops, something went wrong.