ip

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Address

type Address struct {
	Id            uint   `json:"id"`             // ip地址id
	BlockId       uint   `json:"block_id"`       // ip段id
	Address       string `json:"address"`        // ip地址
	AddressString string `json:"address_string"` // ip地址
	Status        string `json:"status"`         // 状态
	Type          string `json:"type"`           // 类型
	Relid         int    `json:"relid"`          // 类型关联id
	Mac           string `json:"mac"`            // mac地址
	Remark        string `json:"remark"`         // 备注
	IsLock        int    `json:"is_lock"`        // 锁定状态
	AssignTime    any    `json:"assign_time"`    // 分配时间
	CreatedAt     string `json:"created_at"`     // 分配时间
	UpdatedAt     string `json:"updated_at"`     // 更新时间
	Device        string `json:"device"`         // 驱动
	Vlan          string `json:"vlan"`           // vlan
	Netmask       string `json:"netmask"`        // 子网掩码
	Gateway       string `json:"gateway"`        // 网关
}

type DeleteReq

type DeleteReq struct {
	BlockId   uint // ip分段id
	AddressId uint // ip地址id
}

func (*DeleteReq) Body

func (r *DeleteReq) Body() (body any)

func (*DeleteReq) Method

func (r *DeleteReq) Method() (method string)

func (*DeleteReq) Url

func (r *DeleteReq) Url() (url string)

func (*DeleteReq) Values

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

type ListReq

type ListReq struct {
	BlockId  uint `url:"-"`
	Page     uint `url:"page"`
	PageSize uint `url:"page_size"`
}

func (*ListReq) Body

func (r *ListReq) Body() (body any)

func (*ListReq) Method

func (r *ListReq) Method() (method string)

func (*ListReq) Url

func (r *ListReq) Url() (url string)

func (*ListReq) Values

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

type ListResp

type ListResp struct {
	Success   bool      `json:"success"`
	Error     string    `json:"error"`
	Addresses []Address `json:"addresses"`
	Total     int       `json:"total"` // 总条数
}

func (ListResp) Err

func (r ListResp) Err() (err error)

func (ListResp) Ok

func (r ListResp) Ok() (ok bool)

Jump to

Keyboard shortcuts

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