summaryrefslogtreecommitdiff
path: root/plugin/maxmind/dbip_country_mmdb_in.go
blob: aaaf34ae073917ab44b5c9034368cca4ea5072ad (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 maxmind

import (
	"encoding/json"

	"github.com/Loyalsoldier/geoip/lib"
)

/*
The types in this file extend the type `typeMaxmindMMDBIn`,
which make it possible to support more formats for the project.
*/

const (
	TypeDBIPCountryMMDBIn = "dbipCountryMMDB"
	DescDBIPCountryMMDBIn = "Convert DB-IP country mmdb database to other formats"
)

func init() {
	lib.RegisterInputConfigCreator(TypeDBIPCountryMMDBIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
		return NewGeoLite2CountryMMDBInFromBytes(TypeDBIPCountryMMDBIn, DescDBIPCountryMMDBIn, action, data)
	})
	lib.RegisterInputConverter(TypeDBIPCountryMMDBIn, &GeoLite2CountryMMDBIn{
		Description: DescDBIPCountryMMDBIn,
	})
}