diff --git a/main.go b/main.go index 51ae0ebd..25916ad6 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" // Load input plugins! _ "github.com/unpoller/unpoller/pkg/inputunifi" // Load output plugins! diff --git a/pkg/datadogunifi/datadog.go b/pkg/datadogunifi/datadog.go index 59dc9e31..8006f0ca 100644 --- a/pkg/datadogunifi/datadog.go +++ b/pkg/datadogunifi/datadog.go @@ -8,7 +8,7 @@ import ( "github.com/DataDog/datadog-go/statsd" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" "golift.io/cnfg" ) diff --git a/pkg/datadogunifi/report.go b/pkg/datadogunifi/report.go index 3a72ee65..74e9ef56 100644 --- a/pkg/datadogunifi/report.go +++ b/pkg/datadogunifi/report.go @@ -5,7 +5,7 @@ import ( "time" "github.com/DataDog/datadog-go/statsd" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) // Report is a will report the current collection run data. diff --git a/pkg/influxunifi/influxdb.go b/pkg/influxunifi/influxdb.go index a39e88ba..7f31c378 100644 --- a/pkg/influxunifi/influxdb.go +++ b/pkg/influxunifi/influxdb.go @@ -13,8 +13,8 @@ import ( influx "github.com/influxdata/influxdb1-client/v2" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/poller" + "github.com/unpoller/unpoller/pkg/webserver" "golift.io/cnfg" ) diff --git a/pkg/influxunifi/logger.go b/pkg/influxunifi/logger.go index 8f76bf77..32b9fc89 100644 --- a/pkg/influxunifi/logger.go +++ b/pkg/influxunifi/logger.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/webserver" ) // Logf logs a message. diff --git a/pkg/influxunifi/report.go b/pkg/influxunifi/report.go index f7e70256..d309c482 100644 --- a/pkg/influxunifi/report.go +++ b/pkg/influxunifi/report.go @@ -6,7 +6,7 @@ import ( "time" influx "github.com/influxdata/influxdb1-client/v2" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) // Report is returned to the calling procedure after everything is processed. diff --git a/pkg/inputunifi/collectevents.go b/pkg/inputunifi/collectevents.go index 086aa4cf..17db05c7 100644 --- a/pkg/inputunifi/collectevents.go +++ b/pkg/inputunifi/collectevents.go @@ -5,7 +5,7 @@ import ( "time" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/webserver" ) /* Event collection. Events are also sent to the webserver for display. */ diff --git a/pkg/inputunifi/collector.go b/pkg/inputunifi/collector.go index 1d3e33ee..6b2472ff 100644 --- a/pkg/inputunifi/collector.go +++ b/pkg/inputunifi/collector.go @@ -8,7 +8,7 @@ import ( "time" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) var ErrScrapeFilterMatchFailed = fmt.Errorf("scrape filter match failed, and filter is not http URL") diff --git a/pkg/inputunifi/input.go b/pkg/inputunifi/input.go index e27273ef..6e17ba41 100644 --- a/pkg/inputunifi/input.go +++ b/pkg/inputunifi/input.go @@ -10,7 +10,7 @@ import ( "time" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) // PluginName is the name of this input plugin. diff --git a/pkg/inputunifi/interface.go b/pkg/inputunifi/interface.go index 5b07db2c..7d2dd25f 100644 --- a/pkg/inputunifi/interface.go +++ b/pkg/inputunifi/interface.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/poller" + "github.com/unpoller/unpoller/pkg/webserver" ) var ( diff --git a/pkg/inputunifi/updateweb.go b/pkg/inputunifi/updateweb.go index c657236d..ac26b508 100644 --- a/pkg/inputunifi/updateweb.go +++ b/pkg/inputunifi/updateweb.go @@ -6,7 +6,7 @@ import ( "time" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/webserver" ) /* This code reformats our data to be displayed on the built-in web interface. */ diff --git a/pkg/lokiunifi/logger.go b/pkg/lokiunifi/logger.go index 21a6e6be..831c6258 100644 --- a/pkg/lokiunifi/logger.go +++ b/pkg/lokiunifi/logger.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/webserver" ) // Logf logs a message. diff --git a/pkg/lokiunifi/loki.go b/pkg/lokiunifi/loki.go index 07236519..0f54c39e 100644 --- a/pkg/lokiunifi/loki.go +++ b/pkg/lokiunifi/loki.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/unpoller/unpoller/core/poller" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/poller" + "github.com/unpoller/unpoller/pkg/webserver" "golift.io/cnfg" ) diff --git a/pkg/lokiunifi/report.go b/pkg/lokiunifi/report.go index 7cf54aa2..edc876c5 100644 --- a/pkg/lokiunifi/report.go +++ b/pkg/lokiunifi/report.go @@ -6,7 +6,7 @@ import ( "time" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) // LogStream contains a stream of logs (like a log file). diff --git a/pkg/mysqlunifi/main.go b/pkg/mysqlunifi/main.go index 266bb434..be58ffb5 100644 --- a/pkg/mysqlunifi/main.go +++ b/pkg/mysqlunifi/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" "golift.io/cnfg" ) diff --git a/core/poller/LICENSE b/pkg/poller/LICENSE similarity index 100% rename from core/poller/LICENSE rename to pkg/poller/LICENSE diff --git a/core/poller/README.md b/pkg/poller/README.md similarity index 100% rename from core/poller/README.md rename to pkg/poller/README.md diff --git a/core/poller/commands.go b/pkg/poller/commands.go similarity index 100% rename from core/poller/commands.go rename to pkg/poller/commands.go diff --git a/core/poller/config.go b/pkg/poller/config.go similarity index 100% rename from core/poller/config.go rename to pkg/poller/config.go diff --git a/core/poller/inputs.go b/pkg/poller/inputs.go similarity index 100% rename from core/poller/inputs.go rename to pkg/poller/inputs.go diff --git a/core/poller/logger.go b/pkg/poller/logger.go similarity index 100% rename from core/poller/logger.go rename to pkg/poller/logger.go diff --git a/core/poller/outputs.go b/pkg/poller/outputs.go similarity index 100% rename from core/poller/outputs.go rename to pkg/poller/outputs.go diff --git a/core/poller/start.go b/pkg/poller/start.go similarity index 100% rename from core/poller/start.go rename to pkg/poller/start.go diff --git a/pkg/promunifi/collector.go b/pkg/promunifi/collector.go index 013c4130..72091607 100644 --- a/pkg/promunifi/collector.go +++ b/pkg/promunifi/collector.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" promver "github.com/prometheus/common/version" "github.com/unpoller/unifi" - "github.com/unpoller/unpoller/core/poller" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/poller" + "github.com/unpoller/unpoller/pkg/webserver" "golift.io/version" ) diff --git a/pkg/promunifi/logger.go b/pkg/promunifi/logger.go index c54f9132..d9529484 100644 --- a/pkg/promunifi/logger.go +++ b/pkg/promunifi/logger.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/unpoller/unpoller/core/webserver" + "github.com/unpoller/unpoller/pkg/webserver" ) // Logf logs a message. diff --git a/pkg/promunifi/report.go b/pkg/promunifi/report.go index b12bfaa5..34426146 100644 --- a/pkg/promunifi/report.go +++ b/pkg/promunifi/report.go @@ -5,7 +5,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) // This file contains the report interface. diff --git a/core/webserver/LICENSE b/pkg/webserver/LICENSE similarity index 100% rename from core/webserver/LICENSE rename to pkg/webserver/LICENSE diff --git a/core/webserver/README.md b/pkg/webserver/README.md similarity index 100% rename from core/webserver/README.md rename to pkg/webserver/README.md diff --git a/core/webserver/handlers.go b/pkg/webserver/handlers.go similarity index 100% rename from core/webserver/handlers.go rename to pkg/webserver/handlers.go diff --git a/core/webserver/logger.go b/pkg/webserver/logger.go similarity index 100% rename from core/webserver/logger.go rename to pkg/webserver/logger.go diff --git a/core/webserver/plugins.go b/pkg/webserver/plugins.go similarity index 100% rename from core/webserver/plugins.go rename to pkg/webserver/plugins.go diff --git a/core/webserver/plugins_types.go b/pkg/webserver/plugins_types.go similarity index 100% rename from core/webserver/plugins_types.go rename to pkg/webserver/plugins_types.go diff --git a/core/webserver/server.go b/pkg/webserver/server.go similarity index 99% rename from core/webserver/server.go rename to pkg/webserver/server.go index 9c482277..2ba2f2fc 100644 --- a/core/webserver/server.go +++ b/pkg/webserver/server.go @@ -11,7 +11,7 @@ import ( "time" "github.com/gorilla/mux" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" "golang.org/x/crypto/bcrypt" ) diff --git a/core/webserver/shared.go b/pkg/webserver/shared.go similarity index 98% rename from core/webserver/shared.go rename to pkg/webserver/shared.go index 8cc9d212..ec3a7ca7 100644 --- a/core/webserver/shared.go +++ b/pkg/webserver/shared.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/unpoller/unpoller/core/poller" + "github.com/unpoller/unpoller/pkg/poller" ) /* This file has the methods that help the content-methods. Shared helpers. */