summaryrefslogtreecommitdiff
path: root/plugin/maxmind/dbip_country_mmdb_out.go
blob: 77857d9522412822d9bb22292891b2f6cf486b1b (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 (
	TypeDBIPCountryMMDBOut = "dbipCountryMMDB"
	DescDBIPCountryMMDBOut = "Convert data to DB-IP country mmdb database format"
)

func init() {
	lib.RegisterOutputConfigCreator(TypeDBIPCountryMMDBOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
		return newGeoLite2CountryMMDBOut(TypeDBIPCountryMMDBOut, DescDBIPCountryMMDBOut, action, data)
	})
	lib.RegisterOutputConverter(TypeDBIPCountryMMDBOut, &GeoLite2CountryMMDBOut{
		Description: DescDBIPCountryMMDBOut,
	})
}