ipconfigs

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IPListTypes = []maps.Map{
	{
		"name": "白名单",
		"code": IPListTypeWhite,
	},
	{
		"name": "黑名单",
		"code": IPListTypeBlack,
	},
	{
		"name": "灰名单",
		"code": IPListTypeGrey,
	},
}

Functions

This section is empty.

Types

type IPItemAction

type IPItemAction = string
const (
	IPItemActionAdd    IPItemAction = "add"
	IPItemActionUpdate IPItemAction = "update"
	IPItemActionDelete IPItemAction = "delete"
)

type IPItemConfig

type IPItemConfig struct {
	Action    IPItemAction `yaml:"action" json:"action"` // 对当前Item的操作
	Id        int64        `yaml:"id" json:"id"`
	IPFrom    string       `yaml:"ipFrom" json:"ipFrom"`
	IPTo      string       `yaml:"ipTo" json:"ipTo"`
	ExpiredAt int64        `yaml:"expiredAt" json:"expiredAt"`
}

type IPListConfig

type IPListConfig struct {
	Id      int64                `yaml:"id" json:"id"`           // ID
	IsOn    bool                 `yaml:"isOn" json:"isOn"`       // 是否启用
	Version int64                `yaml:"version" json:"version"` // 版本号
	Timeout *shared.TimeDuration `yaml:"timeout" json:"timeout"` // 默认超时时间
	Code    string               `yaml:"code" json:"code"`       // 代号
	Type    string               `yaml:"type" json:"type"`       // 类型
}

IP名单配置

type IPListRef

type IPListRef struct {
	IsOn   bool  `yaml:"isOn" json:"isOn"`
	ListId int64 `yaml:"listId" json:"listId"`
}

IP名单引用

type IPListType

type IPListType = string
const (
	IPListTypeWhite IPListType = "white"
	IPListTypeBlack IPListType = "black"
	IPListTypeGrey  IPListType = "grey"
)

Jump to

Keyboard shortcuts

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