et

package
v0.9.198 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package et defines the et 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_ET_URL                    = "/et"
	REQUEST_ET_CHANNEL_URL            = "/channel"
	REQUEST_ET_CHANNEL_ROUTE_URL      = "/route"
	REQUEST_ET_CHANNEL_ROUTE_RULE_URL = "/rule"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

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

func NewClient

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

func (*Client) CreateEtChannel

func (c *Client) CreateEtChannel(args *CreateEtChannelArgs) (*CreateEtChannelResult, error)

CreateEtChannel - create an Et channel with the specific parameters

PARAMS:

  • args: the arguments to create an eip

RETURNS:

  • CreateEipResult: the result of create EIP, contains new EIP's address
  • error: nil if success otherwise the specific error

func (*Client) CreateEtChannelRouteRule

func (c *Client) CreateEtChannelRouteRule(args *CreateEtChannelRouteRuleArgs) (*CreateEtChannelRouteRuleResult, error)

CreateEtChannelRouteRule - create a new EtChannelRouteRule with the specified parameters

PARAMS:

  • args: the arguments to create EtChannelRouteRule

RETURNS:

  • *CreateEtChannelRouteRuleResult: the id of the EtChannelRouteRule newly created
  • error: nil if success otherwise the specific error

func (*Client) CreateEtDcphy

func (c *Client) CreateEtDcphy(args *CreateEtDcphyArgs) (*CreateEtDcphyResult, error)

CreateEtDcphy - init a new Et

PARAMS:

  • args: the arguments to init et dcphy

RETURNS:

  • CreateEtDcphyResult: the id of et dcphy newly created
  • error: nil if success otherwise the specific error

func (*Client) DeleteEtChannel

func (c *Client) DeleteEtChannel(args *DeleteEtChannelArgs) error

DeleteEtChannel - delete et channel

PARAMS:

  • args: the arguments to delete et channel

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteEtChannelRouteRule

func (c *Client) DeleteEtChannelRouteRule(args *DeleteEtChannelRouteRuleArgs) error

DeleteEtChannelRouteRule - delete a specified EtChannelRouteRule

PARAMS:

  • params: the arguments to delete EtChannelRouteRule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DisableEtChannelIPv6

func (c *Client) DisableEtChannelIPv6(args *DisableEtChannelIPv6Args) error

DisableEtChannelIPv6 - disable EtChannelIPv6 with the specified parameters

PARAMS:

  • args: the arguments to disable EtChannelIPv6

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) EnableEtChannelIPv6

func (c *Client) EnableEtChannelIPv6(args *EnableEtChannelIPv6Args) error

EnableEtChannelIPv6 - enable et channel ipv6

PARAMS:

  • args: the arguments to enable et channel ipv6

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetEtChannel

func (c *Client) GetEtChannel(args *GetEtChannelArgs) (*GetEtChannelsResult, error)

GetEtChannel - get an et channel

PARAMS:

  • args: the arguments to get et channel

RETURNS:

  • *GetEtChannelResult: the info of the et channel
  • error: nil if success otherwise the specific error

func (*Client) ListEtChannelRouteRule

func (c *Client) ListEtChannelRouteRule(args *ListEtChannelRouteRuleArgs) (*ListEtChannelRouteRuleResult, error)

ListEtChannelRouteRule - list all EtChannelRouteRules with the specified parameters

PARAMS:

  • args: the arguments to list EtChannelRouteRules

RETURNS:

  • *EtChannelRouteRuleResult: the result of all EtChannelRouteRules
  • error: nil if success otherwise the specific error

func (*Client) ListEtDcphy

func (c *Client) ListEtDcphy(args *ListEtDcphyArgs) (*ListEtDcphyResult, error)

ListEtDcphy - List ets

PARAMS:

  • args: the arguments to list et

RETURNS:

  • ListEtDcphyResult: list result
  • error: nil if success otherwise the specific error

func (*Client) ListEtDcphyDetail

func (c *Client) ListEtDcphyDetail(dcphyId string) (*EtDcphyDetail, error)

ListEtDcphyDetail - List specific et detail

PARAMS:

  • dcphyId: the id of etDcphy

RETURNS:

  • EtDcphyDetail: etDcphy detail
  • error: nil if success otherwise the specific error

func (*Client) RecommitEtChannel

func (c *Client) RecommitEtChannel(args *RecommitEtChannelArgs) error

RecommitEtChannel - recommit et channel

PARAMS:

  • args: the arguments to recommit et channel

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateEtChannel

func (c *Client) UpdateEtChannel(args *UpdateEtChannelArgs) error

UpdateEtChannel - update et channel

PARAMS:

  • args: the arguments to update et channel

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateEtChannelRouteRule

func (c *Client) UpdateEtChannelRouteRule(args *UpdateEtChannelRouteRuleArgs) error

UpdateEtChannelRouteRule - update a specified EtChannelRouteRule

PARAMS:

  • args: the arguments to update EtChannelRouteRule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateEtDcphy

func (c *Client) UpdateEtDcphy(dcphyId string, args *UpdateEtDcphyArgs) error

UpdateEtDcphy - update an existed Et

PARAMS:

  • edId: the id of et dcphy
  • args: the arguments to update et dcphy

RETURNS:

  • error: nil if success otherwise the specific error

type CreateEtChannelArgs

type CreateEtChannelArgs struct {
	ClientToken         string   `json:"clientToken,omitempty"`
	EtId                string   `json:"etId"`
	AuthorizedUsers     []string `json:"authorizedUsers,omitempty"`
	Description         string   `json:"description,omitempty"`
	BaiduAddress        string   `json:"baiduAddress"`
	Name                string   `json:"name"`
	Networks            []string `json:"networks,omitempty"`
	CustomerAddress     string   `json:"customerAddress"`
	RouteType           string   `json:"routeType"`
	VlanId              int      `json:"vlanId"`
	BgpAsn              string   `json:"bgpAsn,omitempty"`
	BgpKey              string   `json:"bgpKey,omitempty"`
	EnableIpv6          int      `json:"enableIpv6,omitempty"`
	BaiduIpv6Address    string   `json:"baiduIpv6Address,omitempty"`
	CustomerIpv6Address string   `json:"customerIpv6Address,omitempty"`
	Ipv6Networks        []string `json:"ipv6Networks,omitempty"`
	Tags                []Tag    `json:"tags"`
}

type CreateEtChannelResult

type CreateEtChannelResult struct {
	Id string `json:"id"`
}

type CreateEtChannelRouteRuleArgs

type CreateEtChannelRouteRuleArgs struct {
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
	ClientToken string `json:"clientToken,omitempty"`
	IpVersion   int    `json:"ipVersion,omitempty"`
	DestAddress string `json:"destAddress"`
	NextHopType string `json:"nexthopType"`
	NextHopId   string `json:"nexthopId"`
	Description string `json:"description,omitempty"`
}

type CreateEtChannelRouteRuleResult

type CreateEtChannelRouteRuleResult struct {
	RouteRuleId string `json:"routeRuleId"`
}

type CreateEtDcphyArgs

type CreateEtDcphyArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Isp         string `json:"isp"`
	IntfType    string `json:"intfType"`
	ApType      string `json:"apType"`
	ApAddr      string `json:"apAddr"`
	UserName    string `json:"userName"`
	UserPhone   string `json:"userPhone"`
	UserEmail   string `json:"userEmail"`
	UserIdc     string `json:"userIdc"`
	Tags        []Tag  `json:"tags"`
}

type CreateEtDcphyResult

type CreateEtDcphyResult struct {
	Id string `json:"id"`
}

type DeleteEtChannelArgs

type DeleteEtChannelArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
}

type DeleteEtChannelRouteRuleArgs

type DeleteEtChannelRouteRuleArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
	RouteRuleId string `json:"routeRuleId"`
}

type DisableEtChannelIPv6Args

type DisableEtChannelIPv6Args struct {
	ClientToken string `json:"clientToken,omitempty"`
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
}

type EnableEtChannelIPv6Args

type EnableEtChannelIPv6Args struct {
	ClientToken string                    `json:"clientToken,omitempty"`
	EtId        string                    `json:"etId"`
	EtChannelId string                    `json:"etChannelId"`
	Result      EnableEtChannelIPv6Result `json:"enableEtChannelIpv6Result"`
}

type EnableEtChannelIPv6Result

type EnableEtChannelIPv6Result struct {
	BaiduIpv6Address    string   `json:"baiduIpv6Address"`
	CustomerIpv6Address string   `json:"CustomerIpv6Address"`
	Ipv6Networks        []string `json:"ipv6Networks"`
}

type Et

type Et struct {
	Id          string `json:"Id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	ExpireTime  string `json:"expireTime"`
	Isp         string `json:"isp"`
	IntfType    string `json:"intfType"`
	ApType      string `json:"apType"`
	ApAddr      string `json:"apAddr"`
	UserName    string `json:"userName"`
	UserPhone   string `json:"userPhone"`
	UserEmail   string `json:"userEmail"`
	UserIdc     string `json:"userIdc"`
	Tags        []Tag  `json:"tags"`
}

type EtChannelResult

type EtChannelResult struct {
	AuthorizedUsers     []string `json:"authorizedUsers"`
	Description         string   `json:"description"`
	BaiduAddress        string   `json:"baiduAddress"`
	Name                string   `json:"name"`
	Networks            []string `json:"networks"`
	BGPAsn              string   `json:"bgpAsn"`
	BGPKey              string   `json:"bgpKey"`
	CustomerAddress     string   `json:"customerAddress"`
	RouteType           string   `json:"routeType"`
	VlanId              string   `json:"vlanId"`
	Id                  string   `json:"id"`
	Status              string   `json:"status"`
	EnableIpv6          uint32   `json:"enableIpv6"`
	BaiduIpv6Address    string   `json:"baiduIpv6Address"`
	Ipv6Networks        []string `json:"ipv6Networks"`
	CustomerIpv6Address string   `json:"CustomerIpv6Address"`
	Tags                []Tag    `json:"tags"`
}

type EtChannelRouteRule

type EtChannelRouteRule struct {
	RouteRuleId     string `json:"routeRuleId"`
	IpVersion       int    `json:"ipVersion"`
	DestAddress     string `json:"destAddress"`
	NextHopType     string `json:"nexthopType"`
	NextHopId       string `json:"nexthopId"`
	Description     string `json:"description"`
	RouteProto      string `json:"routeProto"`
	AsPaths         string `json:"asPaths"`
	LocalPreference int    `json:"localPreference"`
	Med             int    `json:"med"`
	Origin          string `json:"origin"`
}

type EtDcphyDetail

type EtDcphyDetail struct {
	Id          string `json:"clientToken,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Status      string `json:"status"`
	ExpireTime  string `json:"expireTime"`
	Isp         string `json:"isp"`
	IntfType    string `json:"intfType"`
	ApType      string `json:"apType"`
	ApAddr      string `json:"apAddr"`
	UserName    string `json:"userName"`
	UserPhone   string `json:"userPhone"`
	UserEmail   string `json:"userEmail"`
	UserIdc     string `json:"userIdc"`
	Tags        []Tag  `json:"tags"`
}

type GetEtChannelArgs

type GetEtChannelArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	EtId        string `json:"etId"`
}

type GetEtChannelsResult

type GetEtChannelsResult struct {
	EtChannels []EtChannelResult `json:"etChannels"`
}

type ListEtChannelRouteRuleArgs

type ListEtChannelRouteRuleArgs struct {
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
	Marker      string `json:"marker,omitempty"`
	MaxKeys     int    `json:"maxKeys,omitempty"`
	DestAddress string `json:"destAddress,omitempty"`
}

type ListEtChannelRouteRuleResult

type ListEtChannelRouteRuleResult struct {
	Marker     string               `json:"marker"`
	IsTrucated bool                 `json:"isTruncated"`
	NextMarker string               `json:"nextMarker"`
	MaxKeys    int                  `json:"maxKeys"`
	RouteRules []EtChannelRouteRule `json:"routeRules"`
}

type ListEtDcphyArgs

type ListEtDcphyArgs struct {
	Marker  string
	MaxKeys int
	Status  string
}

type ListEtDcphyResult

type ListEtDcphyResult struct {
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
	Ets         []Et   `json:"ets"`
}

type RecommitEtChannelArgs

type RecommitEtChannelArgs struct {
	ClientToken string                  `json:"clientToken,omitempty"`
	EtId        string                  `json:"etId"`
	EtChannelId string                  `json:"etChannelId"`
	Result      RecommitEtChannelResult `json:"etChannelResult"`
}

type RecommitEtChannelResult

type RecommitEtChannelResult struct {
	AuthorizedUsers     []string `json:"authorizedUsers"`
	Description         string   `json:"description"`
	BaiduAddress        string   `json:"baiduAddress"`
	Name                string   `json:"name"`
	Networks            []string `json:"networks"`
	CustomerAddress     string   `json:"customerAddress"`
	RouteType           string   `json:"routeType"`
	VlanId              string   `json:"vlanId"`
	Id                  string   `json:"id"`
	Status              string   `json:"status"`
	EnableIpv6          uint32   `json:"enableIpv6"`
	BaiduIpv6Address    string   `json:"baiduIpv6Address"`
	Ipv6Networks        []string `json:"ipv6Networks"`
	CustomerIpv6Address string   `json:"CustomerIpv6Address"`
}

type Tag added in v0.9.192

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

type UpdateEtChannelArgs

type UpdateEtChannelArgs struct {
	ClientToken string                `json:"clientToken,omitempty"`
	EtId        string                `json:"etId"`
	EtChannelId string                `json:"etChannelId"`
	Result      UpdateEtChannelResult `json:"UpdateEtChannelResult"`
}

type UpdateEtChannelResult

type UpdateEtChannelResult struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UpdateEtChannelRouteRuleArgs

type UpdateEtChannelRouteRuleArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	EtId        string `json:"etId"`
	EtChannelId string `json:"etChannelId"`
	RouteRuleId string `json:"routeRuleId"`
	Description string `json:"description"`
}

type UpdateEtDcphyArgs

type UpdateEtDcphyArgs struct {
	ClientToken string `json:"clientToken,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	UserName    string `json:"userName,omitempty"`
	UserPhone   string `json:"userPhone,omitempty"`
	UserEmail   string `json:"userEmail,omitempty"`
}

Jump to

Keyboard shortcuts

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