floatip

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 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 CreateReq

type CreateReq struct {
	ID      uint   `json:"id"`       // 实例ID
	IP      []uint `json:"ip"`       // ip地址ID
	BwGroup uint   `json:"bw_group"` // 限速组ID(可以加入到已有限速组中)
	InBw    int    `json:"in_bw"`    // 新组进带宽
	OutBw   int    `json:"out_bw"`   // 新组出带宽
}

func (*CreateReq) Body

func (r *CreateReq) Body() any

func (*CreateReq) Form

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

func (*CreateReq) Header

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

func (*CreateReq) Method

func (r *CreateReq) Method() string

func (*CreateReq) Url

func (r *CreateReq) Url() string

func (*CreateReq) Values

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

type CreateResp

type CreateResp struct{}

func Create

func Create(ctx *cputil.Context, req *CreateReq) (*CreateResp, error)

Create 添加IP地址

type DeleteReq

type DeleteReq struct {
	ID uint   `json:"id"` // 实例ID
	IP []uint `json:"ip"` // IP地址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 *cputil.Context, req *DeleteReq) (*DeleteResp, error)

Delete 删除实例IP

type ListReq

type ListReq struct {
	Search string `url:"search,omitempty"` // 搜索
	Cloud  string `url:"cloud,omitempty"`  // 实例ID

	Page    string `url:"page,omitempty"`
	PerPage string `url:"per_page,omitempty"`
	Orderby string `url:"orderby,omitempty"` // 排序(id,ip,hostid)
	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"`
		Ip       string `json:"ip"`
		Hostid   int    `json:"hostid"`
		Hostname string `json:"hostname"`
		Kvm      string `json:"kvm"`
	} `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 *cputil.Context, req *ListReq) (*ListResp, error)

List 实例列表

Jump to

Keyboard shortcuts

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