简化IP名单中创建IP操作/支持IP以CIDR方式显示

This commit is contained in:
GoEdgeLab
2024-04-13 16:48:24 +08:00
parent 3b3763d35b
commit 06ddd03dd8
8 changed files with 321 additions and 35 deletions

View File

@@ -5,6 +5,7 @@ import "github.com/iwind/TeaGo/dbs"
const (
IPItemField_Id dbs.FieldName = "id" // ID
IPItemField_ListId dbs.FieldName = "listId" // 所属名单ID
IPItemField_Value dbs.FieldName = "value" // 原始值
IPItemField_Type dbs.FieldName = "type" // 类型
IPItemField_IpFrom dbs.FieldName = "ipFrom" // 开始IP
IPItemField_IpTo dbs.FieldName = "ipTo" // 结束IP
@@ -32,6 +33,7 @@ const (
type IPItem struct {
Id uint64 `field:"id"` // ID
ListId uint32 `field:"listId"` // 所属名单ID
Value string `field:"value"` // 原始值
Type string `field:"type"` // 类型
IpFrom string `field:"ipFrom"` // 开始IP
IpTo string `field:"ipTo"` // 结束IP
@@ -58,6 +60,7 @@ type IPItem struct {
type IPItemOperator struct {
Id any // ID
ListId any // 所属名单ID
Value any // 原始值
Type any // 类型
IpFrom any // 开始IP
IpTo any // 结束IP