Documentation ¶
Overview ¶
* Copyright 2022 Baidu, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License.
* Copyright 2022 Baidu, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License.
Index ¶
- Constants
- func BindVpc(cli bce.Client, zoneId string, body *BindVpcRequest, clientToken string) error
- func DeletePrivateZone(cli bce.Client, zoneId string, clientToken string) error
- func DeleteRecord(cli bce.Client, recordId string, clientToken string) error
- func DisableRecord(cli bce.Client, recordId string, clientToken string) error
- func EnableRecord(cli bce.Client, recordId string, clientToken string) error
- func UnbindVpc(cli bce.Client, zoneId string, body *UnbindVpcRequest, clientToken string) error
- func UpdateRecord(cli bce.Client, recordId string, body *UpdateRecordRequest, clientToken string) error
- type AddRecordRequest
- type AddRecordResponse
- type BindVpcRequest
- type BindVpcRequestVpcIds
- type Client
- func (c *Client) AddRecord(zoneId string, body *AddRecordRequest) (*AddRecordResponse, error)
- func (c *Client) BindVpc(zoneId string, body *BindVpcRequest) error
- func (c *Client) CreatePrivateZone(body *CreatePrivateZoneRequest) (*CreatePrivateZoneResponse, error)
- func (c *Client) DeletePrivateZone(zoneId string, clientToken string) error
- func (c *Client) DeleteRecord(recordId string, clientToken string) error
- func (c *Client) DisableRecord(recordId string, clientToken string) error
- func (c *Client) EnableRecord(recordId string, clientToken string) error
- func (c *Client) GetPrivateZone(zoneId string) (*GetPrivateZoneResponse, error)
- func (c *Client) ListPrivateZone(request *ListPrivateZoneRequest) (*ListPrivateZoneResponse, error)
- func (c *Client) ListRecord(zoneId string) (*ListRecordResponse, error)
- func (c *Client) UnbindVpc(zoneId string, body *UnbindVpcRequest) error
- func (c *Client) UpdateRecord(recordId string, body *UpdateRecordRequest) error
- type CreatePrivateZoneRequest
- type CreatePrivateZoneResponse
- type DeletePrivateZoneRequest
- type DeleteRecordRequest
- type GetPrivateZoneResponse
- type GetPrivateZoneResponseBindVpcs
- type ListPrivateZoneRequest
- type ListPrivateZoneResponse
- type ListPrivateZoneResponseZones
- type ListRecordResponse
- type ListRecordResponseRecords
- type Record
- type UnbindVpcRequest
- type UnbindVpcRequestVpcIds
- type UpdateRecordRequest
- type Vpc
- type Zone
Constants ¶
const ( DEFAULT_SERVICE_DOMAIN = "http://privatezone.baidubce.com" DEFAULT_MAX_PARALLEL = 10 MULTIPART_ALIGN = 1 << 20 // 1MB MIN_MULTIPART_SIZE = 1 << 20 // 1MB DEFAULT_MULTIPART_SIZE = 12 * (1 << 20) // 12MB MAX_PART_NUMBER = 10000 )
Variables ¶
This section is empty.
Functions ¶
func BindVpc ¶
BindVpc -
PARAMS:
- cli: the client agent which can perform sending request
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- error: the return error if any occurs
func DeletePrivateZone ¶
DeletePrivateZone -
PARAMS:
- cli: the client agent which can perform sending request
- zoneId: zone的id
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- error: the return error if any occurs
func DeleteRecord ¶
DeleteRecord -
PARAMS:
- cli: the client agent which can perform sending request
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- error: the return error if any occurs
func DisableRecord ¶
DisableRecord -
PARAMS:
- cli: the client agent which can perform sending request
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
RETURNS:
- error: the return error if any occurs
func EnableRecord ¶
EnableRecord -
PARAMS:
- cli: the client agent which can perform sending request
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
RETURNS:
- error: the return error if any occurs
func UnbindVpc ¶
UnbindVpc -
PARAMS:
- cli: the client agent which can perform sending request
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- error: the return error if any occurs
func UpdateRecord ¶
func UpdateRecord(cli bce.Client, recordId string, body *UpdateRecordRequest, clientToken string) error
UpdateRecord -
PARAMS:
- cli: the client agent which can perform sending request
- recordId: 解析记录的ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- error: the return error if any occurs
Types ¶
type AddRecordRequest ¶
type AddRecordResponse ¶
type AddRecordResponse struct {
RecordId string `json:"recordId"`
}
func AddRecord ¶
func AddRecord(cli bce.Client, zoneId string, body *AddRecordRequest, clientToken string) ( *AddRecordResponse, error)
AddRecord -
PARAMS:
- cli: the client agent which can perform sending request
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- *api.AddRecordResponse:
- error: the return error if any occurs
type BindVpcRequest ¶
type BindVpcRequestVpcIds ¶
type BindVpcRequestVpcIds struct { }
type Client ¶
type Client struct { *bce.BceClient // Fileds that used in parallel operation for BOS service MaxParallel int64 MultipartSize int64 }
Client of bcd service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the bcd service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) AddRecord ¶
func (c *Client) AddRecord(zoneId string, body *AddRecordRequest) ( *AddRecordResponse, error)
AddRecord -
PARAMS:
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body: body参数
RETURNS:
- *api.AddRecordResponse:
- error: the return error if any occurs
func (*Client) BindVpc ¶
func (c *Client) BindVpc(zoneId string, body *BindVpcRequest) error
BindVpc -
PARAMS:
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body: body参数
RETURNS:
- error: the return error if any occurs
func (*Client) CreatePrivateZone ¶
func (c *Client) CreatePrivateZone(body *CreatePrivateZoneRequest) ( *CreatePrivateZoneResponse, error)
CreatePrivateZone -
PARAMS:
- body: body参数
RETURNS:
- *api.CreatePrivateZoneResponse:
- error: the return error if any occurs
func (*Client) DeletePrivateZone ¶
DeletePrivateZone -
PARAMS:
- zoneId: zone的id
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
RETURNS:
- error: the return error if any occurs
func (*Client) DeleteRecord ¶
DeleteRecord -
PARAMS:
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body: body参数
RETURNS:
- error: the return error if any occurs
func (*Client) DisableRecord ¶
DisableRecord -
PARAMS:
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
RETURNS:
- error: the return error if any occurs
func (*Client) EnableRecord ¶
EnableRecord -
PARAMS:
- recordId: 解析记录ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
RETURNS:
- error: the return error if any occurs
func (*Client) GetPrivateZone ¶
func (c *Client) GetPrivateZone(zoneId string) (*GetPrivateZoneResponse, error)
GetPrivateZone -
PARAMS:
- zoneId: zone的ID
RETURNS:
- *api.GetPrivateZoneResponse:
- error: the return error if any occurs
func (*Client) ListPrivateZone ¶
func (c *Client) ListPrivateZone(request *ListPrivateZoneRequest) ( *ListPrivateZoneResponse, error)
ListPrivateZone -
PARAMS:
- request: 获取privateZone列表的入参
RETURNS:
- *api.ListPrivateZoneResponse:
- error: the return error if any occurs
func (*Client) ListRecord ¶
func (c *Client) ListRecord(zoneId string) (*ListRecordResponse, error)
ListRecord -
PARAMS:
- zoneId: Zone的ID
RETURNS:
- *api.ListRecordResponse:
- error: the return error if any occurs
func (*Client) UnbindVpc ¶
func (c *Client) UnbindVpc(zoneId string, body *UnbindVpcRequest) error
UnbindVpc -
PARAMS:
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body: body参数
RETURNS:
- error: the return error if any occurs
func (*Client) UpdateRecord ¶
func (c *Client) UpdateRecord(recordId string, body *UpdateRecordRequest) error
UpdateRecord -
PARAMS:
- recordId: 解析记录的ID
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body: body参数
RETURNS:
- error: the return error if any occurs
type CreatePrivateZoneResponse ¶
type CreatePrivateZoneResponse struct {
ZoneId string `json:"zoneId"`
}
func CreatePrivateZone ¶
func CreatePrivateZone(cli bce.Client, body *CreatePrivateZoneRequest, clientToken string) ( *CreatePrivateZoneResponse, error)
CreatePrivateZone -
PARAMS:
- cli: the client agent which can perform sending request
- clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
- body:
RETURNS:
- *api.CreatePrivateZoneResponse:
- error: the return error if any occurs
type DeletePrivateZoneRequest ¶
type DeletePrivateZoneRequest struct {
ZoneName string `json:"zoneName"`
}
type DeleteRecordRequest ¶
type GetPrivateZoneResponse ¶
type GetPrivateZoneResponse struct { ZoneId string `json:"zoneId"` ZoneName string `json:"zoneName"` RecordCount int32 `json:"recordCount"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` BindVpcs []Vpc `json:"bindVpcs"` }
func GetPrivateZone ¶
func GetPrivateZone(cli bce.Client, zoneId string) (*GetPrivateZoneResponse, error)
GetPrivateZone -
PARAMS:
- cli: the client agent which can perform sending request
- zoneId: zone的ID
RETURNS:
- *api.GetPrivateZoneResponse:
- error: the return error if any occurs
type GetPrivateZoneResponseBindVpcs ¶
type GetPrivateZoneResponseBindVpcs struct { }
type ListPrivateZoneRequest ¶
type ListPrivateZoneResponse ¶
type ListPrivateZoneResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int32 `json:"maxKeys"` Zones []Zone `json:"zones"` }
func ListPrivateZone ¶
ListPrivateZone -
PARAMS:
- cli: the client agent which can perform sending request
- marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串
- maxKeys: 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000
RETURNS:
- *api.ListPrivateZoneResponse:
- error: the return error if any occurs
type ListPrivateZoneResponseZones ¶
type ListPrivateZoneResponseZones struct { }
type ListRecordResponse ¶
type ListRecordResponse struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int32 `json:"maxKeys"` Records []Record `json:"records"` }
func ListRecord ¶
func ListRecord(cli bce.Client, zoneId string) (*ListRecordResponse, error)
ListRecord -
PARAMS:
- cli: the client agent which can perform sending request
- zoneId: Zone的ID
RETURNS:
- *api.ListRecordResponse:
- error: the return error if any occurs
type ListRecordResponseRecords ¶
type ListRecordResponseRecords struct { }
type UnbindVpcRequest ¶
type UnbindVpcRequestVpcIds ¶
type UnbindVpcRequestVpcIds struct { }