vpc

package
v0.0.0-...-b47c6c8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VPCDefaultEndpoint = "https://10.175.38.51"
	VPCVersion         = "v1"
	VPCName            = "vpcs"
	BasicDateFormat    = "20060102T150405Z"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BWDesc

type BWDesc struct {
	Name    string `json:"name"`
	Size    uint32 `json:"size"`
	ShrType string `json:"share_type"`
	ChgMode string `json:"charge_mode"`
}

type Client

type Client struct {
	common.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(accessKeyId, accessKeySecret string) *Client

func (*Client) AllocateEIP

func (client *Client) AllocateEIP(region, projectId string, arg *EIPAllocArg) (eIp *EipResp, err error)

func (*Client) AssociateEIP

func (client *Client) AssociateEIP(region, projectId, elasticIPId string, arg *EIPAssocArg) error

func (*Client) Do

func (client *Client) Do(region, method, uri string, args interface{}) (respbytes []byte, err error)

func (*Client) ListSecurityGroups

func (client *Client) ListSecurityGroups(region, projectId string, args *ListSecurityGroupsAttributeArgs) (*SecurityGroupsResponse, error)

func (*Client) ListSubnet

func (client *Client) ListSubnet(region, projectId, vpcId string) (snList *SubnetResponse, err error)

type EIP

type EIP struct {
	Id         string `json:"id"`
	Status     string `json:"status"`
	Type       string `json:"type"`
	Addr       string `json:"public_ip_address"`
	TenantId   string `json:"tenant_id"`
	CreateTime string `json:"create_time"`
	BWSize     uint32 `json:"bandwidth_size"`
}

type EIPAllocArg

type EIPAllocArg struct {
	EIPDesc   PubIP  `json:"publicip"`
	BandWidth BWDesc `json:"bandwidth"`
}

type EIPAssocArg

type EIPAssocArg struct {
	Port PortDesc `json:"publicip"`
}

type EipResp

type EipResp struct {
	Eip EIP `json:"publicip"`
}

type ListSecurityGroupsAttributeArgs

type ListSecurityGroupsAttributeArgs struct {
	TenantId string
	Marker   string
	Limit    uint32
	VpcId    string
}

type PortDesc

type PortDesc struct {
	PortId string `json:"port_id"`
}

type PubIP

type PubIP struct {
	Type string `json:"type"`
}

type SecurityGroup

type SecurityGroup struct {
	Id    string   `json:"id"`
	Name  string   `json:"name"`
	VpcId string   `json:"vpc_id"`
	Rules []sgrule `json:"security_group_rules"`
}

type SecurityGroupsResponse

type SecurityGroupsResponse struct {
	SecurityGroups []SecurityGroup `json:"security_groups"`
}

type SubnetList

type SubnetList struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Cidr        string `json:"cidr"`
	Gateway_Ip  string `json:"gateway_ip"`
	Dhcp_En     bool   `json:"dhcp_enable"`
	Primary_Dns string `json:"primary_dns"`
	Second_Dns  string `json:"secondary_dns"`
	Avail_Zone  string `json:"availability_zone"`
	Vpc_Id      string `json:"vpc_id"`
	Status      string `json:"status"`
}

type SubnetResponse

type SubnetResponse struct {
	Subnets []SubnetList `json:"subnets"`
}

Jump to

Keyboard shortcuts

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