diff --git a/internal/entrypoint/entrypoint.go b/internal/entrypoint/entrypoint.go index df02b4df..643588a4 100644 --- a/internal/entrypoint/entrypoint.go +++ b/internal/entrypoint/entrypoint.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/yusing/go-proxy/internal/logging" + "github.com/yusing/go-proxy/internal/logging/accesslog" gphttp "github.com/yusing/go-proxy/internal/net/gphttp" - "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" "github.com/yusing/go-proxy/internal/net/gphttp/middleware" "github.com/yusing/go-proxy/internal/net/gphttp/middleware/errorpage" "github.com/yusing/go-proxy/internal/route/routes" diff --git a/internal/net/gphttp/accesslog/access_logger.go b/internal/logging/accesslog/access_logger.go similarity index 100% rename from internal/net/gphttp/accesslog/access_logger.go rename to internal/logging/accesslog/access_logger.go diff --git a/internal/net/gphttp/accesslog/access_logger_test.go b/internal/logging/accesslog/access_logger_test.go similarity index 98% rename from internal/net/gphttp/accesslog/access_logger_test.go rename to internal/logging/accesslog/access_logger_test.go index fabd41a8..9d01ca25 100644 --- a/internal/net/gphttp/accesslog/access_logger_test.go +++ b/internal/logging/accesslog/access_logger_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" "github.com/yusing/go-proxy/internal/task" "github.com/yusing/go-proxy/internal/utils" expect "github.com/yusing/go-proxy/internal/utils/testing" diff --git a/internal/net/gphttp/accesslog/back_scanner.go b/internal/logging/accesslog/back_scanner.go similarity index 100% rename from internal/net/gphttp/accesslog/back_scanner.go rename to internal/logging/accesslog/back_scanner.go diff --git a/internal/net/gphttp/accesslog/back_scanner_test.go b/internal/logging/accesslog/back_scanner_test.go similarity index 100% rename from internal/net/gphttp/accesslog/back_scanner_test.go rename to internal/logging/accesslog/back_scanner_test.go diff --git a/internal/net/gphttp/accesslog/config.go b/internal/logging/accesslog/config.go similarity index 100% rename from internal/net/gphttp/accesslog/config.go rename to internal/logging/accesslog/config.go diff --git a/internal/net/gphttp/accesslog/config_test.go b/internal/logging/accesslog/config_test.go similarity index 97% rename from internal/net/gphttp/accesslog/config_test.go rename to internal/logging/accesslog/config_test.go index 1a5597bd..23e76c7e 100644 --- a/internal/net/gphttp/accesslog/config_test.go +++ b/internal/logging/accesslog/config_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/yusing/go-proxy/internal/docker" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" "github.com/yusing/go-proxy/internal/utils" expect "github.com/yusing/go-proxy/internal/utils/testing" ) diff --git a/internal/net/gphttp/accesslog/fields.go b/internal/logging/accesslog/fields.go similarity index 100% rename from internal/net/gphttp/accesslog/fields.go rename to internal/logging/accesslog/fields.go diff --git a/internal/net/gphttp/accesslog/fields_test.go b/internal/logging/accesslog/fields_test.go similarity index 97% rename from internal/net/gphttp/accesslog/fields_test.go rename to internal/logging/accesslog/fields_test.go index 8e0fd8e1..9ab62bd2 100644 --- a/internal/net/gphttp/accesslog/fields_test.go +++ b/internal/logging/accesslog/fields_test.go @@ -3,7 +3,7 @@ package accesslog_test import ( "testing" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" expect "github.com/yusing/go-proxy/internal/utils/testing" ) diff --git a/internal/net/gphttp/accesslog/file_logger.go b/internal/logging/accesslog/file_logger.go similarity index 100% rename from internal/net/gphttp/accesslog/file_logger.go rename to internal/logging/accesslog/file_logger.go diff --git a/internal/net/gphttp/accesslog/file_logger_test.go b/internal/logging/accesslog/file_logger_test.go similarity index 100% rename from internal/net/gphttp/accesslog/file_logger_test.go rename to internal/logging/accesslog/file_logger_test.go diff --git a/internal/net/gphttp/accesslog/filter.go b/internal/logging/accesslog/filter.go similarity index 100% rename from internal/net/gphttp/accesslog/filter.go rename to internal/logging/accesslog/filter.go diff --git a/internal/net/gphttp/accesslog/filter_test.go b/internal/logging/accesslog/filter_test.go similarity index 98% rename from internal/net/gphttp/accesslog/filter_test.go rename to internal/logging/accesslog/filter_test.go index 22e83604..b97ed971 100644 --- a/internal/net/gphttp/accesslog/filter_test.go +++ b/internal/logging/accesslog/filter_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" gpnet "github.com/yusing/go-proxy/internal/net/types" "github.com/yusing/go-proxy/internal/utils/strutils" expect "github.com/yusing/go-proxy/internal/utils/testing" diff --git a/internal/net/gphttp/accesslog/formatter.go b/internal/logging/accesslog/formatter.go similarity index 100% rename from internal/net/gphttp/accesslog/formatter.go rename to internal/logging/accesslog/formatter.go diff --git a/internal/net/gphttp/accesslog/mock_file.go b/internal/logging/accesslog/mock_file.go similarity index 100% rename from internal/net/gphttp/accesslog/mock_file.go rename to internal/logging/accesslog/mock_file.go diff --git a/internal/net/gphttp/accesslog/multi_writer.go b/internal/logging/accesslog/multi_writer.go similarity index 100% rename from internal/net/gphttp/accesslog/multi_writer.go rename to internal/logging/accesslog/multi_writer.go diff --git a/internal/net/gphttp/accesslog/retention.go b/internal/logging/accesslog/retention.go similarity index 100% rename from internal/net/gphttp/accesslog/retention.go rename to internal/logging/accesslog/retention.go diff --git a/internal/net/gphttp/accesslog/retention_test.go b/internal/logging/accesslog/retention_test.go similarity index 91% rename from internal/net/gphttp/accesslog/retention_test.go rename to internal/logging/accesslog/retention_test.go index 125039e7..4feebfbb 100644 --- a/internal/net/gphttp/accesslog/retention_test.go +++ b/internal/logging/accesslog/retention_test.go @@ -3,7 +3,7 @@ package accesslog_test import ( "testing" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" expect "github.com/yusing/go-proxy/internal/utils/testing" ) diff --git a/internal/net/gphttp/accesslog/rotate.go b/internal/logging/accesslog/rotate.go similarity index 100% rename from internal/net/gphttp/accesslog/rotate.go rename to internal/logging/accesslog/rotate.go diff --git a/internal/net/gphttp/accesslog/rotate_test.go b/internal/logging/accesslog/rotate_test.go similarity index 99% rename from internal/net/gphttp/accesslog/rotate_test.go rename to internal/logging/accesslog/rotate_test.go index a770331f..8897d8be 100644 --- a/internal/net/gphttp/accesslog/rotate_test.go +++ b/internal/logging/accesslog/rotate_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + . "github.com/yusing/go-proxy/internal/logging/accesslog" "github.com/yusing/go-proxy/internal/task" "github.com/yusing/go-proxy/internal/utils" "github.com/yusing/go-proxy/internal/utils/strutils" diff --git a/internal/net/gphttp/accesslog/status_code_range.go b/internal/logging/accesslog/status_code_range.go similarity index 100% rename from internal/net/gphttp/accesslog/status_code_range.go rename to internal/logging/accesslog/status_code_range.go diff --git a/internal/net/gphttp/accesslog/stdout_logger.go b/internal/logging/accesslog/stdout_logger.go similarity index 100% rename from internal/net/gphttp/accesslog/stdout_logger.go rename to internal/logging/accesslog/stdout_logger.go diff --git a/internal/net/gphttp/accesslog/units.go b/internal/logging/accesslog/units.go similarity index 100% rename from internal/net/gphttp/accesslog/units.go rename to internal/logging/accesslog/units.go diff --git a/internal/net/gphttp/reverseproxy/reverse_proxy_mod.go b/internal/net/gphttp/reverseproxy/reverse_proxy_mod.go index 4e37d73d..129c19a6 100644 --- a/internal/net/gphttp/reverseproxy/reverse_proxy_mod.go +++ b/internal/net/gphttp/reverseproxy/reverse_proxy_mod.go @@ -26,7 +26,7 @@ import ( "github.com/rs/zerolog" "github.com/yusing/go-proxy/internal/logging" - "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + "github.com/yusing/go-proxy/internal/logging/accesslog" "github.com/yusing/go-proxy/internal/net/gphttp/httpheaders" "github.com/yusing/go-proxy/internal/net/types" U "github.com/yusing/go-proxy/internal/utils" diff --git a/internal/route/fileserver.go b/internal/route/fileserver.go index 216aff5c..9c388c17 100644 --- a/internal/route/fileserver.go +++ b/internal/route/fileserver.go @@ -6,8 +6,8 @@ import ( "path/filepath" "github.com/yusing/go-proxy/internal/gperr" + "github.com/yusing/go-proxy/internal/logging/accesslog" gphttp "github.com/yusing/go-proxy/internal/net/gphttp" - "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" "github.com/yusing/go-proxy/internal/net/gphttp/middleware" "github.com/yusing/go-proxy/internal/route/routes" "github.com/yusing/go-proxy/internal/task" diff --git a/internal/route/reverse_proxy.go b/internal/route/reverse_proxy.go index 777b736c..a5833ce6 100755 --- a/internal/route/reverse_proxy.go +++ b/internal/route/reverse_proxy.go @@ -9,8 +9,8 @@ import ( "github.com/yusing/go-proxy/internal/gperr" "github.com/yusing/go-proxy/internal/homepage" "github.com/yusing/go-proxy/internal/idlewatcher" + "github.com/yusing/go-proxy/internal/logging/accesslog" gphttp "github.com/yusing/go-proxy/internal/net/gphttp" - "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" "github.com/yusing/go-proxy/internal/net/gphttp/loadbalancer" loadbalance "github.com/yusing/go-proxy/internal/net/gphttp/loadbalancer/types" "github.com/yusing/go-proxy/internal/net/gphttp/middleware" diff --git a/internal/route/route.go b/internal/route/route.go index f69bf175..fb866fa4 100644 --- a/internal/route/route.go +++ b/internal/route/route.go @@ -23,7 +23,7 @@ import ( "github.com/yusing/go-proxy/internal/common" config "github.com/yusing/go-proxy/internal/config/types" - "github.com/yusing/go-proxy/internal/net/gphttp/accesslog" + "github.com/yusing/go-proxy/internal/logging/accesslog" loadbalance "github.com/yusing/go-proxy/internal/net/gphttp/loadbalancer/types" "github.com/yusing/go-proxy/internal/route/routes" "github.com/yusing/go-proxy/internal/route/rules"