vpcnetworks

package
v0.0.1-beta3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteReq

type DeleteReq struct {
	ID uint `url:"-"` // vpc网络ID
}

func (*DeleteReq) Body

func (r *DeleteReq) Body() any

func (*DeleteReq) Form

func (r *DeleteReq) Form() (form url.Values)

func (*DeleteReq) Header

func (r *DeleteReq) Header() http.Header

func (*DeleteReq) Method

func (r *DeleteReq) Method() string

func (*DeleteReq) Url

func (r *DeleteReq) Url() string

func (*DeleteReq) Values

func (r *DeleteReq) Values() (values url.Values)

type DeleteResp

type DeleteResp struct{}

func Delete

func Delete(ctx *cloudplatform.Context, req *DeleteReq) (*DeleteResp, error)

Delete 删除vpc网络

type ListReq

type ListReq struct {
	Search    string `url:"search,omitempty"`     // 搜索
	Node      string `url:"node,omitempty"`       // 节点ID
	Area      string `url:"area,omitempty"`       // 区域ID
	NodeGroup string `url:"node_group,omitempty"` // 节点分组ID
	User      string `url:"user,omitempty"`       // 用户ID
	ListType  string `url:"list_type,omitempty"`  // 传all获取所有

	Page    string `url:"page,omitempty"`
	PerPage string `url:"per_page,omitempty"`
	Orderby string `url:"orderby,omitempty"` // 排序(id,size,name,type)
	Sort    string `url:"sort,omitempty"`
}

func (*ListReq) Body

func (r *ListReq) Body() any

func (*ListReq) Form

func (r *ListReq) Form() (form url.Values)

func (*ListReq) Header

func (r *ListReq) Header() http.Header

func (*ListReq) Method

func (r *ListReq) Method() string

func (*ListReq) Url

func (r *ListReq) Url() string

func (*ListReq) Values

func (r *ListReq) Values() (values url.Values)

type ListResp

type ListResp struct {
	Data []struct {
		Id       int    `json:"id"`       // vpc网络ID
		Name     string `json:"name"`     // vpc网络名称
		Ips      string `json:"ips"`      // 网段
		Uid      int    `json:"uid"`      // 用户ID
		Username string `json:"username"` // 用户名
		Host     []struct {
			Id       int    `json:"id"`       // 使用该VPC实例ID
			Hostname string `json:"hostname"` // 使用该VPC实例主机名
		} `json:"host"`
		VpcMac []struct {
			NodeName string `json:"node_name"` //	节点名称(v2.3.9+)
			Mac      string `json:"mac"`       // vpcMAC地址(v2.3.9+)
		} `json:"vpc_mac"`
	} `json:"data"`
	Meta struct {
		Total     int `json:"total"`
		TotalPage int `json:"total_page"`
		Page      int `json:"page"`
		PerPage   int `json:"per_page"`
	} `json:"meta"`
}

func List

func List(ctx *cloudplatform.Context, req *ListReq) (*ListResp, error)

List vpc网络列表

type UpdateReq

type UpdateReq struct {
	ID   uint   `json:"-"`    // vpc网络ID
	Name string `json:"name"` // 名称
}

func (*UpdateReq) Body

func (r *UpdateReq) Body() any

func (*UpdateReq) Form

func (r *UpdateReq) Form() (form url.Values)

func (*UpdateReq) Header

func (r *UpdateReq) Header() http.Header

func (*UpdateReq) Method

func (r *UpdateReq) Method() string

func (*UpdateReq) Url

func (r *UpdateReq) Url() string

func (*UpdateReq) Values

func (r *UpdateReq) Values() (values url.Values)

type UpdateResp

type UpdateResp struct{}

func Update

func Update(ctx *cloudplatform.Context, req *UpdateReq) (*UpdateResp, error)

Update 修改vpc网络

Jump to

Keyboard shortcuts

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