ip

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FreeReq

type FreeReq struct {
	HostId      string `url:"hostid,omitempty"`        // 实例ID
	IpSegmentId string `url:"ip_segment_id,omitempty"` // 所属ip段id
}

func (*FreeReq) Body

func (r *FreeReq) Body() any

func (*FreeReq) Form

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

func (*FreeReq) Header

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

func (*FreeReq) Method

func (r *FreeReq) Method() string

func (*FreeReq) Url

func (r *FreeReq) Url() string

func (*FreeReq) Values

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

type FreeResp

type FreeResp struct {
	Id     int    `json:"id"`
	IpName string `json:"ip_name"`
	Ip     []struct {
		Id int    `json:"id"`
		Ip string `json:"ip"`
	}
}

func Free

func Free(ctx *cloudplatform.Context, req *FreeReq) ([]*FreeResp, error)

type ListReq

type ListReq struct {
	IpSegmentId string `url:"ip_segment_id,omitempty"` // 所属ip段id
	Ip          string `url:"ip,omitempty"`            // 模糊搜索ip/备注
	Type        string `url:"type,omitempty"`          // 类型搜索(cloud=实例,load_balance=负载均衡)
	HostId      string `url:"hostid,omitempty"`        // 关联id搜索
	Lock        string `url:"lock,omitempty"`          // 锁定状态(0=未锁定,1=锁定)

	Page    string `url:"page,omitempty"`
	PerPage string `url:"per_page,omitempty"`
	Orderby string `url:"orderby,omitempty"` // 排序(id,ip,ip_int,hostid,vlanid,uid,hostname,node_name,area_name,username,mac)
	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"`
		IpSegmentId     int         `json:"ip_segment_id"`
		Hostid          int         `json:"hostid"`
		ServerMainip    string      `json:"server_mainip"`
		Vlanid          int         `json:"vlanid"`
		Remark          string      `json:"remark"`
		Lock            int         `json:"lock"`
		IpMac           string      `json:"ip_mac"`
		Type            string      `json:"type"`
		Hostname        interface{} `json:"hostname"`
		Username        interface{} `json:"username"`
		Parent          interface{} `json:"parent"`
		ParentName      string      `json:"parent_name"`
		Mac             interface{} `json:"mac"`
		ResourcePackage interface{} `json:"resource_package"`
		NodeName        string      `json:"node_name"`
		AreaName        string      `json:"area_name"`
		RCount          interface{} `json:"r_count"`
	} `json:"data"`
	Meta struct {
		Total     int `json:"total"`
		TotalPage int `json:"total_page"`
		PerPage   int `json:"per_page"`
		Page      int `json:"page"`
	} `json:"meta"`
}

func List

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

List 实例列表

Jump to

Keyboard shortcuts

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