nodes

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListReq

type ListReq struct {
	Search    string   `url:"search,omitempty"`     // 搜索
	Area      string   `url:"area,omitempty"`       // 搜索区域id
	NodeGroup string   `url:"node_group,omitempty"` // 搜索节点分组ID
	Enable    string   `url:"enable,omitempty"`     // 搜索是否启用
	ListType  string   `url:"list_type,omitempty"`  // 获取类型(all,page),all会忽略页数直接返回所有
	Rid       string   `url:"rid,omitempty"`        // 资源包ID(前台用户)
	Type      []string `url:"type,omitempty"`       // 节点类型(v2.5.2+)

	Page    string `url:"page,omitempty"`
	PerPage string `url:"per_page,omitempty"`
	Orderby string `url:"orderby,omitempty"` // 排序(id,name,ip,area_id,group_id,cloud_num,group_name)
	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"`
		Name            string      `json:"name"`
		Ip              string      `json:"ip"`
		AreaId          int         `json:"area_id"`
		Status          int         `json:"status"`
		Port            int         `json:"port"`
		SshPass         string      `json:"ssh_pass"`
		Username        string      `json:"username"`
		Password        string      `json:"password"`
		Dns1            string      `json:"dns1"`
		Dns2            string      `json:"dns2"`
		NatStatus       int         `json:"nat_status"`
		UpdateFailedMsg string      `json:"update_failed_msg"`
		UpgradeStatus   int         `json:"upgrade_status"`
		UpgradeTime     string      `json:"upgrade_time"`
		Enable          int         `json:"enable"`
		AutoBootHost    int         `json:"auto_boot_host"`
		LastLiveTime    string      `json:"last_live_time"`
		GroupId         int         `json:"group_id"`
		SingleIpNat     int         `json:"single_ip_nat"`
		ChooseStoreRule int         `json:"choose_store_rule"`
		Evacuate        int         `json:"evacuate"`
		NatPortRange    string      `json:"nat_port_range"`
		MaxMemory       int         `json:"max_memory"`
		Type            string      `json:"type"`
		Trunk           int         `json:"trunk"`
		Remark          string      `json:"remark"`
		AreaName        string      `json:"area_name"`
		CloudNum        int         `json:"cloud_num"`
		GroupName       interface{} `json:"group_name"`
		Removable       bool        `json:"removable"`
		Alive           bool        `json:"alive"`
	} `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