Files
EdgeNode/internal/iplibrary/action_interface.go

25 lines
523 B
Go
Raw Normal View History

2021-02-06 17:34:33 +08:00
package iplibrary
import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
2021-02-26 16:33:58 +08:00
"net/http"
2021-02-06 17:34:33 +08:00
)
type ActionInterface interface {
// 初始化
Init(config *firewallconfigs.FirewallActionConfig) error
// 添加
AddItem(listType IPListType, item *pb.IPItem) error
// 删除
DeleteItem(listType IPListType, item *pb.IPItem) error
// 关闭
Close() error
2021-02-26 16:33:58 +08:00
// 处理HTTP请求
DoHTTP(req *http.Request, resp http.ResponseWriter) (goNext bool, err error)
2021-02-06 17:34:33 +08:00
}