etGateway

package
v0.9.117 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package vpn defines the vpn services of BCE. The supported APIs are all defined in different files.

Index

Constants

View Source
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 BindEtArgs struct {
	ClientToken string   `json:"clientToken,omitempty"`
	EtGatewayId string   `json:"etGatewayId"`
	EtId        string   `json:"etId"`
	ChannelId   string   `json:"channelId"`
	LocalCidrs  []string `json:"localCidrs,omitempty"`
}

type Client

type Client struct {
	*bce.BceClient
}

Client of EtGateway service is a kind of BceClient, so derived from BceClient

func NewClient

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

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

func (c *Client) DeleteEtGateway(etGatewayId, clientToken string) error

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

func (c *Client) UnBindEt(EtGatewayId, clientToken string) error

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 ListEtGatewayArgs struct {
	VpcId       string
	EtGatewayId string
	Name        string
	Status      string
	Marker      string
	MaxKeys     int
}

type ListEtGatewayResult

type ListEtGatewayResult struct {
	EtGateways  []EtGateway `json:"etGateways"`
	Marker      string      `json:"marker"`
	IsTruncated bool        `json:"isTruncated"`
	NextMarker  string      `json:"nextMarker"`
	MaxKeys     int         `json:"maxKeys"`
}

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状态时允许更新。

Jump to

Keyboard shortcuts

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