lbdc

package
v0.9.177 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lbdc defines the LBDC services of BCE. The supported APIs are all defined in sub-package

Package lbdc lbdc.go - the LBDC APIs definition supported by the LBDC service

Index

Constants

View Source
const (
	DEFAULT_SERVICE_DOMAIN = "blb." + bce.DEFAULT_REGION + ".baidubce.com"
	URI_PREFIX             = bce.URI_PREFIX + "v1"
	REQUEST_LBDC_URL       = "/lbdc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociateBlb

type AssociateBlb struct {
	BlbId        string `json:"blbId"`
	Name         string `json:"name"`
	Status       string `json:"status"`
	BlbType      string `json:"blbType"`
	PublicIp     string `json:"publicIp"`
	EipRouteType string `json:"eipRouteType"`
	Bandwidth    int    `json:"bandwidth"`
	Address      string `json:"address"`
	Ipv6         string `json:"ipv6"`
	VpcId        string `json:"vpcId"`
	SubnetId     string `json:"subnetId"`
}

type Billing

type Billing struct {
	PaymentTiming string       `json:"paymentTiming"`
	Reservation   *Reservation `json:"reservation"`
}

type BillingForRenew

type BillingForRenew struct {
	Reservation *Reservation `json:"reservation"`
}

type Client

type Client struct {
	*bce.BceClient
}

func NewClient

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

func (*Client) CreateLbdc

func (c *Client) CreateLbdc(args *CreateLbdcArgs) (*CreateLbdcResult, error)

CreateLbdc - create the LBDC instance with the specific parameters

PARAMS:

  • args: the arguments to create LBDC

RETURNS:

  • *CreateLoadBalancerResult: the result of create LoadBalancer, contains new LoadBalancer's ID
  • error: nil if success otherwise the specific error

func (*Client) GetBoundBlBListOfLbdc

func (c *Client) GetBoundBlBListOfLbdc(lbdcId string) (*GetBoundBlBListOfLbdcResult, error)

GetBoundBlBListOfLbdc - get Bound blb list of lbdc

PARAMS:

  • lbdcId: the id of the specified lbdc

RETURNS:

  • *GetBoundBlBListOfLbdcResult: the result of the bound blb list of lbdc
  • error: nil if success otherwise the specific error

func (*Client) GetLbdcDetail

func (c *Client) GetLbdcDetail(lbdcId string) (*GetLbdcDetailResult, error)

GetLbdcDetail - get details of the specific lbdc

PARAMS:

  • lbdcId: the id of the specified lbdc

RETURNS:

  • *LbdcDetailResult: the result of the specific lbdc details
  • error: nil if success otherwise the specific error

func (*Client) ListLbdc

func (c *Client) ListLbdc(args *ListLbdcArgs) (*ListLbdcResult, error)

ListLbdc - list LBDC with the specific id and/or name

PARAMS:

  • args: the arguments to list LBDC instances

RETURNS:

  • *ListSslVpnUserResult: the result of Cluster list contains page infos
  • error: nil if success otherwise the specific error

func (*Client) RenewLbdc

func (c *Client) RenewLbdc(args *RenewLbdcArgs) error

RenewLbdc - renew LBDC with the specific parameters

PARAMS:

  • args: the arguments to renew LBDC

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateLbdc

func (c *Client) UpdateLbdc(args *UpdateLbdcArgs) error

UpdateLbdc - update lbdc with the specific parameters

PARAMS:

  • args: the arguments to update lbdc

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpgradeLbdc

func (c *Client) UpgradeLbdc(args *UpgradeLbdcArgs) error

UpgradeLbdc - upgrade LBDC with the specific parameters

PARAMS:

  • args: the arguments to update LBDC

RETURNS:

  • error: nil if success otherwise the specific error

type Cluster

type Cluster struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Status      string `json:"status"`
	CcuCount    int    `json:"ccuCount"`
	CreateTime  string `json:"createTime"`
	ExpireTime  string `json:"expireTime"`
	Description string `json:"desc"`
}

type CreateLbdcArgs

type CreateLbdcArgs struct {
	ClientToken      string       `json:"-"`
	Name             string       `json:"name"`
	Type             string       `json:"type"`
	CcuCount         int          `json:"ccuCount"`
	Description      *string      `json:"desc,omitempty"`
	Billing          *Billing     `json:"billing"`
	RenewReservation *Reservation `json:"renewReservation"`
}

CreateLbdcArgs defines the structure of input parameters for the CreateLbdc api

type CreateLbdcResult

type CreateLbdcResult struct {
	Id          string `json:"id"`
	Type        string `json:"type"`
	Description string `json:"desc"`
}

CreateLbdcResult defines the structure of output parameters for the CreateLbdc api

type GetBoundBlBListOfLbdcResult

type GetBoundBlBListOfLbdcResult struct {
	BlbList []AssociateBlb `json:"blbList"`
}

GetBoundBlBListOfLbdcResult defines the structure of output parameters for the GetBoundBlBListOfLbdc api

type GetLbdcDetailResult

type GetLbdcDetailResult struct {
	// 4 layer
	Id                string `json:"id"`
	Name              string `json:"name"`
	Type              string `json:"type"`
	Status            string `json:"status"`
	CcuCount          int    `json:"ccuCount"`
	CreateTime        string `json:"createTime"`
	ExpireTime        string `json:"expireTime"`
	TotalConnectCount int64  `json:"totalConnectCount"`
	NewConnectCps     *int64 `json:"newConnectCps,omitempty"`
	NetworkInBps      int64  `json:"networkInBps"`
	NetworkOutBps     int64  `json:"networkOutBps"`

	// 7layer
	HttpsQps           *int64 `json:"httpsQps,omitempty"`
	HttpQps            *int64 `json:"httpQps,omitempty"`
	HttpNewConnectCps  *int64 `json:"httpNewConnectCps,omitempty"`
	HttpsNewConnectCps *int64 `json:"httpsNewConnectCps,omitempty"`
	SslNewConnectCps   *int64 `json:"sslNewConnectCps,omitempty"`
}

GetLbdcDetailResult defines the structure of output parameters for the GetLbdcDetail api

type ListLbdcArgs

type ListLbdcArgs struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

ListLbdcArgs defines the structure of input parameters for the ListLbdc api

type ListLbdcResult

type ListLbdcResult struct {
	Marker      string    `json:"marker"`
	IsTruncated bool      `json:"isTruncated"`
	NextMarker  string    `json:"nextMarker"`
	MaxKeys     int       `json:"maxKeys"`
	ClusterList []Cluster `json:"clusterList"`
}

ListLbdcResult defines the structure of output parameters for the ListLbdc api

type RenewLbdcArgs

type RenewLbdcArgs struct {
	ClientToken string           `json:"-"`
	Id          string           `json:"id"`
	Billing     *BillingForRenew `json:"billing"`
}

RenewLbdcArgs defines the structure of input parameters for the RenewLbdc api

type Reservation

type Reservation struct {
	ReservationLength int `json:"reservationLength"`
}

type ReservationForCreate

type ReservationForCreate struct {
	ReservationLength int `json:"reservationLength,omitempty"`
}

type UpdateLbdcArgs

type UpdateLbdcArgs struct {
	ClientToken    string          `json:"-"`
	Id             string          `json:"id"`
	UpdateLbdcBody *UpdateLbdcBody `json:"updateLbdcBody"`
}

UpdateLbdcArgs defines the structure of input parameters for the UpdateLbdc api

type UpdateLbdcBody

type UpdateLbdcBody struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"desc,omitempty"`
}

UpdateLbdcBody defines the structure of input parameters for the UpdateLbdc api request body

type UpgradeLbdcArgs

type UpgradeLbdcArgs struct {
	ClientToken string `json:"-"`
	Id          string `json:"id"`
	CcuCount    int    `json:"ccuCount"`
}

UpgradeLbdcArgs defines the structure of input parameters for the UpgradeLbdc api

Jump to

Keyboard shortcuts

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