Documentation ¶
Index ¶
- Constants
- Variables
- type Billing
- type BindEipArgs
- type Client
- func (c *Client) BindEip(args *BindEipArgs) error
- func (c *Client) CreateEip(args *CreateEipArgs) (string, error)
- func (c *Client) DeleteEip(args *EipArgs) error
- func (c *Client) GetEips(args *GetEipsArgs) ([]Eip, error)
- func (c *Client) GetURL(version string, params map[string]string) string
- func (c *Client) ResizeEip(args *ResizeEipArgs) error
- func (c *Client) UnbindEip(args *EipArgs) error
- type CreateEipArgs
- type CreateEipResponse
- type Eip
- type EipArgs
- type EipInstanceType
- type GetEipsArgs
- type GetEipsResponse
- type InstanceType
- type Reservation
- type ResizeEipArgs
Constants ¶
View Source
const ( // PAYMENTTIMING_PREPAID eip PAYMENTTIMING_PREPAID string = "Prepaid" // PAYMENTTIMING_POSTPAID eip PAYMENTTIMING_POSTPAID string = "Postpaid" // BILLINGMETHOD_BYTRAFFIC eip BILLINGMETHOD_BYTRAFFIC string = "ByTraffic" // BILLINGMETHOD_BYBANDWIDTH eip BILLINGMETHOD_BYBANDWIDTH string = "ByBandwidth" )
Variables ¶
View Source
var Endpoint = map[string]string{
"bj": "eip.bj.baidubce.com",
"gz": "eip.gz.baidubce.com",
"bd": "eip.bd.baidubce.com",
"su": "eip.su.baidubce.com",
"hk": "eip.hkg.baidubce.com",
}
Endpoint contains all endpoints of Baidu Cloud BCC.
Functions ¶
This section is empty.
Types ¶
type Billing ¶
type Billing struct { PaymentTiming string `json:"paymentTiming"` BillingMethod string `json:"billingMethod"` }
Billing json
type BindEipArgs ¶
type BindEipArgs struct { Ip string `json:"-"` InstanceType InstanceType `json:"instanceType"` InstanceId string `json:"instanceId"` }
BindEipArgs json
type Client ¶
Client is the EIP client implemention for Baidu Cloud EIP API.
func NewEIPClient ¶
NewEIPClient returns client for EIP
func (*Client) CreateEip ¶
func (c *Client) CreateEip(args *CreateEipArgs) (string, error)
CreateEip create a eip
func (*Client) GetEips ¶
func (c *Client) GetEips(args *GetEipsArgs) ([]Eip, error)
GetEips get eips
func (*Client) ResizeEip ¶
func (c *Client) ResizeEip(args *ResizeEipArgs) error
ResizeEip resize a eip
type CreateEipArgs ¶
type CreateEipArgs struct { // 公网带宽,单位为Mbps。 // 对于prepay以及bandwidth类型的EIP,限制为为1~200之间的整数, // 对于traffic类型的EIP,限制为1~1000之前的整数。 BandwidthInMbps int `json:"bandwidthInMbps"` Billing *Billing `json:"billing"` Name string `json:"name,omitempty"` }
CreateEipArgs json
type CreateEipResponse ¶
type CreateEipResponse struct {
Ip string `json:"eip"`
}
CreateEipResponse json
type Eip ¶
type Eip struct { Name string `json:"name"` Eip string `json:"eip"` Status string `json:"status"` EipInstanceType EipInstanceType `json:"eipInstanceType"` InstanceType InstanceType `json:"instanceType"` InstanceId string `json:"instanceId"` BandwidthInMbps int `json:"bandwidthInMbps"` PaymentTiming string `json:"paymentTiming"` BillingMethod string `json:"billingMethod"` CreateTime string `json:"createTime"` ExpireTime string `json:"expireTime"` }
Eip json
type EipInstanceType ¶
type EipInstanceType string
EipInstanceType type
const ( // NORMAL type NORMAL EipInstanceType = "normal" // SHARED type SHARED EipInstanceType = "shared" )
type GetEipsArgs ¶
type GetEipsArgs struct { Ip string `json:"-"` InstanceType InstanceType `json:"instanceType"` InstanceId string `json:"instanceId"` }
GetEipsArgs json
type GetEipsResponse ¶
type GetEipsResponse struct { EipList []Eip `json:"eipList"` Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` }
GetEipsResponse json
type InstanceType ¶
type InstanceType string
InstanceType json
const ( // BCC instance BCC InstanceType = "BCC" // BLB instance BLB InstanceType = "BLB" )
type Reservation ¶
type Reservation struct { ReservationLength int `json:"reservationLength"` ReservationTimeUnit string `json:"reservationTimeUnit"` }
Reservation json
type ResizeEipArgs ¶
ResizeEipArgs json
Click to show internal directories.
Click to hide internal directories.