Documentation ¶
Overview ¶
Package vpn defines the vpn services of BCE. The supported APIs are all defined in different files.
Index ¶
- Constants
- type Billing
- type BindEipArgs
- type Client
- func (c *Client) BindEip(vpnId string, args *BindEipArgs) error
- func (c *Client) CreateVpnConn(args *CreateVpnConnArgs) (*CreateVpnConnResult, error)
- func (c *Client) CreateVpnGateway(args *CreateVpnGatewayArgs) (*CreateVpnGatewayResult, error)
- func (c *Client) DeleteVpn(vpnId, clientToken string) error
- func (c *Client) DeleteVpnConn(vpnConnId, clientToken string) error
- func (c *Client) DeleteVpnGateway(vpcId, clientToken string) error
- func (c *Client) GetVpnGatewayDetail(vpnId string) (*VPN, error)
- func (c *Client) ListVpnConn(vpnId string) (*ListVpnConnResult, error)
- func (c *Client) ListVpnGateway(args *ListVpnGatewayArgs) (*ListVpnGatewayResult, error)
- func (c *Client) RenewVpnGateway(vpnId string, args *RenewVpnGatewayArgs) error
- func (c *Client) UnBindEip(vpnId, clientToken string) error
- func (c *Client) UpdateVpnConn(args *UpdateVpnConnArgs) error
- func (c *Client) UpdateVpnGateway(vpnId string, args *UpdateVpnGatewayArgs) error
- type CreateIkeConfig
- type CreateIpsecConfig
- type CreateVpnConnArgs
- type CreateVpnConnResult
- type CreateVpnGatewayArgs
- type CreateVpnGatewayResult
- type IkeConfig
- type IpsecConfig
- type ListVpnConnResult
- type ListVpnGatewayArgs
- type ListVpnGatewayResult
- type PaymentTimingType
- type PeerConnRoleType
- type RenewVpnGatewayArgs
- type Reservation
- type UpdateVpnConnArgs
- type UpdateVpnGatewayArgs
- type VPN
- type VpnConn
- type VpnStatusType
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "bcc." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_VPN_URL = "/vpn" )
const ( PAYMENT_TIMING_PREPAID PaymentTimingType = "Prepaid" PAYMENT_TIMING_POSTPAID PaymentTimingType = "Postpaid" VPN_STATUS_BUILDING VpnStatusType = "building" VPN_STATUS_UNCONFIGURED VpnStatusType = "unconfigured" VPN_STATUS_CONFIGURING VpnStatusType = "configuring" VPN_STATUS_ACTIVE VpnStatusType = "active" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Billing ¶
type Billing struct { PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"` Reservation *Reservation `json:"reservation,omitempty"` }
type BindEipArgs ¶
BindEipArgs defines the structure of the input parameters for the BindEip api
type Client ¶
Client of VPC service is a kind of BceClient, so derived from BceClient
func (*Client) BindEip ¶
func (c *Client) BindEip(vpnId string, args *BindEipArgs) error
BindEip - bind eip for the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to bind eip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateVpnConn ¶
func (c *Client) CreateVpnConn(args *CreateVpnConnArgs) (*CreateVpnConnResult, error)
CreateVpnConn - create vpnconn with the specific parameters
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to create vpnconn
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateVpnGateway ¶
func (c *Client) CreateVpnGateway(args *CreateVpnGatewayArgs) (*CreateVpnGatewayResult, error)
func (*Client) DeleteVpnConn ¶
DeleteVpnConn - delete the specific vpnconn
PARAMS:
- vpnConnId: the id of the specific vpnconn
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteVpnGateway ¶
DeleteVpnGateway - delete the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetVpnGatewayDetail ¶
GetVpnGatewayDetail - get details of the specific vpn gateway
PARAMS:
- vpnId: the id of the specified vpn
RETURNS:
- *VPN: the result of the specific vpn gateway details
- error: nil if success otherwise the specific error
func (*Client) ListVpnConn ¶
func (c *Client) ListVpnConn(vpnId string) (*ListVpnConnResult, error)
ListVpnConn - list vpnconn with the specific vpnId
PARAMS:
- vpnId:the id you want to list vpnconn
RETURNS:
- *ListVpnConnResult: the result of vpn gateway'conn list
- error: nil if success otherwise the specific error
func (*Client) ListVpnGateway ¶
func (c *Client) ListVpnGateway(args *ListVpnGatewayArgs) (*ListVpnGatewayResult, error)
func (*Client) RenewVpnGateway ¶
func (c *Client) RenewVpnGateway(vpnId string, args *RenewVpnGatewayArgs) error
RenewVpnGateway - renew vpn gateway with the specific parameters
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to renew vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UnBindEip ¶
UnBindEips - unbind eip for the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateVpnConn ¶
func (c *Client) UpdateVpnConn(args *UpdateVpnConnArgs) error
UpdateVpnConn - create vpnconn with the specific parameters
PARAMS:
- args: the arguments to update vpnconn
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateVpnGateway ¶
func (c *Client) UpdateVpnGateway(vpnId string, args *UpdateVpnGatewayArgs) error
UpdateVpnGateway - update the specified vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to update vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
type CreateIkeConfig ¶
type CreateIpsecConfig ¶
type CreateVpnConnArgs ¶
type CreateVpnConnArgs struct { ClientToken string `json:"-"` VpnId string `json:"vpnId"` VpnConnName string `json:"vpnConnName"` LocalIp string `json:"localIp"` SecretKey string `json:"secretKey"` LocalSubnets []string `json:"localSubnets"` RemoteIp string `json:"remoteIp"` RemoteSubnets []string `json:"remoteSubnets"` Description string `json:"description,omitempty"` CreateIkeConfig *CreateIkeConfig `json:"ikeConfig"` CreateIpsecConfig *CreateIpsecConfig `json:"ipsecConfig"` }
CreateVpnConnArgs defines the structure of the input parameters for the CreateVpnGatewayConn api
type CreateVpnConnResult ¶
type CreateVpnConnResult struct {
VpnConnId string `json:"vpnConnId"`
}
CreateVpnConnResult defines the structure of the output parameters for the CreateVpnConn api
type CreateVpnGatewayArgs ¶
type CreateVpnGatewayArgs struct { ClientToken string `json:"-"` VpnName string `json:"vpnName"` VpcId string `json:"vpcId"` Description string `json:"description,omitempty"` Eip string `json:"eip,omitempty"` Billing *Billing `json:"billing"` }
CreateVpnGatewayArgs defines the structure of the input parameters for the CreateVpnGateway api
type CreateVpnGatewayResult ¶
type CreateVpnGatewayResult struct {
VpnId string `json:"vpnId"`
}
CreateVpnGatewayResult defines the structure of the output parameters for the CreateVpnGateway api
type IpsecConfig ¶
type ListVpnConnResult ¶
type ListVpnConnResult struct {
VpnConns []VpnConn `json:"vpnConns"`
}
ListVpnConnResult defines the structure of output parameters for the ListVpnConn api
type ListVpnGatewayArgs ¶
ListVpnGatewayArgs defines the structure of the input parameters for the ListVpnGateway api
type ListVpnGatewayResult ¶
type ListVpnGatewayResult struct { Vpns []VPN `json:"vpns"` Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` }
ListVpnGatewayResult defines the structure of the output parameters for the ListVpnGateway api
type PaymentTimingType ¶
type PaymentTimingType string
type PeerConnRoleType ¶
type PeerConnRoleType string
type RenewVpnGatewayArgs ¶
RenewVpnGatewayArgs defines the structure of the input parameters for the RenewVpnGateway api
type Reservation ¶
type UpdateVpnConnArgs ¶
type UpdateVpnConnArgs struct {
// contains filtered or unexported fields
}
UpdateVpnConnArgs defines the structure of input parameters for the UpdateVpnConn api
type UpdateVpnGatewayArgs ¶
UpdateVpnGatewayArgs defines the structure of the input parameters for the UpdateVpnGateway api
type VPN ¶
type VPN struct { Status VpnStatusType `json:"status"` Eip string `json:"eip"` VpnId string `json:"vpnId"` VpcId string `json:"vpcId"` Description string `json:"description"` ExpiredTime string `json:"expiredTime"` ProductType string `json:"paymentTiming"` VpnConnNum int `json:"vpnConnNum"` BandwidthInMbps int `json:"bandwidthInMbps"` VpnConns []VpnConn `json:"vpnConns"` Name string `json:"vpnName"` }
VPN is the result for getVpnDetail api.
type VpnConn ¶
type VpnConn struct { VpnId string `json:"vpnId"` VpnConnId string `json:"vpnConnId"` VpnConnName string `json:"vpnConnName"` LocalIp string `json:"localIp"` SecretKey string `json:"secretKey"` LocalSubnets []string `json:"localSubnets"` RemoteIp string `json:"remoteIp"` RemoteSubnets []string `json:"remoteSubnets"` Description string `json:"description"` Status string `json:"status"` CreatedTime string `json:"createdTime"` HealthStatus string `json:"healthStatus"` IkeConfig IkeConfig `json:"ikeConfig"` IpsecConfig IpsecConfig `json:"ipsecConfig"` }
type VpnStatusType ¶
type VpnStatusType string