summaryrefslogtreecommitdiff
path: root/plugin/maxmind/ipinfo_country_mmdb_out.go
blob: aec195ff6fb8c051724380e36e586b524d812fd1 (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 `typeMaxmindMMDBOut`,
which make it possible to support more formats for the project.
*/

const (
	TypeIPInfoCountryMMDBOut = "ipinfoCountryMMDB"
	DescIPInfoCountryMMDBOut = "Convert data to IPInfo country mmdb database format"
)

func init() {
	lib.RegisterOutputConfigCreator(TypeIPInfoCountryMMDBOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
		return NewGeoLite2CountryMMDBOutFromBytes(TypeIPInfoCountryMMDBOut, DescIPInfoCountryMMDBOut, action, data)
	})
	lib.RegisterOutputConverter(TypeIPInfoCountryMMDBOut, &GeoLite2CountryMMDBOut{
		Description: DescIPInfoCountryMMDBOut,
	})
}