dns

package
v0.9.209 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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

View Source
const (
	DEFAULT_SERVICE_DOMAIN = "http://dns.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 AddLineGroup

func AddLineGroup(cli bce.Client, body *AddLineGroupRequest, clientToken string) error

AddLineGroup -

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func CreatePaidZone

func CreatePaidZone(cli bce.Client, body *CreatePaidZoneRequest, clientToken string) error

CreatePaidZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func CreateRecord

func CreateRecord(cli bce.Client, zoneName string, body *CreateRecordRequest, clientToken string) error

CreateRecord -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名名称。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func CreateZone

func CreateZone(cli bce.Client, body *CreateZoneRequest, clientToken string) error

CreateZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
  • body:

RETURNS:

  • error: the return error if any occurs

func DeleteLineGroup

func DeleteLineGroup(cli bce.Client, lineId string, clientToken string) error

DeleteLineGroup -

PARAMS:

  • cli: the client agent which can perform sending request
  • lineId: 线路组id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。

RETURNS:

  • error: the return error if any occurs

func DeleteRecord

func DeleteRecord(cli bce.Client, zoneName string, recordId string, clientToken string) error

DeleteRecord -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func DeleteZone

func DeleteZone(cli bce.Client, zoneName string, clientToken string) error

DeleteZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名的名称。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func RenewZone

func RenewZone(cli bce.Client, name string, body *RenewZoneRequest, clientToken string) error

RenewZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • name: 续费的域名。
  • body:

RETURNS:

  • error: the return error if any occurs

func UpdateLineGroup

func UpdateLineGroup(cli bce.Client, lineId string, body *UpdateLineGroupRequest,
	clientToken string) error

UpdateLineGroup -

PARAMS:

  • cli: the client agent which can perform sending request
  • lineId: 线路组id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func UpdateRecord

func UpdateRecord(cli bce.Client, zoneName string, recordId string, body *UpdateRecordRequest,
	clientToken string) error

UpdateRecord -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func UpdateRecordDisable

func UpdateRecordDisable(cli bce.Client, zoneName string, recordId string, clientToken string) error

UpdateRecordDisable -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func UpdateRecordEnable

func UpdateRecordEnable(cli bce.Client, zoneName string, recordId string, clientToken string) error

UpdateRecordEnable -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

func UpgradeZone

func UpgradeZone(cli bce.Client, body *UpgradeZoneRequest, clientToken string) error

UpgradeZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body:

RETURNS:

  • error: the return error if any occurs

Types

type AddLineGroupRequest

type AddLineGroupRequest struct {
	Name  string   `json:"name"`
	Lines []string `json:"lines"`
}

type AddLineGroupRequestLines

type AddLineGroupRequestLines struct {
}

type Billing

type Billing struct {
	PaymentTiming string      `json:"paymentTiming"`
	Reservation   Reservation `json:"reservation"`
}

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

func NewClient(ak, sk, endpoint string) (*Client, error)

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) AddLineGroup

func (c *Client) AddLineGroup(body *AddLineGroupRequest, clientToken string) error

AddLineGroup -

PARAMS:

  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) CreatePaidZone

func (c *Client) CreatePaidZone(body *CreatePaidZoneRequest, clientToken string) error

CreatePaidZone -

PARAMS:

  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) CreateRecord

func (c *Client) CreateRecord(zoneName string, body *CreateRecordRequest, clientToken string) error

CreateRecord -

PARAMS:

  • zoneName: 域名名称。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) CreateZone

func (c *Client) CreateZone(body *CreateZoneRequest, clientToken string) error

CreateZone -

PARAMS:

  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) DeleteLineGroup

func (c *Client) DeleteLineGroup(lineId string, clientToken string) error

DeleteLineGroup -

PARAMS:

  • lineId: 线路组id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。

RETURNS:

  • error: the return error if any occurs

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(zoneName string, recordId string, clientToken string) error

DeleteRecord -

PARAMS:

  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) DeleteZone

func (c *Client) DeleteZone(zoneName string, clientToken string) error

DeleteZone -

PARAMS:

  • zoneName: 域名的名称。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) ListLineGroup

func (c *Client) ListLineGroup(body *ListLineGroupRequest) (*ListLineGroupResponse, error)

ListLineGroup -

PARAMS:

  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串。
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000。
  • body: body参数

RETURNS:

  • *ListLineGroupResponse:
  • error: the return error if any occurs

func (*Client) ListRecord

func (c *Client) ListRecord(zoneName string, request *ListRecordRequest) (*ListRecordResponse, error)

ListRecord -

PARAMS:

  • zoneName: 域名的名称。
  • rr: 主机记录,例如“www”。
  • id: 解析记录id。
  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串。
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000。
  • body: body参数

RETURNS:

  • *ListRecordResponse:
  • error: the return error if any occurs

func (*Client) ListZone

func (c *Client) ListZone(body *ListZoneRequest) (
	*ListZoneResponse, error)

ListZone -

PARAMS:

  • name: 域名的名称,支持模糊搜索。
  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000
  • body: body参数

RETURNS:

  • *ListZoneResponse:
  • error: the return error if any occurs

func (*Client) RenewZone

func (c *Client) RenewZone(name string, body *RenewZoneRequest, clientToken string) error

RenewZone -

PARAMS:

  • name: 续费的域名。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) UpdateLineGroup

func (c *Client) UpdateLineGroup(lineId string, body *UpdateLineGroupRequest,
	clientToken string) error

UpdateLineGroup -

PARAMS:

  • lineId: 线路组id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) UpdateRecord

func (c *Client) UpdateRecord(zoneName string, recordId string, body *UpdateRecordRequest,
	clientToken string) error

UpdateRecord -

PARAMS:

  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) UpdateRecordDisable

func (c *Client) UpdateRecordDisable(zoneName string, recordId string, clientToken string) error

UpdateRecordDisable -

PARAMS:

  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) UpdateRecordEnable

func (c *Client) UpdateRecordEnable(zoneName string, recordId string, clientToken string) error

UpdateRecordEnable -

PARAMS:

  • zoneName: 域名名称。
  • recordId: 解析记录id。
  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

func (*Client) UpgradeZone

func (c *Client) UpgradeZone(body *UpgradeZoneRequest, clientToken string) error

UpgradeZone -

PARAMS:

  • clientToken: 幂等性Token,是一个长度不超过64位的ASCII字符串。
  • body: body参数

RETURNS:

  • error: the return error if any occurs

type CreatePaidZoneRequest

type CreatePaidZoneRequest struct {
	Names          []string `json:"names"`
	ProductVersion string   `json:"productVersion"`
	Billing        Billing  `json:"billing"`
}

type CreateRecordRequest

type CreateRecordRequest struct {
	Rr          string  `json:"rr"`
	Type        string  `json:"type"`
	Value       string  `json:"value"`
	Ttl         *int32  `json:"ttl"`
	Line        *string `json:"line"`
	Description *string `json:"description"`
	Priority    *int32  `json:"priority"`
}

type CreateZoneRequest

type CreateZoneRequest struct {
	Name string `json:"name"`
}

type DeleteRecordRequest

type DeleteRecordRequest struct {
	Rr          string  `json:"rr"`
	Type        string  `json:"type"`
	Value       string  `json:"value"`
	Ttl         *int32  `json:"ttl"`
	Description *string `json:"description"`
	Priority    *int32  `json:"priority"`
}

type DeleteZoneRequest

type DeleteZoneRequest struct {
	Names          []string `json:"names"`
	ProductVersion string   `json:"productVersion"`
	Billing        Billing  `json:"billing"`
}

type DeleteZoneRequestNames

type DeleteZoneRequestNames struct {
}

type Line

type Line struct {
	Id                 string   `json:"id"`
	Name               string   `json:"name"`
	Lines              []string `json:"lines"`
	RelatedZoneCount   int32    `json:"relatedZoneCount"`
	RelatedRecordCount int32    `json:"relatedRecordCount"`
}

type ListLineGroupRequest

type ListLineGroupRequest struct {
	Marker  string
	MaxKeys int
}

type ListLineGroupResponse

type ListLineGroupResponse struct {
	Marker      *string `json:"marker"`
	IsTruncated *bool   `json:"isTruncated"`
	NextMarker  *string `json:"nextMarker"`
	MaxKeys     *int32  `json:"maxKeys"`
	LineList    []Line  `json:"lineList"`
}

func ListLineGroup

func ListLineGroup(cli bce.Client, marker string, maxKeys int) (*ListLineGroupResponse, error)

ListLineGroup -

PARAMS:

  • cli: the client agent which can perform sending request
  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串。
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000。
  • body:

RETURNS:

  • *api.ListLineGroupResponse:
  • error: the return error if any occurs

type ListRecordRequest

type ListRecordRequest struct {
	Rr      string
	Id      string
	Marker  string
	MaxKeys int
}

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, zoneName string, rr string, id string,
	marker string, maxKeys int) (*ListRecordResponse, error)

ListRecord -

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: 域名的名称。
  • rr: 主机记录,例如“www”。
  • id: 解析记录id。
  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串。
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000。
  • body:

RETURNS:

  • *api.ListRecordResponse:
  • error: the return error if any occurs

type ListRecordResponseRecords

type ListRecordResponseRecords struct {
}

type ListZoneRequest

type ListZoneRequest struct {
	Name    string
	Marker  string
	MaxKeys int
}

type ListZoneResponse

type ListZoneResponse struct {
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int32  `json:"maxKeys"`
	Zones       []Zone `json:"zones"`
}

func ListZone

func ListZone(cli bce.Client, body *ListZoneRequest, name string, marker string, maxKeys int) (
	*ListZoneResponse, error)

ListZone -

PARAMS:

  • cli: the client agent which can perform sending request
  • name: 域名的名称,支持模糊搜索。
  • marker: 批量获取列表的查询的起始位置,是一个由系统生成的字符串
  • maxKeys: 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000
  • body:

RETURNS:

  • *api.ListZoneResponse:
  • error: the return error if any occurs

type ListZoneResponseZones

type ListZoneResponseZones struct {
}

type Record

type Record struct {
	Id          string `json:"id"`
	Rr          string `json:"rr"`
	Status      string `json:"status"`
	Type        string `json:"type"`
	Value       string `json:"value"`
	Ttl         int32  `json:"ttl"`
	Line        string `json:"line"`
	Description string `json:"description"`
	Priority    int32  `json:"priority"`
}

type RenewZoneRequest

type RenewZoneRequest struct {
	Billing Billing `json:"billing"`
}

type Reservation

type Reservation struct {
	ReservationLength int32 `json:"reservationLength"`
}

type TagModel

type TagModel struct {
	TagKey   *string `json:"tagKey"`
	TagValue *string `json:"tagValue"`
}

type UpdateLineGroupRequest

type UpdateLineGroupRequest struct {
	Name  string   `json:"name"`
	Lines []string `json:"lines"`
}

type UpdateLineGroupRequestLines

type UpdateLineGroupRequestLines struct {
}

type UpdateRecordDisableRequest

type UpdateRecordDisableRequest struct {
	Rr          string  `json:"rr"`
	Type        string  `json:"type"`
	Value       string  `json:"value"`
	Ttl         *int32  `json:"ttl"`
	Description *string `json:"description"`
	Priority    *int32  `json:"priority"`
}

type UpdateRecordEnableRequest

type UpdateRecordEnableRequest struct {
	Rr          string  `json:"rr"`
	Type        string  `json:"type"`
	Value       string  `json:"value"`
	Ttl         *int32  `json:"ttl"`
	Description *string `json:"description"`
	Priority    *int32  `json:"priority"`
}

type UpdateRecordRequest

type UpdateRecordRequest struct {
	Rr          string  `json:"rr"`
	Type        string  `json:"type"`
	Value       string  `json:"value"`
	Ttl         *int32  `json:"ttl"`
	Description *string `json:"description"`
	Priority    *int32  `json:"priority"`
}

type UpgradeZoneRequest

type UpgradeZoneRequest struct {
	Names   []string `json:"names"`
	Billing Billing  `json:"billing"`
}

type UpgradeZoneRequestNames

type UpgradeZoneRequestNames struct {
}

type Zone

type Zone struct {
	Id             string     `json:"id"`
	Name           string     `json:"name"`
	Status         string     `json:"status"`
	ProductVersion string     `json:"productVersion"`
	CreateTime     string     `json:"createTime"`
	ExpireTime     string     `json:"expireTime"`
	Tags           []TagModel `json:"tags"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL