blob: a757cbf78c817790d05ed55ffa125ca54626e4b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package plaintext
import (
"encoding/json"
"github.com/Loyalsoldier/geoip/lib"
)
/*
The types in this file extend the type `typeTextIn`,
which make it possible to support more formats for the project.
*/
const (
TypeSurgeRuleSetIn = "surgeRuleSet"
DescSurgeRuleSetIn = "Convert Surge RuleSet to other formats (just processing IP & CIDR lines)"
)
func init() {
lib.RegisterInputConfigCreator(TypeSurgeRuleSetIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
return NewTextInFromBytes(TypeSurgeRuleSetIn, DescSurgeRuleSetIn, action, data)
})
lib.RegisterInputConverter(TypeSurgeRuleSetIn, &textIn{
Description: DescSurgeRuleSetIn,
})
}
|