diff options
Diffstat (limited to 'plugin/maxmind/maxmind_country_mmdb_out.go')
| -rw-r--r-- | plugin/maxmind/maxmind_country_mmdb_out.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugin/maxmind/maxmind_country_mmdb_out.go b/plugin/maxmind/maxmind_country_mmdb_out.go index fc72e83c..1bbaad6e 100644 --- a/plugin/maxmind/maxmind_country_mmdb_out.go +++ b/plugin/maxmind/maxmind_country_mmdb_out.go @@ -22,14 +22,14 @@ const ( func init() { lib.RegisterOutputConfigCreator(TypeGeoLite2CountryMMDBOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) { - return newGeoLite2CountryMMDBOut(TypeGeoLite2CountryMMDBOut, DescGeoLite2CountryMMDBOut, action, data) + return NewGeoLite2CountryMMDBOutFromBytes(TypeGeoLite2CountryMMDBOut, DescGeoLite2CountryMMDBOut, action, data) }) - lib.RegisterOutputConverter(TypeGeoLite2CountryMMDBOut, &GeoLite2CountryMMDBOut{ + lib.RegisterOutputConverter(TypeGeoLite2CountryMMDBOut, &geoLite2CountryMMDBOut{ Description: DescGeoLite2CountryMMDBOut, }) } -type GeoLite2CountryMMDBOut struct { +type geoLite2CountryMMDBOut struct { Type string Action lib.Action Description string @@ -43,19 +43,19 @@ type GeoLite2CountryMMDBOut struct { SourceMMDBURI string } -func (g *GeoLite2CountryMMDBOut) GetType() string { +func (g *geoLite2CountryMMDBOut) GetType() string { return g.Type } -func (g *GeoLite2CountryMMDBOut) GetAction() lib.Action { +func (g *geoLite2CountryMMDBOut) GetAction() lib.Action { return g.Action } -func (g *GeoLite2CountryMMDBOut) GetDescription() string { +func (g *geoLite2CountryMMDBOut) GetDescription() string { return g.Description } -func (g *GeoLite2CountryMMDBOut) Output(container lib.Container) error { +func (g *geoLite2CountryMMDBOut) Output(container lib.Container) error { dbName := "" dbDesc := "" dbLanguages := []string{"en"} @@ -119,7 +119,7 @@ func (g *GeoLite2CountryMMDBOut) Output(container lib.Container) error { return nil } -func (g *GeoLite2CountryMMDBOut) filterAndSortList(container lib.Container) []string { +func (g *geoLite2CountryMMDBOut) filterAndSortList(container lib.Container) []string { /* Note: The IPs and/or CIDRs of the latter list will overwrite those of the former one when duplicated data found due to MaxMind mmdb file format constraint. @@ -175,7 +175,7 @@ func (g *GeoLite2CountryMMDBOut) filterAndSortList(container lib.Container) []st return list } -func (g *GeoLite2CountryMMDBOut) marshalData(writer *mmdbwriter.Tree, entry *lib.Entry, extraInfo map[string]any) error { +func (g *geoLite2CountryMMDBOut) marshalData(writer *mmdbwriter.Tree, entry *lib.Entry, extraInfo map[string]any) error { entryCidr, err := entry.MarshalText(lib.GetIgnoreIPType(g.OnlyIPType)) if err != nil { return err @@ -371,7 +371,7 @@ func (g *GeoLite2CountryMMDBOut) marshalData(writer *mmdbwriter.Tree, entry *lib return nil } -func (g *GeoLite2CountryMMDBOut) writeFile(filename string, writer *mmdbwriter.Tree) error { +func (g *geoLite2CountryMMDBOut) writeFile(filename string, writer *mmdbwriter.Tree) error { if err := os.MkdirAll(g.OutputDir, 0755); err != nil { return err } |
