Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateReq ¶
type CreateResp ¶
type CreateResp struct{}
func Create ¶
func Create(ctx *cloudplatform.Context, req *CreateReq) (*CreateResp, error)
Create 添加NAT转发
type DeleteReq ¶
type DeleteResp ¶
type DeleteResp struct{}
func Delete ¶
func Delete(ctx *cloudplatform.Context, req *DeleteReq) (*DeleteResp, error)
Delete 删除NAT转发
type ListReq ¶
type ListReq struct {
ID uint `url:"-"` // 实例ID
Search string `url:"search,omitempty"` // 搜索
ListType string `url:"list_type,omitempty"` // 获取类型(all,page),all会忽略页数直接返回所有
Page string `url:"page,omitempty"`
PerPage string `url:"per_page,omitempty"`
Orderby string `url:"orderby,omitempty"` // 排序(id,name,ext_port,int_port,protocol)
Sort string `url:"sort,omitempty"`
}
type ListResp ¶
type ListResp struct {
NatHostIp string `json:"nat_host_ip"`
Data []struct {
ID uint `json:"id"`
Name string `json:"name"`
ExtPort uint `json:"ext_port"`
IntPort uint `json:"int_port"`
Protocol uint `json:"protocol"`
} `json:"data"`
Meta struct {
Total int `json:"total"`
TotalPage int `json:"total_page"`
Page int `json:"page"`
PerPage int `json:"per_page"`
} `json:"meta"`
}
Click to show internal directories.
Click to hide internal directories.