nodegroups

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 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          uint   `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
		CreateTime  string `json:"create_time"`
		Node        []struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"node"`
	} `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