Documentation ¶
Overview ¶
Package vpn defines the vpn services of BCE. The supported APIs are all defined in different files.
Index ¶
- Constants
- type BindEtArgs
- type Client
- func (c *Client) BindEt(args *BindEtArgs) error
- func (c *Client) CreateEtGateway(args *CreateEtGatewayArgs) (*CreateEtGatewayResult, error)
- func (c *Client) CreateHealthCheck(args *CreateHealthCheckArgs) error
- func (c *Client) DeleteEtGateway(etGatewayId, clientToken string) error
- func (c *Client) GetEtGatewayDetail(etGatewayId string) (*EtGatewayDetail, error)
- func (c *Client) ListEtGateway(args *ListEtGatewayArgs) (*ListEtGatewayResult, error)
- func (c *Client) UnBindEt(EtGatewayId, clientToken string) error
- func (c *Client) UpdateEtGateway(updateEtGatewayArgs *UpdateEtGatewayArgs) error
- type CreateEtGatewayArgs
- type CreateEtGatewayResult
- type CreateHealthCheckArgs
- type EtGateway
- type EtGatewayDetail
- type HealthCheckType
- type ListEtGatewayArgs
- type ListEtGatewayResult
- type UpdateEtGatewayArgs
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "bcc." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_VPN_URL = "/etGateway" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindEtArgs ¶
type Client ¶
Client of EtGateway service is a kind of BceClient, so derived from BceClient
func (*Client) BindEt ¶
func (c *Client) BindEt(args *BindEtArgs) error
UnBindEt - bind the Et PARAMS:
- args: the arguments to bind the Et
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateEtGateway ¶
func (c *Client) CreateEtGateway(args *CreateEtGatewayArgs) (*CreateEtGatewayResult, error)
func (*Client) CreateHealthCheck ¶
func (c *Client) CreateHealthCheck(args *CreateHealthCheckArgs) error
CreateHealthCheck - create the Et gateway's healthcheck with the specific parameters PARAMS:
- args: the arguments to create the EtGateway's healthcheck
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteEtGateway ¶
DeleteEtGateway - delete the Et gateways with the specific parameters PARAMS:
- etGatewayId: the id to delete the EtGateway
- clientToken: the idempotent string
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetEtGatewayDetail ¶
func (c *Client) GetEtGatewayDetail(etGatewayId string) (*EtGatewayDetail, error)
GetEtGatewayDetail - Get the Et gateways with the specific parameters PARAMS:
- etGatewayId: the id of the EtGateway's
RETURNS:
- *EtGatewayDetail: the result of EtGgateway detail
- error: nil if success otherwise the specific error
func (*Client) ListEtGateway ¶
func (c *Client) ListEtGateway(args *ListEtGatewayArgs) (*ListEtGatewayResult, error)
ListEtGateway - list all Et gateways with the specific parameters PARAMS:
- args: the arguments to list et gateways
RETURNS:
- *ListEtGatewayResult: the result of Et gateway list
- error: nil if success otherwise the specific error
func (*Client) UnBindEt ¶
UnBindEt - unbind the Et PARAMS:
- args: the arguments to unbind the Et
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateEtGateway ¶
func (c *Client) UpdateEtGateway(updateEtGatewayArgs *UpdateEtGatewayArgs) error
UpdateEtGateway - update the Et gateways with the specific parameters PARAMS:
- args: the arguments to update the EtGateway
RETURNS:
- error: nil if success otherwise the specific error
type CreateEtGatewayArgs ¶
type CreateEtGatewayArgs struct { Name string `json:"name"` VpcId string `json:"vpcId"` Speed int `json:"speed"` Description string `json:"description"` EtId string `json:"etId"` ChannelId string `json:"channelId"` LocalCidrs []string `json:"localCidrs"` ClientToken string `json:"clientToken,omitempty"` }
type CreateEtGatewayResult ¶
type CreateEtGatewayResult struct {
EtGatewayId string `json:"etGatewayId"`
}
type CreateHealthCheckArgs ¶
type CreateHealthCheckArgs struct { ClientToken string `json:"clientToken,omitempty"` EtGatewayId string `json:"etGatewayId"` HealthCheckSourceIp string `json:"healthCheckSourceIp,omitempty"` HealthCheckType HealthCheckType `json:"healthCheckType,omitempty"` HealthCheckPort int `json:"healthCheckPort,omitempty"` HealthCheckInterval int `json:"healthCheckInterval"` HealthThreshold int `json:"healthThreshold"` UnhealthThreshold int `json:"unhealthThreshold"` AutoGenerateRouteRule *bool `json:"autoGenerateRouteRule,omitempty"` }
type EtGateway ¶
type EtGateway struct { EtGatewayId string `json:"etGatewayId"` Name string `json:"name"` Status string `json:"status"` Speed int `json:"speed"` CreateTime string `json:"createTime"` Description string `json:"description"` VpcId string `json:"vpcId"` EtId string `json:"etId"` ChannelId string `json:"channelId"` LocalCidrs []string `json:"localCidrs"` }
type EtGatewayDetail ¶
type EtGatewayDetail struct { EtGatewayId string `json:"etGatewayId"` Name string `json:"name"` Status string `json:"status"` Speed int `json:"speed"` CreateTime string `json:"createTime"` Description string `json:"description"` VpcId string `json:"vpcId"` EtId string `json:"etId"` ChannelId string `json:"channelId"` LocalCidrs []string `json:"localCidrs"` HealthCheckSourceIp string `json:"healthCheckSourceIp"` HealthCheckDestIp string `json:"healthCheckDestIp"` HealthCheckType string `json:"healthCheckType"` HealthCheckInterval int `json:"healthCheckInterval"` HealthThreshold int `json:"healthThreshold"` UnhealthThreshold int `json:"unhealthThreshold"` }
type HealthCheckType ¶
type HealthCheckType string
const (
HEALTH_CHECK_ICMP HealthCheckType = "ICMP"
)
type ListEtGatewayArgs ¶
type ListEtGatewayResult ¶
type UpdateEtGatewayArgs ¶
type UpdateEtGatewayArgs struct { ClientToken string `json:"clientToken,omitempty"` EtGatewayId string `json:"etGatewayId"` Name string `json:"name,omitempty"` Speed int `json:"speed,omitempty"` Description string `json:"description,omitempty"` LocalCidrs []string `json:"localCidrs,omitempty"` }
参数localCidrs只有在专线网关处于running状态时允许更新。