diff options
Diffstat (limited to 'plugin/maxmind/maxmind_country_mmdb_in.go')
| -rw-r--r-- | plugin/maxmind/maxmind_country_mmdb_in.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugin/maxmind/maxmind_country_mmdb_in.go b/plugin/maxmind/maxmind_country_mmdb_in.go index 1f6d5386..d9015e34 100644 --- a/plugin/maxmind/maxmind_country_mmdb_in.go +++ b/plugin/maxmind/maxmind_country_mmdb_in.go @@ -18,14 +18,14 @@ const ( func init() { lib.RegisterInputConfigCreator(TypeGeoLite2CountryMMDBIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) { - return newGeoLite2CountryMMDBIn(TypeGeoLite2CountryMMDBIn, DescGeoLite2CountryMMDBIn, action, data) + return NewGeoLite2CountryMMDBInFromBytes(TypeGeoLite2CountryMMDBIn, DescGeoLite2CountryMMDBIn, action, data) }) - lib.RegisterInputConverter(TypeGeoLite2CountryMMDBIn, &GeoLite2CountryMMDBIn{ + lib.RegisterInputConverter(TypeGeoLite2CountryMMDBIn, &geoLite2CountryMMDBIn{ Description: DescGeoLite2CountryMMDBIn, }) } -type GeoLite2CountryMMDBIn struct { +type geoLite2CountryMMDBIn struct { Type string Action lib.Action Description string @@ -34,19 +34,19 @@ type GeoLite2CountryMMDBIn struct { OnlyIPType lib.IPType } -func (g *GeoLite2CountryMMDBIn) GetType() string { +func (g *geoLite2CountryMMDBIn) GetType() string { return g.Type } -func (g *GeoLite2CountryMMDBIn) GetAction() lib.Action { +func (g *geoLite2CountryMMDBIn) GetAction() lib.Action { return g.Action } -func (g *GeoLite2CountryMMDBIn) GetDescription() string { +func (g *geoLite2CountryMMDBIn) GetDescription() string { return g.Description } -func (g *GeoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, error) { +func (g *geoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, error) { var content []byte var err error switch { @@ -89,7 +89,7 @@ func (g *GeoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, e return container, nil } -func (g *GeoLite2CountryMMDBIn) generateEntries(content []byte, entries map[string]*lib.Entry) error { +func (g *geoLite2CountryMMDBIn) generateEntries(content []byte, entries map[string]*lib.Entry) error { db, err := maxminddb.OpenBytes(content) if err != nil { return err |
