From 48e98482f79949d31687979c1b7f11d80de2bc9c Mon Sep 17 00:00:00 2001 From: Ming Deng Date: Mon, 5 Oct 2020 18:13:26 +0800 Subject: [PATCH] rename infrastructure to core --- pkg/adapter/admin.go | 2 +- pkg/adapter/config.go | 2 +- pkg/adapter/config/adapter.go | 2 +- pkg/adapter/config/config.go | 2 +- pkg/adapter/config/env/env.go | 2 +- pkg/adapter/config/fake.go | 2 +- pkg/adapter/config/json.go | 2 +- pkg/adapter/config/xml/xml.go | 2 +- pkg/adapter/config/yaml/yaml.go | 2 +- pkg/adapter/log.go | 4 ++-- pkg/adapter/metric/prometheus.go | 2 +- pkg/adapter/orm/orm.go | 2 +- .../session/couchbase/sess_couchbase.go | 2 +- pkg/adapter/session/ledis/ledis_session.go | 2 +- pkg/adapter/session/memcache/sess_memcache.go | 2 +- pkg/adapter/session/mysql/sess_mysql.go | 2 +- .../session/postgres/sess_postgresql.go | 2 +- pkg/adapter/session/provider_adapter.go | 2 +- pkg/adapter/session/redis/sess_redis.go | 2 +- .../session/redis_cluster/redis_cluster.go | 2 +- .../redis_sentinel/sess_redis_sentinel.go | 2 +- pkg/adapter/session/sess_cookie.go | 2 +- pkg/adapter/session/sess_file.go | 2 +- pkg/adapter/session/sess_mem.go | 2 +- pkg/adapter/session/sess_utils.go | 2 +- pkg/adapter/session/session.go | 2 +- pkg/adapter/session/ssdb/sess_ssdb.go | 2 +- pkg/adapter/session/store_adapter.go | 2 +- pkg/adapter/toolbox/healthcheck.go | 2 +- pkg/adapter/toolbox/profile.go | 2 +- pkg/adapter/utils/caller.go | 2 +- pkg/adapter/utils/debug.go | 2 +- pkg/adapter/utils/file.go | 2 +- pkg/adapter/utils/mail.go | 2 +- pkg/adapter/utils/pagination/paginator.go | 2 +- pkg/adapter/utils/rand.go | 2 +- pkg/adapter/utils/safemap.go | 2 +- pkg/adapter/utils/slice.go | 2 +- pkg/adapter/utils/utils.go | 2 +- pkg/adapter/validation/util.go | 2 +- pkg/adapter/validation/validation.go | 2 +- pkg/adapter/validation/validators.go | 2 +- pkg/client/orm/do_nothing_orm.go | 2 +- .../orm/filter/bean/default_value_filter.go | 4 ++-- pkg/client/orm/filter_orm_decorator.go | 2 +- pkg/client/orm/filter_orm_decorator_test.go | 2 +- pkg/client/orm/hints/db_hints.go | 2 +- pkg/client/orm/migration/ddl.go | 2 +- pkg/client/orm/migration/migration.go | 2 +- pkg/client/orm/orm.go | 4 ++-- pkg/client/orm/types.go | 2 +- pkg/{infrastructure => core}/bean/context.go | 0 pkg/{infrastructure => core}/bean/doc.go | 0 pkg/{infrastructure => core}/bean/factory.go | 0 pkg/{infrastructure => core}/bean/metadata.go | 0 .../bean/tag_auto_wire_bean_factory.go | 2 +- .../bean/tag_auto_wire_bean_factory_test.go | 0 .../bean/time_type_adapter.go | 0 .../bean/time_type_adapter_test.go | 0 .../bean/type_adapter.go | 0 .../config/base_config_test.go | 0 pkg/{infrastructure => core}/config/config.go | 0 .../config/config_test.go | 0 .../config/env/env.go | 2 +- .../config/env/env_test.go | 0 .../config/etcd/config.go | 4 ++-- .../config/etcd/config_test.go | 0 pkg/{infrastructure => core}/config/fake.go | 0 pkg/{infrastructure => core}/config/ini.go | 0 .../config/ini_test.go | 0 .../config/json/json.go | 4 ++-- .../config/json/json_test.go | 2 +- .../config/xml/xml.go | 4 ++-- .../config/xml/xml_test.go | 2 +- .../config/yaml/yaml.go | 4 ++-- .../config/yaml/yaml_test.go | 2 +- .../governor/command.go | 0 .../governor/healthcheck.go | 0 .../governor/profile.go | 2 +- .../governor/profile_test.go | 0 pkg/{infrastructure => core}/logs/README.md | 0 .../logs/access_log.go | 0 .../logs/access_log_test.go | 0 .../logs/alils/alils.go | 2 +- .../logs/alils/config.go | 0 .../logs/alils/log.pb.go | 0 .../logs/alils/log_config.go | 0 .../logs/alils/log_project.go | 0 .../logs/alils/log_store.go | 0 .../logs/alils/machine_group.go | 0 .../logs/alils/request.go | 0 .../logs/alils/signature.go | 0 pkg/{infrastructure => core}/logs/conn.go | 0 .../logs/conn_test.go | 0 pkg/{infrastructure => core}/logs/console.go | 0 .../logs/console_test.go | 0 pkg/{infrastructure => core}/logs/es/es.go | 2 +- pkg/{infrastructure => core}/logs/es/index.go | 2 +- .../logs/es/index_test.go | 2 +- pkg/{infrastructure => core}/logs/file.go | 0 .../logs/file_test.go | 0 .../logs/formatter.go | 0 .../logs/formatter_test.go | 0 pkg/{infrastructure => core}/logs/jianliao.go | 0 .../logs/jianliao_test.go | 0 pkg/{infrastructure => core}/logs/log.go | 0 pkg/{infrastructure => core}/logs/log_msg.go | 0 .../logs/log_msg_test.go | 0 pkg/{infrastructure => core}/logs/log_test.go | 0 pkg/{infrastructure => core}/logs/logger.go | 0 .../logs/logger_test.go | 0 .../logs/multifile.go | 0 .../logs/multifile_test.go | 0 pkg/{infrastructure => core}/logs/slack.go | 0 pkg/{infrastructure => core}/logs/smtp.go | 0 .../logs/smtp_test.go | 0 .../session/README.md | 0 .../session/couchbase/sess_couchbase.go | 2 +- .../session/ledis/ledis_session.go | 2 +- .../session/memcache/sess_memcache.go | 2 +- .../session/mysql/sess_mysql.go | 2 +- .../session/postgres/sess_postgresql.go | 2 +- .../session/redis/sess_redis.go | 2 +- .../session/redis/sess_redis_test.go | 2 +- .../session/redis_cluster/redis_cluster.go | 2 +- .../redis_sentinel/sess_redis_sentinel.go | 2 +- .../sess_redis_sentinel_test.go | 2 +- .../session/sess_cookie.go | 0 .../session/sess_cookie_test.go | 0 .../session/sess_file.go | 0 .../session/sess_file_test.go | 0 .../session/sess_mem.go | 0 .../session/sess_mem_test.go | 0 .../session/sess_test.go | 0 .../session/sess_utils.go | 2 +- .../session/session.go | 0 .../session/ssdb/sess_ssdb.go | 2 +- pkg/{infrastructure => core}/utils/caller.go | 0 .../utils/caller_test.go | 0 pkg/{infrastructure => core}/utils/debug.go | 0 .../utils/debug_test.go | 0 pkg/{infrastructure => core}/utils/file.go | 0 .../utils/file_test.go | 0 pkg/{infrastructure => core}/utils/kv.go | 0 pkg/{infrastructure => core}/utils/kv_test.go | 0 pkg/{infrastructure => core}/utils/mail.go | 0 .../utils/mail_test.go | 0 .../utils/pagination/doc.go | 2 +- .../utils/pagination/paginator.go | 0 .../utils/pagination/utils.go | 0 pkg/{infrastructure => core}/utils/rand.go | 0 .../utils/rand_test.go | 0 pkg/{infrastructure => core}/utils/safemap.go | 0 .../utils/safemap_test.go | 0 pkg/{infrastructure => core}/utils/slice.go | 0 .../utils/slice_test.go | 0 .../utils/testdata/grepe.test | 0 pkg/{infrastructure => core}/utils/time.go | 0 pkg/{infrastructure => core}/utils/utils.go | 0 .../utils/utils_test.go | 0 .../validation/README.md | 0 .../validation/util.go | 0 .../validation/util_test.go | 0 .../validation/validation.go | 0 .../validation/validation_test.go | 0 .../validation/validators.go | 2 +- pkg/server/web/admin.go | 2 +- pkg/server/web/admin_controller.go | 2 +- pkg/server/web/admin_test.go | 2 +- pkg/server/web/captcha/captcha.go | 4 ++-- pkg/server/web/captcha/image_test.go | 2 +- pkg/server/web/config.go | 8 +++---- pkg/server/web/config_test.go | 2 +- pkg/server/web/context/context.go | 2 +- pkg/server/web/context/input.go | 2 +- pkg/server/web/context/param/conv.go | 2 +- pkg/server/web/controller.go | 2 +- pkg/server/web/error.go | 2 +- pkg/server/web/hooks.go | 4 ++-- pkg/server/web/pagination/controller.go | 2 +- pkg/server/web/parser.go | 4 ++-- pkg/server/web/router.go | 4 ++-- pkg/server/web/router_test.go | 2 +- pkg/server/web/server.go | 4 ++-- pkg/server/web/staticfile.go | 2 +- pkg/server/web/statistics.go | 2 +- pkg/server/web/template.go | 4 ++-- pkg/server/web/tree.go | 2 +- pkg/task/govenor_command.go | 2 +- pkg/task/task.go | 23 +++++++++---------- 190 files changed, 129 insertions(+), 130 deletions(-) rename pkg/{infrastructure => core}/bean/context.go (100%) rename pkg/{infrastructure => core}/bean/doc.go (100%) rename pkg/{infrastructure => core}/bean/factory.go (100%) rename pkg/{infrastructure => core}/bean/metadata.go (100%) rename pkg/{infrastructure => core}/bean/tag_auto_wire_bean_factory.go (99%) rename pkg/{infrastructure => core}/bean/tag_auto_wire_bean_factory_test.go (100%) rename pkg/{infrastructure => core}/bean/time_type_adapter.go (100%) rename pkg/{infrastructure => core}/bean/time_type_adapter_test.go (100%) rename pkg/{infrastructure => core}/bean/type_adapter.go (100%) rename pkg/{infrastructure => core}/config/base_config_test.go (100%) rename pkg/{infrastructure => core}/config/config.go (100%) rename pkg/{infrastructure => core}/config/config_test.go (100%) rename pkg/{infrastructure => core}/config/env/env.go (97%) rename pkg/{infrastructure => core}/config/env/env_test.go (100%) rename pkg/{infrastructure => core}/config/etcd/config.go (98%) rename pkg/{infrastructure => core}/config/etcd/config_test.go (100%) rename pkg/{infrastructure => core}/config/fake.go (100%) rename pkg/{infrastructure => core}/config/ini.go (100%) rename pkg/{infrastructure => core}/config/ini_test.go (100%) rename pkg/{infrastructure => core}/config/json/json.go (98%) rename pkg/{infrastructure => core}/config/json/json_test.go (99%) rename pkg/{infrastructure => core}/config/xml/xml.go (98%) rename pkg/{infrastructure => core}/config/xml/xml_test.go (98%) rename pkg/{infrastructure => core}/config/yaml/yaml.go (98%) rename pkg/{infrastructure => core}/config/yaml/yaml_test.go (98%) rename pkg/{infrastructure => core}/governor/command.go (100%) rename pkg/{infrastructure => core}/governor/healthcheck.go (100%) rename pkg/{infrastructure => core}/governor/profile.go (98%) rename pkg/{infrastructure => core}/governor/profile_test.go (100%) rename pkg/{infrastructure => core}/logs/README.md (100%) rename pkg/{infrastructure => core}/logs/access_log.go (100%) rename pkg/{infrastructure => core}/logs/access_log_test.go (100%) rename pkg/{infrastructure => core}/logs/alils/alils.go (98%) rename pkg/{infrastructure => core}/logs/alils/config.go (100%) rename pkg/{infrastructure => core}/logs/alils/log.pb.go (100%) rename pkg/{infrastructure => core}/logs/alils/log_config.go (100%) rename pkg/{infrastructure => core}/logs/alils/log_project.go (100%) rename pkg/{infrastructure => core}/logs/alils/log_store.go (100%) rename pkg/{infrastructure => core}/logs/alils/machine_group.go (100%) rename pkg/{infrastructure => core}/logs/alils/request.go (100%) rename pkg/{infrastructure => core}/logs/alils/signature.go (100%) rename pkg/{infrastructure => core}/logs/conn.go (100%) rename pkg/{infrastructure => core}/logs/conn_test.go (100%) rename pkg/{infrastructure => core}/logs/console.go (100%) rename pkg/{infrastructure => core}/logs/console_test.go (100%) rename pkg/{infrastructure => core}/logs/es/es.go (97%) rename pkg/{infrastructure => core}/logs/es/index.go (95%) rename pkg/{infrastructure => core}/logs/es/index_test.go (94%) rename pkg/{infrastructure => core}/logs/file.go (100%) rename pkg/{infrastructure => core}/logs/file_test.go (100%) rename pkg/{infrastructure => core}/logs/formatter.go (100%) rename pkg/{infrastructure => core}/logs/formatter_test.go (100%) rename pkg/{infrastructure => core}/logs/jianliao.go (100%) rename pkg/{infrastructure => core}/logs/jianliao_test.go (100%) rename pkg/{infrastructure => core}/logs/log.go (100%) rename pkg/{infrastructure => core}/logs/log_msg.go (100%) rename pkg/{infrastructure => core}/logs/log_msg_test.go (100%) rename pkg/{infrastructure => core}/logs/log_test.go (100%) rename pkg/{infrastructure => core}/logs/logger.go (100%) rename pkg/{infrastructure => core}/logs/logger_test.go (100%) rename pkg/{infrastructure => core}/logs/multifile.go (100%) rename pkg/{infrastructure => core}/logs/multifile_test.go (100%) rename pkg/{infrastructure => core}/logs/slack.go (100%) rename pkg/{infrastructure => core}/logs/smtp.go (100%) rename pkg/{infrastructure => core}/logs/smtp_test.go (100%) rename pkg/{infrastructure => core}/session/README.md (100%) rename pkg/{infrastructure => core}/session/couchbase/sess_couchbase.go (99%) rename pkg/{infrastructure => core}/session/ledis/ledis_session.go (98%) rename pkg/{infrastructure => core}/session/memcache/sess_memcache.go (99%) rename pkg/{infrastructure => core}/session/mysql/sess_mysql.go (99%) rename pkg/{infrastructure => core}/session/postgres/sess_postgresql.go (99%) rename pkg/{infrastructure => core}/session/redis/sess_redis.go (99%) rename pkg/{infrastructure => core}/session/redis/sess_redis_test.go (97%) rename pkg/{infrastructure => core}/session/redis_cluster/redis_cluster.go (99%) rename pkg/{infrastructure => core}/session/redis_sentinel/sess_redis_sentinel.go (99%) rename pkg/{infrastructure => core}/session/redis_sentinel/sess_redis_sentinel_test.go (97%) rename pkg/{infrastructure => core}/session/sess_cookie.go (100%) rename pkg/{infrastructure => core}/session/sess_cookie_test.go (100%) rename pkg/{infrastructure => core}/session/sess_file.go (100%) rename pkg/{infrastructure => core}/session/sess_file_test.go (100%) rename pkg/{infrastructure => core}/session/sess_mem.go (100%) rename pkg/{infrastructure => core}/session/sess_mem_test.go (100%) rename pkg/{infrastructure => core}/session/sess_test.go (100%) rename pkg/{infrastructure => core}/session/sess_utils.go (99%) rename pkg/{infrastructure => core}/session/session.go (100%) rename pkg/{infrastructure => core}/session/ssdb/sess_ssdb.go (98%) rename pkg/{infrastructure => core}/utils/caller.go (100%) rename pkg/{infrastructure => core}/utils/caller_test.go (100%) rename pkg/{infrastructure => core}/utils/debug.go (100%) rename pkg/{infrastructure => core}/utils/debug_test.go (100%) rename pkg/{infrastructure => core}/utils/file.go (100%) rename pkg/{infrastructure => core}/utils/file_test.go (100%) rename pkg/{infrastructure => core}/utils/kv.go (100%) rename pkg/{infrastructure => core}/utils/kv_test.go (100%) rename pkg/{infrastructure => core}/utils/mail.go (100%) rename pkg/{infrastructure => core}/utils/mail_test.go (100%) rename pkg/{infrastructure => core}/utils/pagination/doc.go (95%) rename pkg/{infrastructure => core}/utils/pagination/paginator.go (100%) rename pkg/{infrastructure => core}/utils/pagination/utils.go (100%) rename pkg/{infrastructure => core}/utils/rand.go (100%) rename pkg/{infrastructure => core}/utils/rand_test.go (100%) rename pkg/{infrastructure => core}/utils/safemap.go (100%) rename pkg/{infrastructure => core}/utils/safemap_test.go (100%) rename pkg/{infrastructure => core}/utils/slice.go (100%) rename pkg/{infrastructure => core}/utils/slice_test.go (100%) rename pkg/{infrastructure => core}/utils/testdata/grepe.test (100%) rename pkg/{infrastructure => core}/utils/time.go (100%) rename pkg/{infrastructure => core}/utils/utils.go (100%) rename pkg/{infrastructure => core}/utils/utils_test.go (100%) rename pkg/{infrastructure => core}/validation/README.md (100%) rename pkg/{infrastructure => core}/validation/util.go (100%) rename pkg/{infrastructure => core}/validation/util_test.go (100%) rename pkg/{infrastructure => core}/validation/validation.go (100%) rename pkg/{infrastructure => core}/validation/validation_test.go (100%) rename pkg/{infrastructure => core}/validation/validators.go (99%) diff --git a/pkg/adapter/admin.go b/pkg/adapter/admin.go index 3127416f..5ba78511 100644 --- a/pkg/adapter/admin.go +++ b/pkg/adapter/admin.go @@ -17,7 +17,7 @@ package adapter import ( "time" - _ "github.com/astaxie/beego/pkg/infrastructure/governor" + _ "github.com/astaxie/beego/pkg/core/governor" "github.com/astaxie/beego/pkg/server/web" ) diff --git a/pkg/adapter/config.go b/pkg/adapter/config.go index 1491722c..3975f5eb 100644 --- a/pkg/adapter/config.go +++ b/pkg/adapter/config.go @@ -18,7 +18,7 @@ import ( context2 "context" "github.com/astaxie/beego/pkg/adapter/session" - newCfg "github.com/astaxie/beego/pkg/infrastructure/config" + newCfg "github.com/astaxie/beego/pkg/core/config" "github.com/astaxie/beego/pkg/server/web" ) diff --git a/pkg/adapter/config/adapter.go b/pkg/adapter/config/adapter.go index f74b3ff9..8506228f 100644 --- a/pkg/adapter/config/adapter.go +++ b/pkg/adapter/config/adapter.go @@ -19,7 +19,7 @@ import ( "github.com/pkg/errors" - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) type newToOldConfigerAdapter struct { diff --git a/pkg/adapter/config/config.go b/pkg/adapter/config/config.go index c870a15a..821379f4 100644 --- a/pkg/adapter/config/config.go +++ b/pkg/adapter/config/config.go @@ -41,7 +41,7 @@ package config import ( - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) // Configer defines how to get and set value from configuration raw data. diff --git a/pkg/adapter/config/env/env.go b/pkg/adapter/config/env/env.go index 77d7b53c..bac80576 100644 --- a/pkg/adapter/config/env/env.go +++ b/pkg/adapter/config/env/env.go @@ -17,7 +17,7 @@ package env import ( - "github.com/astaxie/beego/pkg/infrastructure/config/env" + "github.com/astaxie/beego/pkg/core/config/env" ) // Get returns a value by key. diff --git a/pkg/adapter/config/fake.go b/pkg/adapter/config/fake.go index fac96b41..acbd52e5 100644 --- a/pkg/adapter/config/fake.go +++ b/pkg/adapter/config/fake.go @@ -15,7 +15,7 @@ package config import ( - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) // NewFakeConfig return a fake Configer diff --git a/pkg/adapter/config/json.go b/pkg/adapter/config/json.go index d0fe4d09..69c87568 100644 --- a/pkg/adapter/config/json.go +++ b/pkg/adapter/config/json.go @@ -15,5 +15,5 @@ package config import ( - _ "github.com/astaxie/beego/pkg/infrastructure/config/json" + _ "github.com/astaxie/beego/pkg/core/config/json" ) diff --git a/pkg/adapter/config/xml/xml.go b/pkg/adapter/config/xml/xml.go index f96cdcd6..2744e335 100644 --- a/pkg/adapter/config/xml/xml.go +++ b/pkg/adapter/config/xml/xml.go @@ -30,5 +30,5 @@ package xml import ( - _ "github.com/astaxie/beego/pkg/infrastructure/config/xml" + _ "github.com/astaxie/beego/pkg/core/config/xml" ) diff --git a/pkg/adapter/config/yaml/yaml.go b/pkg/adapter/config/yaml/yaml.go index bc2398e9..c5325ccd 100644 --- a/pkg/adapter/config/yaml/yaml.go +++ b/pkg/adapter/config/yaml/yaml.go @@ -30,5 +30,5 @@ package yaml import ( - _ "github.com/astaxie/beego/pkg/infrastructure/config/yaml" + _ "github.com/astaxie/beego/pkg/core/config/yaml" ) diff --git a/pkg/adapter/log.go b/pkg/adapter/log.go index d9ff6e0c..0d7d94c0 100644 --- a/pkg/adapter/log.go +++ b/pkg/adapter/log.go @@ -17,9 +17,9 @@ package adapter import ( "strings" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" - webLog "github.com/astaxie/beego/pkg/infrastructure/logs" + webLog "github.com/astaxie/beego/pkg/core/logs" ) // Log levels to control the logging output. diff --git a/pkg/adapter/metric/prometheus.go b/pkg/adapter/metric/prometheus.go index 6af2c26c..df5db84f 100644 --- a/pkg/adapter/metric/prometheus.go +++ b/pkg/adapter/metric/prometheus.go @@ -24,7 +24,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/astaxie/beego/pkg" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" "github.com/astaxie/beego/pkg/server/web" ) diff --git a/pkg/adapter/orm/orm.go b/pkg/adapter/orm/orm.go index f8463ea2..61990256 100644 --- a/pkg/adapter/orm/orm.go +++ b/pkg/adapter/orm/orm.go @@ -60,7 +60,7 @@ import ( "github.com/astaxie/beego/pkg/client/orm" "github.com/astaxie/beego/pkg/client/orm/hints" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // DebugQueries define the debug diff --git a/pkg/adapter/session/couchbase/sess_couchbase.go b/pkg/adapter/session/couchbase/sess_couchbase.go index bce09641..aa3bc724 100644 --- a/pkg/adapter/session/couchbase/sess_couchbase.go +++ b/pkg/adapter/session/couchbase/sess_couchbase.go @@ -37,7 +37,7 @@ import ( "net/http" "github.com/astaxie/beego/pkg/adapter/session" - beecb "github.com/astaxie/beego/pkg/infrastructure/session/couchbase" + beecb "github.com/astaxie/beego/pkg/core/session/couchbase" ) // SessionStore store each session diff --git a/pkg/adapter/session/ledis/ledis_session.go b/pkg/adapter/session/ledis/ledis_session.go index 96198837..db47b375 100644 --- a/pkg/adapter/session/ledis/ledis_session.go +++ b/pkg/adapter/session/ledis/ledis_session.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/astaxie/beego/pkg/adapter/session" - beeLedis "github.com/astaxie/beego/pkg/infrastructure/session/ledis" + beeLedis "github.com/astaxie/beego/pkg/core/session/ledis" ) // SessionStore ledis session store diff --git a/pkg/adapter/session/memcache/sess_memcache.go b/pkg/adapter/session/memcache/sess_memcache.go index 8afa79aa..9f39cf5c 100644 --- a/pkg/adapter/session/memcache/sess_memcache.go +++ b/pkg/adapter/session/memcache/sess_memcache.go @@ -38,7 +38,7 @@ import ( "github.com/astaxie/beego/pkg/adapter/session" - beemem "github.com/astaxie/beego/pkg/infrastructure/session/memcache" + beemem "github.com/astaxie/beego/pkg/core/session/memcache" ) // SessionStore memcache session store diff --git a/pkg/adapter/session/mysql/sess_mysql.go b/pkg/adapter/session/mysql/sess_mysql.go index 1850a380..550556c8 100644 --- a/pkg/adapter/session/mysql/sess_mysql.go +++ b/pkg/adapter/session/mysql/sess_mysql.go @@ -45,7 +45,7 @@ import ( "net/http" "github.com/astaxie/beego/pkg/adapter/session" - "github.com/astaxie/beego/pkg/infrastructure/session/mysql" + "github.com/astaxie/beego/pkg/core/session/mysql" // import mysql driver _ "github.com/go-sql-driver/mysql" diff --git a/pkg/adapter/session/postgres/sess_postgresql.go b/pkg/adapter/session/postgres/sess_postgresql.go index de1adbc4..76361533 100644 --- a/pkg/adapter/session/postgres/sess_postgresql.go +++ b/pkg/adapter/session/postgres/sess_postgresql.go @@ -58,7 +58,7 @@ import ( // import postgresql Driver _ "github.com/lib/pq" - "github.com/astaxie/beego/pkg/infrastructure/session/postgres" + "github.com/astaxie/beego/pkg/core/session/postgres" ) // SessionStore postgresql session store diff --git a/pkg/adapter/session/provider_adapter.go b/pkg/adapter/session/provider_adapter.go index 11177a4d..259e998c 100644 --- a/pkg/adapter/session/provider_adapter.go +++ b/pkg/adapter/session/provider_adapter.go @@ -17,7 +17,7 @@ package session import ( "context" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) type oldToNewProviderAdapter struct { diff --git a/pkg/adapter/session/redis/sess_redis.go b/pkg/adapter/session/redis/sess_redis.go index 6c521e50..d4a17b84 100644 --- a/pkg/adapter/session/redis/sess_redis.go +++ b/pkg/adapter/session/redis/sess_redis.go @@ -38,7 +38,7 @@ import ( "github.com/astaxie/beego/pkg/adapter/session" - beeRedis "github.com/astaxie/beego/pkg/infrastructure/session/redis" + beeRedis "github.com/astaxie/beego/pkg/core/session/redis" ) // MaxPoolSize redis max pool size diff --git a/pkg/adapter/session/redis_cluster/redis_cluster.go b/pkg/adapter/session/redis_cluster/redis_cluster.go index 03a805e4..325efa25 100644 --- a/pkg/adapter/session/redis_cluster/redis_cluster.go +++ b/pkg/adapter/session/redis_cluster/redis_cluster.go @@ -37,7 +37,7 @@ import ( "net/http" "github.com/astaxie/beego/pkg/adapter/session" - cluster "github.com/astaxie/beego/pkg/infrastructure/session/redis_cluster" + cluster "github.com/astaxie/beego/pkg/core/session/redis_cluster" ) // MaxPoolSize redis_cluster max pool size diff --git a/pkg/adapter/session/redis_sentinel/sess_redis_sentinel.go b/pkg/adapter/session/redis_sentinel/sess_redis_sentinel.go index f5eb8a4f..0306400d 100644 --- a/pkg/adapter/session/redis_sentinel/sess_redis_sentinel.go +++ b/pkg/adapter/session/redis_sentinel/sess_redis_sentinel.go @@ -38,7 +38,7 @@ import ( "github.com/astaxie/beego/pkg/adapter/session" - sentinel "github.com/astaxie/beego/pkg/infrastructure/session/redis_sentinel" + sentinel "github.com/astaxie/beego/pkg/core/session/redis_sentinel" ) // DefaultPoolSize redis_sentinel default pool size diff --git a/pkg/adapter/session/sess_cookie.go b/pkg/adapter/session/sess_cookie.go index 32216040..f28b0620 100644 --- a/pkg/adapter/session/sess_cookie.go +++ b/pkg/adapter/session/sess_cookie.go @@ -18,7 +18,7 @@ import ( "context" "net/http" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // CookieSessionStore Cookie SessionStore diff --git a/pkg/adapter/session/sess_file.go b/pkg/adapter/session/sess_file.go index b9648998..5aa5bc1e 100644 --- a/pkg/adapter/session/sess_file.go +++ b/pkg/adapter/session/sess_file.go @@ -18,7 +18,7 @@ import ( "context" "net/http" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // FileSessionStore File session store diff --git a/pkg/adapter/session/sess_mem.go b/pkg/adapter/session/sess_mem.go index 818c8329..ac37d5d3 100644 --- a/pkg/adapter/session/sess_mem.go +++ b/pkg/adapter/session/sess_mem.go @@ -18,7 +18,7 @@ import ( "context" "net/http" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // MemSessionStore memory session store. diff --git a/pkg/adapter/session/sess_utils.go b/pkg/adapter/session/sess_utils.go index 3d107198..b5cbc5a1 100644 --- a/pkg/adapter/session/sess_utils.go +++ b/pkg/adapter/session/sess_utils.go @@ -15,7 +15,7 @@ package session import ( - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // EncodeGob encode the obj to gob diff --git a/pkg/adapter/session/session.go b/pkg/adapter/session/session.go index eea2f90e..7612854d 100644 --- a/pkg/adapter/session/session.go +++ b/pkg/adapter/session/session.go @@ -32,7 +32,7 @@ import ( "net/http" "os" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // Store contains all data for one session process with specific id. diff --git a/pkg/adapter/session/ssdb/sess_ssdb.go b/pkg/adapter/session/ssdb/sess_ssdb.go index aee3a364..03c11d61 100644 --- a/pkg/adapter/session/ssdb/sess_ssdb.go +++ b/pkg/adapter/session/ssdb/sess_ssdb.go @@ -6,7 +6,7 @@ import ( "github.com/astaxie/beego/pkg/adapter/session" - beeSsdb "github.com/astaxie/beego/pkg/infrastructure/session/ssdb" + beeSsdb "github.com/astaxie/beego/pkg/core/session/ssdb" ) // Provider holds ssdb client and configs diff --git a/pkg/adapter/session/store_adapter.go b/pkg/adapter/session/store_adapter.go index c1a03c38..b8a23937 100644 --- a/pkg/adapter/session/store_adapter.go +++ b/pkg/adapter/session/store_adapter.go @@ -18,7 +18,7 @@ import ( "context" "net/http" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) type NewToOldStoreAdapter struct { diff --git a/pkg/adapter/toolbox/healthcheck.go b/pkg/adapter/toolbox/healthcheck.go index 56be8089..42b9e7d0 100644 --- a/pkg/adapter/toolbox/healthcheck.go +++ b/pkg/adapter/toolbox/healthcheck.go @@ -31,7 +31,7 @@ package toolbox import ( - "github.com/astaxie/beego/pkg/infrastructure/governor" + "github.com/astaxie/beego/pkg/core/governor" ) // AdminCheckList holds health checker map diff --git a/pkg/adapter/toolbox/profile.go b/pkg/adapter/toolbox/profile.go index 16cf80b1..97da05ac 100644 --- a/pkg/adapter/toolbox/profile.go +++ b/pkg/adapter/toolbox/profile.go @@ -19,7 +19,7 @@ import ( "os" "time" - "github.com/astaxie/beego/pkg/infrastructure/governor" + "github.com/astaxie/beego/pkg/core/governor" ) var startTime = time.Now() diff --git a/pkg/adapter/utils/caller.go b/pkg/adapter/utils/caller.go index d4fcc456..124c68df 100644 --- a/pkg/adapter/utils/caller.go +++ b/pkg/adapter/utils/caller.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // GetFuncName get function name diff --git a/pkg/adapter/utils/debug.go b/pkg/adapter/utils/debug.go index d39f3d3e..6bb381a1 100644 --- a/pkg/adapter/utils/debug.go +++ b/pkg/adapter/utils/debug.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // Display print the data in console diff --git a/pkg/adapter/utils/file.go b/pkg/adapter/utils/file.go index 8979389e..4ed2a8e3 100644 --- a/pkg/adapter/utils/file.go +++ b/pkg/adapter/utils/file.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // SelfPath gets compiled executable file absolute path diff --git a/pkg/adapter/utils/mail.go b/pkg/adapter/utils/mail.go index 35a58756..74ebe25c 100644 --- a/pkg/adapter/utils/mail.go +++ b/pkg/adapter/utils/mail.go @@ -17,7 +17,7 @@ package utils import ( "io" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // Email is the type used for email messages diff --git a/pkg/adapter/utils/pagination/paginator.go b/pkg/adapter/utils/pagination/paginator.go index 4bd4a1b0..1fefb9e0 100644 --- a/pkg/adapter/utils/pagination/paginator.go +++ b/pkg/adapter/utils/pagination/paginator.go @@ -17,7 +17,7 @@ package pagination import ( "net/http" - "github.com/astaxie/beego/pkg/infrastructure/utils/pagination" + "github.com/astaxie/beego/pkg/core/utils/pagination" ) // Paginator within the state of a http request. diff --git a/pkg/adapter/utils/rand.go b/pkg/adapter/utils/rand.go index ae415cf3..c31b633e 100644 --- a/pkg/adapter/utils/rand.go +++ b/pkg/adapter/utils/rand.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // RandomCreateBytes generate random []byte by specify chars. diff --git a/pkg/adapter/utils/safemap.go b/pkg/adapter/utils/safemap.go index 13e7bb46..6771aca4 100644 --- a/pkg/adapter/utils/safemap.go +++ b/pkg/adapter/utils/safemap.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // BeeMap is a map with lock diff --git a/pkg/adapter/utils/slice.go b/pkg/adapter/utils/slice.go index 24d19ad2..a5b852b9 100644 --- a/pkg/adapter/utils/slice.go +++ b/pkg/adapter/utils/slice.go @@ -15,7 +15,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) type reducetype func(interface{}) interface{} diff --git a/pkg/adapter/utils/utils.go b/pkg/adapter/utils/utils.go index 1f3bcd31..21ed49dc 100644 --- a/pkg/adapter/utils/utils.go +++ b/pkg/adapter/utils/utils.go @@ -1,7 +1,7 @@ package utils import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // GetGOPATHs returns all paths in GOPATH variable. diff --git a/pkg/adapter/validation/util.go b/pkg/adapter/validation/util.go index 729712e0..fb5370bf 100644 --- a/pkg/adapter/validation/util.go +++ b/pkg/adapter/validation/util.go @@ -17,7 +17,7 @@ package validation import ( "reflect" - "github.com/astaxie/beego/pkg/infrastructure/validation" + "github.com/astaxie/beego/pkg/core/validation" ) const ( diff --git a/pkg/adapter/validation/validation.go b/pkg/adapter/validation/validation.go index 1cdb8dda..e95fd408 100644 --- a/pkg/adapter/validation/validation.go +++ b/pkg/adapter/validation/validation.go @@ -50,7 +50,7 @@ import ( "fmt" "regexp" - "github.com/astaxie/beego/pkg/infrastructure/validation" + "github.com/astaxie/beego/pkg/core/validation" ) // ValidFormer valid interface diff --git a/pkg/adapter/validation/validators.go b/pkg/adapter/validation/validators.go index 1a063749..152e8aef 100644 --- a/pkg/adapter/validation/validators.go +++ b/pkg/adapter/validation/validators.go @@ -17,7 +17,7 @@ package validation import ( "sync" - "github.com/astaxie/beego/pkg/infrastructure/validation" + "github.com/astaxie/beego/pkg/core/validation" ) // CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty diff --git a/pkg/client/orm/do_nothing_orm.go b/pkg/client/orm/do_nothing_orm.go index e27e7f3a..42775b54 100644 --- a/pkg/client/orm/do_nothing_orm.go +++ b/pkg/client/orm/do_nothing_orm.go @@ -18,7 +18,7 @@ import ( "context" "database/sql" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // DoNothingOrm won't do anything, usually you use this to custom your mock Ormer implementation diff --git a/pkg/client/orm/filter/bean/default_value_filter.go b/pkg/client/orm/filter/bean/default_value_filter.go index a367a6e2..7da9408d 100644 --- a/pkg/client/orm/filter/bean/default_value_filter.go +++ b/pkg/client/orm/filter/bean/default_value_filter.go @@ -19,10 +19,10 @@ import ( "reflect" "strings" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" "github.com/astaxie/beego/pkg/client/orm" - "github.com/astaxie/beego/pkg/infrastructure/bean" + "github.com/astaxie/beego/pkg/core/bean" ) // DefaultValueFilterChainBuilder only works for InsertXXX method, diff --git a/pkg/client/orm/filter_orm_decorator.go b/pkg/client/orm/filter_orm_decorator.go index d0c5c537..729c1698 100644 --- a/pkg/client/orm/filter_orm_decorator.go +++ b/pkg/client/orm/filter_orm_decorator.go @@ -20,7 +20,7 @@ import ( "reflect" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) const ( diff --git a/pkg/client/orm/filter_orm_decorator_test.go b/pkg/client/orm/filter_orm_decorator_test.go index 7acb7d46..40a3fa2e 100644 --- a/pkg/client/orm/filter_orm_decorator_test.go +++ b/pkg/client/orm/filter_orm_decorator_test.go @@ -21,7 +21,7 @@ import ( "sync" "testing" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/stretchr/testify/assert" ) diff --git a/pkg/client/orm/hints/db_hints.go b/pkg/client/orm/hints/db_hints.go index 7340bd07..c6180529 100644 --- a/pkg/client/orm/hints/db_hints.go +++ b/pkg/client/orm/hints/db_hints.go @@ -15,7 +15,7 @@ package hints import ( - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) const ( diff --git a/pkg/client/orm/migration/ddl.go b/pkg/client/orm/migration/ddl.go index e8b13212..e351b4cc 100644 --- a/pkg/client/orm/migration/ddl.go +++ b/pkg/client/orm/migration/ddl.go @@ -17,7 +17,7 @@ package migration import ( "fmt" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // Index struct defines the structure of Index Columns diff --git a/pkg/client/orm/migration/migration.go b/pkg/client/orm/migration/migration.go index 3f740594..4a56be58 100644 --- a/pkg/client/orm/migration/migration.go +++ b/pkg/client/orm/migration/migration.go @@ -34,7 +34,7 @@ import ( "time" "github.com/astaxie/beego/pkg/client/orm" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // const the data format for the bee generate migration datatype diff --git a/pkg/client/orm/orm.go b/pkg/client/orm/orm.go index bfb710d1..7d1aace0 100644 --- a/pkg/client/orm/orm.go +++ b/pkg/client/orm/orm.go @@ -63,9 +63,9 @@ import ( "time" "github.com/astaxie/beego/pkg/client/orm/hints" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // DebugQueries define the debug diff --git a/pkg/client/orm/types.go b/pkg/client/orm/types.go index b0c793b7..e43bfd2c 100644 --- a/pkg/client/orm/types.go +++ b/pkg/client/orm/types.go @@ -20,7 +20,7 @@ import ( "reflect" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // TableNaming is usually used by model diff --git a/pkg/infrastructure/bean/context.go b/pkg/core/bean/context.go similarity index 100% rename from pkg/infrastructure/bean/context.go rename to pkg/core/bean/context.go diff --git a/pkg/infrastructure/bean/doc.go b/pkg/core/bean/doc.go similarity index 100% rename from pkg/infrastructure/bean/doc.go rename to pkg/core/bean/doc.go diff --git a/pkg/infrastructure/bean/factory.go b/pkg/core/bean/factory.go similarity index 100% rename from pkg/infrastructure/bean/factory.go rename to pkg/core/bean/factory.go diff --git a/pkg/infrastructure/bean/metadata.go b/pkg/core/bean/metadata.go similarity index 100% rename from pkg/infrastructure/bean/metadata.go rename to pkg/core/bean/metadata.go diff --git a/pkg/infrastructure/bean/tag_auto_wire_bean_factory.go b/pkg/core/bean/tag_auto_wire_bean_factory.go similarity index 99% rename from pkg/infrastructure/bean/tag_auto_wire_bean_factory.go rename to pkg/core/bean/tag_auto_wire_bean_factory.go index f80388f9..595b3a02 100644 --- a/pkg/infrastructure/bean/tag_auto_wire_bean_factory.go +++ b/pkg/core/bean/tag_auto_wire_bean_factory.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) const DefaultValueTagKey = "default" diff --git a/pkg/infrastructure/bean/tag_auto_wire_bean_factory_test.go b/pkg/core/bean/tag_auto_wire_bean_factory_test.go similarity index 100% rename from pkg/infrastructure/bean/tag_auto_wire_bean_factory_test.go rename to pkg/core/bean/tag_auto_wire_bean_factory_test.go diff --git a/pkg/infrastructure/bean/time_type_adapter.go b/pkg/core/bean/time_type_adapter.go similarity index 100% rename from pkg/infrastructure/bean/time_type_adapter.go rename to pkg/core/bean/time_type_adapter.go diff --git a/pkg/infrastructure/bean/time_type_adapter_test.go b/pkg/core/bean/time_type_adapter_test.go similarity index 100% rename from pkg/infrastructure/bean/time_type_adapter_test.go rename to pkg/core/bean/time_type_adapter_test.go diff --git a/pkg/infrastructure/bean/type_adapter.go b/pkg/core/bean/type_adapter.go similarity index 100% rename from pkg/infrastructure/bean/type_adapter.go rename to pkg/core/bean/type_adapter.go diff --git a/pkg/infrastructure/config/base_config_test.go b/pkg/core/config/base_config_test.go similarity index 100% rename from pkg/infrastructure/config/base_config_test.go rename to pkg/core/config/base_config_test.go diff --git a/pkg/infrastructure/config/config.go b/pkg/core/config/config.go similarity index 100% rename from pkg/infrastructure/config/config.go rename to pkg/core/config/config.go diff --git a/pkg/infrastructure/config/config_test.go b/pkg/core/config/config_test.go similarity index 100% rename from pkg/infrastructure/config/config_test.go rename to pkg/core/config/config_test.go diff --git a/pkg/infrastructure/config/env/env.go b/pkg/core/config/env/env.go similarity index 97% rename from pkg/infrastructure/config/env/env.go rename to pkg/core/config/env/env.go index 83155b34..0cf1582b 100644 --- a/pkg/infrastructure/config/env/env.go +++ b/pkg/core/config/env/env.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) var env *utils.BeeMap diff --git a/pkg/infrastructure/config/env/env_test.go b/pkg/core/config/env/env_test.go similarity index 100% rename from pkg/infrastructure/config/env/env_test.go rename to pkg/core/config/env/env_test.go diff --git a/pkg/infrastructure/config/etcd/config.go b/pkg/core/config/etcd/config.go similarity index 98% rename from pkg/infrastructure/config/etcd/config.go rename to pkg/core/config/etcd/config.go index 94057d73..278cbaa9 100644 --- a/pkg/infrastructure/config/etcd/config.go +++ b/pkg/core/config/etcd/config.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "google.golang.org/grpc" - "github.com/astaxie/beego/pkg/infrastructure/config" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/config" + "github.com/astaxie/beego/pkg/core/logs" ) const etcdOpts = "etcdOpts" diff --git a/pkg/infrastructure/config/etcd/config_test.go b/pkg/core/config/etcd/config_test.go similarity index 100% rename from pkg/infrastructure/config/etcd/config_test.go rename to pkg/core/config/etcd/config_test.go diff --git a/pkg/infrastructure/config/fake.go b/pkg/core/config/fake.go similarity index 100% rename from pkg/infrastructure/config/fake.go rename to pkg/core/config/fake.go diff --git a/pkg/infrastructure/config/ini.go b/pkg/core/config/ini.go similarity index 100% rename from pkg/infrastructure/config/ini.go rename to pkg/core/config/ini.go diff --git a/pkg/infrastructure/config/ini_test.go b/pkg/core/config/ini_test.go similarity index 100% rename from pkg/infrastructure/config/ini_test.go rename to pkg/core/config/ini_test.go diff --git a/pkg/infrastructure/config/json/json.go b/pkg/core/config/json/json.go similarity index 98% rename from pkg/infrastructure/config/json/json.go rename to pkg/core/config/json/json.go index c65eff4d..66546d89 100644 --- a/pkg/infrastructure/config/json/json.go +++ b/pkg/core/config/json/json.go @@ -27,8 +27,8 @@ import ( "github.com/mitchellh/mapstructure" - "github.com/astaxie/beego/pkg/infrastructure/config" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/config" + "github.com/astaxie/beego/pkg/core/logs" ) // JSONConfig is a json config parser and implements Config interface. diff --git a/pkg/infrastructure/config/json/json_test.go b/pkg/core/config/json/json_test.go similarity index 99% rename from pkg/infrastructure/config/json/json_test.go rename to pkg/core/config/json/json_test.go index 5275ee57..d4601e39 100644 --- a/pkg/infrastructure/config/json/json_test.go +++ b/pkg/core/config/json/json_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) func TestJsonStartsWithArray(t *testing.T) { diff --git a/pkg/infrastructure/config/xml/xml.go b/pkg/core/config/xml/xml.go similarity index 98% rename from pkg/infrastructure/config/xml/xml.go rename to pkg/core/config/xml/xml.go index e5096b9b..47d4b8c8 100644 --- a/pkg/infrastructure/config/xml/xml.go +++ b/pkg/core/config/xml/xml.go @@ -42,8 +42,8 @@ import ( "github.com/mitchellh/mapstructure" - "github.com/astaxie/beego/pkg/infrastructure/config" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/config" + "github.com/astaxie/beego/pkg/core/logs" "github.com/beego/x2j" ) diff --git a/pkg/infrastructure/config/xml/xml_test.go b/pkg/core/config/xml/xml_test.go similarity index 98% rename from pkg/infrastructure/config/xml/xml_test.go rename to pkg/core/config/xml/xml_test.go index 0a3eb313..b110f813 100644 --- a/pkg/infrastructure/config/xml/xml_test.go +++ b/pkg/core/config/xml/xml_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) func TestXML(t *testing.T) { diff --git a/pkg/infrastructure/config/yaml/yaml.go b/pkg/core/config/yaml/yaml.go similarity index 98% rename from pkg/infrastructure/config/yaml/yaml.go rename to pkg/core/config/yaml/yaml.go index 61ea45b9..5a4bfad0 100644 --- a/pkg/infrastructure/config/yaml/yaml.go +++ b/pkg/core/config/yaml/yaml.go @@ -44,8 +44,8 @@ import ( "github.com/beego/goyaml2" "gopkg.in/yaml.v2" - "github.com/astaxie/beego/pkg/infrastructure/config" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/config" + "github.com/astaxie/beego/pkg/core/logs" ) // Config is a yaml config parser and implements Config interface. diff --git a/pkg/infrastructure/config/yaml/yaml_test.go b/pkg/core/config/yaml/yaml_test.go similarity index 98% rename from pkg/infrastructure/config/yaml/yaml_test.go rename to pkg/core/config/yaml/yaml_test.go index 1fd4e894..130ce6a2 100644 --- a/pkg/infrastructure/config/yaml/yaml_test.go +++ b/pkg/core/config/yaml/yaml_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/pkg/infrastructure/config" + "github.com/astaxie/beego/pkg/core/config" ) func TestYaml(t *testing.T) { diff --git a/pkg/infrastructure/governor/command.go b/pkg/core/governor/command.go similarity index 100% rename from pkg/infrastructure/governor/command.go rename to pkg/core/governor/command.go diff --git a/pkg/infrastructure/governor/healthcheck.go b/pkg/core/governor/healthcheck.go similarity index 100% rename from pkg/infrastructure/governor/healthcheck.go rename to pkg/core/governor/healthcheck.go diff --git a/pkg/infrastructure/governor/profile.go b/pkg/core/governor/profile.go similarity index 98% rename from pkg/infrastructure/governor/profile.go rename to pkg/core/governor/profile.go index c40cf6ba..de6e1995 100644 --- a/pkg/infrastructure/governor/profile.go +++ b/pkg/core/governor/profile.go @@ -26,7 +26,7 @@ import ( "strconv" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) var startTime = time.Now() diff --git a/pkg/infrastructure/governor/profile_test.go b/pkg/core/governor/profile_test.go similarity index 100% rename from pkg/infrastructure/governor/profile_test.go rename to pkg/core/governor/profile_test.go diff --git a/pkg/infrastructure/logs/README.md b/pkg/core/logs/README.md similarity index 100% rename from pkg/infrastructure/logs/README.md rename to pkg/core/logs/README.md diff --git a/pkg/infrastructure/logs/access_log.go b/pkg/core/logs/access_log.go similarity index 100% rename from pkg/infrastructure/logs/access_log.go rename to pkg/core/logs/access_log.go diff --git a/pkg/infrastructure/logs/access_log_test.go b/pkg/core/logs/access_log_test.go similarity index 100% rename from pkg/infrastructure/logs/access_log_test.go rename to pkg/core/logs/access_log_test.go diff --git a/pkg/infrastructure/logs/alils/alils.go b/pkg/core/logs/alils/alils.go similarity index 98% rename from pkg/infrastructure/logs/alils/alils.go rename to pkg/core/logs/alils/alils.go index 0689aae0..812b1b3b 100644 --- a/pkg/infrastructure/logs/alils/alils.go +++ b/pkg/core/logs/alils/alils.go @@ -9,7 +9,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) const ( diff --git a/pkg/infrastructure/logs/alils/config.go b/pkg/core/logs/alils/config.go similarity index 100% rename from pkg/infrastructure/logs/alils/config.go rename to pkg/core/logs/alils/config.go diff --git a/pkg/infrastructure/logs/alils/log.pb.go b/pkg/core/logs/alils/log.pb.go similarity index 100% rename from pkg/infrastructure/logs/alils/log.pb.go rename to pkg/core/logs/alils/log.pb.go diff --git a/pkg/infrastructure/logs/alils/log_config.go b/pkg/core/logs/alils/log_config.go similarity index 100% rename from pkg/infrastructure/logs/alils/log_config.go rename to pkg/core/logs/alils/log_config.go diff --git a/pkg/infrastructure/logs/alils/log_project.go b/pkg/core/logs/alils/log_project.go similarity index 100% rename from pkg/infrastructure/logs/alils/log_project.go rename to pkg/core/logs/alils/log_project.go diff --git a/pkg/infrastructure/logs/alils/log_store.go b/pkg/core/logs/alils/log_store.go similarity index 100% rename from pkg/infrastructure/logs/alils/log_store.go rename to pkg/core/logs/alils/log_store.go diff --git a/pkg/infrastructure/logs/alils/machine_group.go b/pkg/core/logs/alils/machine_group.go similarity index 100% rename from pkg/infrastructure/logs/alils/machine_group.go rename to pkg/core/logs/alils/machine_group.go diff --git a/pkg/infrastructure/logs/alils/request.go b/pkg/core/logs/alils/request.go similarity index 100% rename from pkg/infrastructure/logs/alils/request.go rename to pkg/core/logs/alils/request.go diff --git a/pkg/infrastructure/logs/alils/signature.go b/pkg/core/logs/alils/signature.go similarity index 100% rename from pkg/infrastructure/logs/alils/signature.go rename to pkg/core/logs/alils/signature.go diff --git a/pkg/infrastructure/logs/conn.go b/pkg/core/logs/conn.go similarity index 100% rename from pkg/infrastructure/logs/conn.go rename to pkg/core/logs/conn.go diff --git a/pkg/infrastructure/logs/conn_test.go b/pkg/core/logs/conn_test.go similarity index 100% rename from pkg/infrastructure/logs/conn_test.go rename to pkg/core/logs/conn_test.go diff --git a/pkg/infrastructure/logs/console.go b/pkg/core/logs/console.go similarity index 100% rename from pkg/infrastructure/logs/console.go rename to pkg/core/logs/console.go diff --git a/pkg/infrastructure/logs/console_test.go b/pkg/core/logs/console_test.go similarity index 100% rename from pkg/infrastructure/logs/console_test.go rename to pkg/core/logs/console_test.go diff --git a/pkg/infrastructure/logs/es/es.go b/pkg/core/logs/es/es.go similarity index 97% rename from pkg/infrastructure/logs/es/es.go rename to pkg/core/logs/es/es.go index c4090eab..a150c7b3 100644 --- a/pkg/infrastructure/logs/es/es.go +++ b/pkg/core/logs/es/es.go @@ -12,7 +12,7 @@ import ( "github.com/elastic/go-elasticsearch/v6" "github.com/elastic/go-elasticsearch/v6/esapi" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // NewES returns a LoggerInterface diff --git a/pkg/infrastructure/logs/es/index.go b/pkg/core/logs/es/index.go similarity index 95% rename from pkg/infrastructure/logs/es/index.go rename to pkg/core/logs/es/index.go index 9796987e..5b2d3d59 100644 --- a/pkg/infrastructure/logs/es/index.go +++ b/pkg/core/logs/es/index.go @@ -17,7 +17,7 @@ package es import ( "fmt" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // IndexNaming generate the index name diff --git a/pkg/infrastructure/logs/es/index_test.go b/pkg/core/logs/es/index_test.go similarity index 94% rename from pkg/infrastructure/logs/es/index_test.go rename to pkg/core/logs/es/index_test.go index 4cdf9b02..25cfa5ed 100644 --- a/pkg/infrastructure/logs/es/index_test.go +++ b/pkg/core/logs/es/index_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) func TestDefaultIndexNaming_IndexName(t *testing.T) { diff --git a/pkg/infrastructure/logs/file.go b/pkg/core/logs/file.go similarity index 100% rename from pkg/infrastructure/logs/file.go rename to pkg/core/logs/file.go diff --git a/pkg/infrastructure/logs/file_test.go b/pkg/core/logs/file_test.go similarity index 100% rename from pkg/infrastructure/logs/file_test.go rename to pkg/core/logs/file_test.go diff --git a/pkg/infrastructure/logs/formatter.go b/pkg/core/logs/formatter.go similarity index 100% rename from pkg/infrastructure/logs/formatter.go rename to pkg/core/logs/formatter.go diff --git a/pkg/infrastructure/logs/formatter_test.go b/pkg/core/logs/formatter_test.go similarity index 100% rename from pkg/infrastructure/logs/formatter_test.go rename to pkg/core/logs/formatter_test.go diff --git a/pkg/infrastructure/logs/jianliao.go b/pkg/core/logs/jianliao.go similarity index 100% rename from pkg/infrastructure/logs/jianliao.go rename to pkg/core/logs/jianliao.go diff --git a/pkg/infrastructure/logs/jianliao_test.go b/pkg/core/logs/jianliao_test.go similarity index 100% rename from pkg/infrastructure/logs/jianliao_test.go rename to pkg/core/logs/jianliao_test.go diff --git a/pkg/infrastructure/logs/log.go b/pkg/core/logs/log.go similarity index 100% rename from pkg/infrastructure/logs/log.go rename to pkg/core/logs/log.go diff --git a/pkg/infrastructure/logs/log_msg.go b/pkg/core/logs/log_msg.go similarity index 100% rename from pkg/infrastructure/logs/log_msg.go rename to pkg/core/logs/log_msg.go diff --git a/pkg/infrastructure/logs/log_msg_test.go b/pkg/core/logs/log_msg_test.go similarity index 100% rename from pkg/infrastructure/logs/log_msg_test.go rename to pkg/core/logs/log_msg_test.go diff --git a/pkg/infrastructure/logs/log_test.go b/pkg/core/logs/log_test.go similarity index 100% rename from pkg/infrastructure/logs/log_test.go rename to pkg/core/logs/log_test.go diff --git a/pkg/infrastructure/logs/logger.go b/pkg/core/logs/logger.go similarity index 100% rename from pkg/infrastructure/logs/logger.go rename to pkg/core/logs/logger.go diff --git a/pkg/infrastructure/logs/logger_test.go b/pkg/core/logs/logger_test.go similarity index 100% rename from pkg/infrastructure/logs/logger_test.go rename to pkg/core/logs/logger_test.go diff --git a/pkg/infrastructure/logs/multifile.go b/pkg/core/logs/multifile.go similarity index 100% rename from pkg/infrastructure/logs/multifile.go rename to pkg/core/logs/multifile.go diff --git a/pkg/infrastructure/logs/multifile_test.go b/pkg/core/logs/multifile_test.go similarity index 100% rename from pkg/infrastructure/logs/multifile_test.go rename to pkg/core/logs/multifile_test.go diff --git a/pkg/infrastructure/logs/slack.go b/pkg/core/logs/slack.go similarity index 100% rename from pkg/infrastructure/logs/slack.go rename to pkg/core/logs/slack.go diff --git a/pkg/infrastructure/logs/smtp.go b/pkg/core/logs/smtp.go similarity index 100% rename from pkg/infrastructure/logs/smtp.go rename to pkg/core/logs/smtp.go diff --git a/pkg/infrastructure/logs/smtp_test.go b/pkg/core/logs/smtp_test.go similarity index 100% rename from pkg/infrastructure/logs/smtp_test.go rename to pkg/core/logs/smtp_test.go diff --git a/pkg/infrastructure/session/README.md b/pkg/core/session/README.md similarity index 100% rename from pkg/infrastructure/session/README.md rename to pkg/core/session/README.md diff --git a/pkg/infrastructure/session/couchbase/sess_couchbase.go b/pkg/core/session/couchbase/sess_couchbase.go similarity index 99% rename from pkg/infrastructure/session/couchbase/sess_couchbase.go rename to pkg/core/session/couchbase/sess_couchbase.go index ddb4be58..97463d70 100644 --- a/pkg/infrastructure/session/couchbase/sess_couchbase.go +++ b/pkg/core/session/couchbase/sess_couchbase.go @@ -40,7 +40,7 @@ import ( couchbase "github.com/couchbase/go-couchbase" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) var couchbpder = &Provider{} diff --git a/pkg/infrastructure/session/ledis/ledis_session.go b/pkg/core/session/ledis/ledis_session.go similarity index 98% rename from pkg/infrastructure/session/ledis/ledis_session.go rename to pkg/core/session/ledis/ledis_session.go index 74bf9b65..5791059d 100644 --- a/pkg/infrastructure/session/ledis/ledis_session.go +++ b/pkg/core/session/ledis/ledis_session.go @@ -11,7 +11,7 @@ import ( "github.com/ledisdb/ledisdb/config" "github.com/ledisdb/ledisdb/ledis" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) var ( diff --git a/pkg/infrastructure/session/memcache/sess_memcache.go b/pkg/core/session/memcache/sess_memcache.go similarity index 99% rename from pkg/infrastructure/session/memcache/sess_memcache.go rename to pkg/core/session/memcache/sess_memcache.go index 57df2844..d2b5ed49 100644 --- a/pkg/infrastructure/session/memcache/sess_memcache.go +++ b/pkg/core/session/memcache/sess_memcache.go @@ -38,7 +38,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" "github.com/bradfitz/gomemcache/memcache" ) diff --git a/pkg/infrastructure/session/mysql/sess_mysql.go b/pkg/core/session/mysql/sess_mysql.go similarity index 99% rename from pkg/infrastructure/session/mysql/sess_mysql.go rename to pkg/core/session/mysql/sess_mysql.go index fe1d69dc..964b0b2e 100644 --- a/pkg/infrastructure/session/mysql/sess_mysql.go +++ b/pkg/core/session/mysql/sess_mysql.go @@ -47,7 +47,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" // import mysql driver _ "github.com/go-sql-driver/mysql" ) diff --git a/pkg/infrastructure/session/postgres/sess_postgresql.go b/pkg/core/session/postgres/sess_postgresql.go similarity index 99% rename from pkg/infrastructure/session/postgres/sess_postgresql.go rename to pkg/core/session/postgres/sess_postgresql.go index 2fadbed0..29223d4e 100644 --- a/pkg/infrastructure/session/postgres/sess_postgresql.go +++ b/pkg/core/session/postgres/sess_postgresql.go @@ -57,7 +57,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" // import postgresql Driver _ "github.com/lib/pq" ) diff --git a/pkg/infrastructure/session/redis/sess_redis.go b/pkg/core/session/redis/sess_redis.go similarity index 99% rename from pkg/infrastructure/session/redis/sess_redis.go rename to pkg/core/session/redis/sess_redis.go index c7bfbcbf..bbd94019 100644 --- a/pkg/infrastructure/session/redis/sess_redis.go +++ b/pkg/core/session/redis/sess_redis.go @@ -40,7 +40,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" "github.com/go-redis/redis/v7" ) diff --git a/pkg/infrastructure/session/redis/sess_redis_test.go b/pkg/core/session/redis/sess_redis_test.go similarity index 97% rename from pkg/infrastructure/session/redis/sess_redis_test.go rename to pkg/core/session/redis/sess_redis_test.go index df77204d..f45d3051 100644 --- a/pkg/infrastructure/session/redis/sess_redis_test.go +++ b/pkg/core/session/redis/sess_redis_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) func TestRedis(t *testing.T) { diff --git a/pkg/infrastructure/session/redis_cluster/redis_cluster.go b/pkg/core/session/redis_cluster/redis_cluster.go similarity index 99% rename from pkg/infrastructure/session/redis_cluster/redis_cluster.go rename to pkg/core/session/redis_cluster/redis_cluster.go index 95907a5f..42841cb4 100644 --- a/pkg/infrastructure/session/redis_cluster/redis_cluster.go +++ b/pkg/core/session/redis_cluster/redis_cluster.go @@ -40,7 +40,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" rediss "github.com/go-redis/redis/v7" ) diff --git a/pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel.go b/pkg/core/session/redis_sentinel/sess_redis_sentinel.go similarity index 99% rename from pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel.go rename to pkg/core/session/redis_sentinel/sess_redis_sentinel.go index 1b9c841b..b07acdc0 100644 --- a/pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel.go +++ b/pkg/core/session/redis_sentinel/sess_redis_sentinel.go @@ -40,7 +40,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" "github.com/go-redis/redis/v7" ) diff --git a/pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel_test.go b/pkg/core/session/redis_sentinel/sess_redis_sentinel_test.go similarity index 97% rename from pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel_test.go rename to pkg/core/session/redis_sentinel/sess_redis_sentinel_test.go index fcec9806..2cc21a5a 100644 --- a/pkg/infrastructure/session/redis_sentinel/sess_redis_sentinel_test.go +++ b/pkg/core/session/redis_sentinel/sess_redis_sentinel_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) func TestRedisSentinel(t *testing.T) { diff --git a/pkg/infrastructure/session/sess_cookie.go b/pkg/core/session/sess_cookie.go similarity index 100% rename from pkg/infrastructure/session/sess_cookie.go rename to pkg/core/session/sess_cookie.go diff --git a/pkg/infrastructure/session/sess_cookie_test.go b/pkg/core/session/sess_cookie_test.go similarity index 100% rename from pkg/infrastructure/session/sess_cookie_test.go rename to pkg/core/session/sess_cookie_test.go diff --git a/pkg/infrastructure/session/sess_file.go b/pkg/core/session/sess_file.go similarity index 100% rename from pkg/infrastructure/session/sess_file.go rename to pkg/core/session/sess_file.go diff --git a/pkg/infrastructure/session/sess_file_test.go b/pkg/core/session/sess_file_test.go similarity index 100% rename from pkg/infrastructure/session/sess_file_test.go rename to pkg/core/session/sess_file_test.go diff --git a/pkg/infrastructure/session/sess_mem.go b/pkg/core/session/sess_mem.go similarity index 100% rename from pkg/infrastructure/session/sess_mem.go rename to pkg/core/session/sess_mem.go diff --git a/pkg/infrastructure/session/sess_mem_test.go b/pkg/core/session/sess_mem_test.go similarity index 100% rename from pkg/infrastructure/session/sess_mem_test.go rename to pkg/core/session/sess_mem_test.go diff --git a/pkg/infrastructure/session/sess_test.go b/pkg/core/session/sess_test.go similarity index 100% rename from pkg/infrastructure/session/sess_test.go rename to pkg/core/session/sess_test.go diff --git a/pkg/infrastructure/session/sess_utils.go b/pkg/core/session/sess_utils.go similarity index 99% rename from pkg/infrastructure/session/sess_utils.go rename to pkg/core/session/sess_utils.go index 906e1c4b..5f97d1a4 100644 --- a/pkg/infrastructure/session/sess_utils.go +++ b/pkg/core/session/sess_utils.go @@ -29,7 +29,7 @@ import ( "strconv" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) func init() { diff --git a/pkg/infrastructure/session/session.go b/pkg/core/session/session.go similarity index 100% rename from pkg/infrastructure/session/session.go rename to pkg/core/session/session.go diff --git a/pkg/infrastructure/session/ssdb/sess_ssdb.go b/pkg/core/session/ssdb/sess_ssdb.go similarity index 98% rename from pkg/infrastructure/session/ssdb/sess_ssdb.go rename to pkg/core/session/ssdb/sess_ssdb.go index 6e4f341e..274c6b35 100644 --- a/pkg/infrastructure/session/ssdb/sess_ssdb.go +++ b/pkg/core/session/ssdb/sess_ssdb.go @@ -8,7 +8,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" "github.com/ssdb/gossdb/ssdb" ) diff --git a/pkg/infrastructure/utils/caller.go b/pkg/core/utils/caller.go similarity index 100% rename from pkg/infrastructure/utils/caller.go rename to pkg/core/utils/caller.go diff --git a/pkg/infrastructure/utils/caller_test.go b/pkg/core/utils/caller_test.go similarity index 100% rename from pkg/infrastructure/utils/caller_test.go rename to pkg/core/utils/caller_test.go diff --git a/pkg/infrastructure/utils/debug.go b/pkg/core/utils/debug.go similarity index 100% rename from pkg/infrastructure/utils/debug.go rename to pkg/core/utils/debug.go diff --git a/pkg/infrastructure/utils/debug_test.go b/pkg/core/utils/debug_test.go similarity index 100% rename from pkg/infrastructure/utils/debug_test.go rename to pkg/core/utils/debug_test.go diff --git a/pkg/infrastructure/utils/file.go b/pkg/core/utils/file.go similarity index 100% rename from pkg/infrastructure/utils/file.go rename to pkg/core/utils/file.go diff --git a/pkg/infrastructure/utils/file_test.go b/pkg/core/utils/file_test.go similarity index 100% rename from pkg/infrastructure/utils/file_test.go rename to pkg/core/utils/file_test.go diff --git a/pkg/infrastructure/utils/kv.go b/pkg/core/utils/kv.go similarity index 100% rename from pkg/infrastructure/utils/kv.go rename to pkg/core/utils/kv.go diff --git a/pkg/infrastructure/utils/kv_test.go b/pkg/core/utils/kv_test.go similarity index 100% rename from pkg/infrastructure/utils/kv_test.go rename to pkg/core/utils/kv_test.go diff --git a/pkg/infrastructure/utils/mail.go b/pkg/core/utils/mail.go similarity index 100% rename from pkg/infrastructure/utils/mail.go rename to pkg/core/utils/mail.go diff --git a/pkg/infrastructure/utils/mail_test.go b/pkg/core/utils/mail_test.go similarity index 100% rename from pkg/infrastructure/utils/mail_test.go rename to pkg/core/utils/mail_test.go diff --git a/pkg/infrastructure/utils/pagination/doc.go b/pkg/core/utils/pagination/doc.go similarity index 95% rename from pkg/infrastructure/utils/pagination/doc.go rename to pkg/core/utils/pagination/doc.go index 86a2ba5d..fb044ff9 100644 --- a/pkg/infrastructure/utils/pagination/doc.go +++ b/pkg/core/utils/pagination/doc.go @@ -8,7 +8,7 @@ In your beego.Controller: package controllers - import "github.com/astaxie/beego/pkg/infrastructure/utils/pagination" + import "github.com/astaxie/beego/pkg/core/utils/pagination" type PostsController struct { beego.Controller diff --git a/pkg/infrastructure/utils/pagination/paginator.go b/pkg/core/utils/pagination/paginator.go similarity index 100% rename from pkg/infrastructure/utils/pagination/paginator.go rename to pkg/core/utils/pagination/paginator.go diff --git a/pkg/infrastructure/utils/pagination/utils.go b/pkg/core/utils/pagination/utils.go similarity index 100% rename from pkg/infrastructure/utils/pagination/utils.go rename to pkg/core/utils/pagination/utils.go diff --git a/pkg/infrastructure/utils/rand.go b/pkg/core/utils/rand.go similarity index 100% rename from pkg/infrastructure/utils/rand.go rename to pkg/core/utils/rand.go diff --git a/pkg/infrastructure/utils/rand_test.go b/pkg/core/utils/rand_test.go similarity index 100% rename from pkg/infrastructure/utils/rand_test.go rename to pkg/core/utils/rand_test.go diff --git a/pkg/infrastructure/utils/safemap.go b/pkg/core/utils/safemap.go similarity index 100% rename from pkg/infrastructure/utils/safemap.go rename to pkg/core/utils/safemap.go diff --git a/pkg/infrastructure/utils/safemap_test.go b/pkg/core/utils/safemap_test.go similarity index 100% rename from pkg/infrastructure/utils/safemap_test.go rename to pkg/core/utils/safemap_test.go diff --git a/pkg/infrastructure/utils/slice.go b/pkg/core/utils/slice.go similarity index 100% rename from pkg/infrastructure/utils/slice.go rename to pkg/core/utils/slice.go diff --git a/pkg/infrastructure/utils/slice_test.go b/pkg/core/utils/slice_test.go similarity index 100% rename from pkg/infrastructure/utils/slice_test.go rename to pkg/core/utils/slice_test.go diff --git a/pkg/infrastructure/utils/testdata/grepe.test b/pkg/core/utils/testdata/grepe.test similarity index 100% rename from pkg/infrastructure/utils/testdata/grepe.test rename to pkg/core/utils/testdata/grepe.test diff --git a/pkg/infrastructure/utils/time.go b/pkg/core/utils/time.go similarity index 100% rename from pkg/infrastructure/utils/time.go rename to pkg/core/utils/time.go diff --git a/pkg/infrastructure/utils/utils.go b/pkg/core/utils/utils.go similarity index 100% rename from pkg/infrastructure/utils/utils.go rename to pkg/core/utils/utils.go diff --git a/pkg/infrastructure/utils/utils_test.go b/pkg/core/utils/utils_test.go similarity index 100% rename from pkg/infrastructure/utils/utils_test.go rename to pkg/core/utils/utils_test.go diff --git a/pkg/infrastructure/validation/README.md b/pkg/core/validation/README.md similarity index 100% rename from pkg/infrastructure/validation/README.md rename to pkg/core/validation/README.md diff --git a/pkg/infrastructure/validation/util.go b/pkg/core/validation/util.go similarity index 100% rename from pkg/infrastructure/validation/util.go rename to pkg/core/validation/util.go diff --git a/pkg/infrastructure/validation/util_test.go b/pkg/core/validation/util_test.go similarity index 100% rename from pkg/infrastructure/validation/util_test.go rename to pkg/core/validation/util_test.go diff --git a/pkg/infrastructure/validation/validation.go b/pkg/core/validation/validation.go similarity index 100% rename from pkg/infrastructure/validation/validation.go rename to pkg/core/validation/validation.go diff --git a/pkg/infrastructure/validation/validation_test.go b/pkg/core/validation/validation_test.go similarity index 100% rename from pkg/infrastructure/validation/validation_test.go rename to pkg/core/validation/validation_test.go diff --git a/pkg/infrastructure/validation/validators.go b/pkg/core/validation/validators.go similarity index 99% rename from pkg/infrastructure/validation/validators.go rename to pkg/core/validation/validators.go index 94152b89..1652ee2c 100644 --- a/pkg/infrastructure/validation/validators.go +++ b/pkg/core/validation/validators.go @@ -23,7 +23,7 @@ import ( "time" "unicode/utf8" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty diff --git a/pkg/server/web/admin.go b/pkg/server/web/admin.go index 084190a9..4cac58ba 100644 --- a/pkg/server/web/admin.go +++ b/pkg/server/web/admin.go @@ -20,7 +20,7 @@ import ( "reflect" "time" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" ) // BeeAdminApp is the default adminApp used by admin module. diff --git a/pkg/server/web/admin_controller.go b/pkg/server/web/admin_controller.go index dc3a40b5..575362d7 100644 --- a/pkg/server/web/admin_controller.go +++ b/pkg/server/web/admin_controller.go @@ -24,7 +24,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/astaxie/beego/pkg/infrastructure/governor" + "github.com/astaxie/beego/pkg/core/governor" ) type adminController struct { diff --git a/pkg/server/web/admin_test.go b/pkg/server/web/admin_test.go index d04ac319..c33bbf2f 100644 --- a/pkg/server/web/admin_test.go +++ b/pkg/server/web/admin_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/pkg/infrastructure/governor" + "github.com/astaxie/beego/pkg/core/governor" ) type SampleDatabaseCheck struct { diff --git a/pkg/server/web/captcha/captcha.go b/pkg/server/web/captcha/captcha.go index 36bc0fcb..876e6074 100644 --- a/pkg/server/web/captcha/captcha.go +++ b/pkg/server/web/captcha/captcha.go @@ -67,9 +67,9 @@ import ( "strings" "time" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/captcha/image_test.go b/pkg/server/web/captcha/image_test.go index 36cba386..a6b82f56 100644 --- a/pkg/server/web/captcha/image_test.go +++ b/pkg/server/web/captcha/image_test.go @@ -17,7 +17,7 @@ package captcha import ( "testing" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) type byteCounter struct { diff --git a/pkg/server/web/config.go b/pkg/server/web/config.go index bc46b20e..443dfcb8 100644 --- a/pkg/server/web/config.go +++ b/pkg/server/web/config.go @@ -25,11 +25,11 @@ import ( "strings" "github.com/astaxie/beego/pkg" - "github.com/astaxie/beego/pkg/infrastructure/config" - "github.com/astaxie/beego/pkg/infrastructure/logs" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/config" + "github.com/astaxie/beego/pkg/core/logs" + "github.com/astaxie/beego/pkg/core/session" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/config_test.go b/pkg/server/web/config_test.go index 4961d3a9..ce4a4492 100644 --- a/pkg/server/web/config_test.go +++ b/pkg/server/web/config_test.go @@ -19,7 +19,7 @@ import ( "reflect" "testing" - beeJson "github.com/astaxie/beego/pkg/infrastructure/config/json" + beeJson "github.com/astaxie/beego/pkg/core/config/json" ) func TestDefaults(t *testing.T) { diff --git a/pkg/server/web/context/context.go b/pkg/server/web/context/context.go index 78e0a6d6..1a6c00a8 100644 --- a/pkg/server/web/context/context.go +++ b/pkg/server/web/context/context.go @@ -35,7 +35,7 @@ import ( "strings" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // Commonly used mime-types diff --git a/pkg/server/web/context/input.go b/pkg/server/web/context/input.go index f8657f84..499b61dc 100644 --- a/pkg/server/web/context/input.go +++ b/pkg/server/web/context/input.go @@ -29,7 +29,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" ) // Regexes for checking the accept headers diff --git a/pkg/server/web/context/param/conv.go b/pkg/server/web/context/param/conv.go index a96dacdd..73e83e30 100644 --- a/pkg/server/web/context/param/conv.go +++ b/pkg/server/web/context/param/conv.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" beecontext "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/controller.go b/pkg/server/web/controller.go index 2081e647..547c3271 100644 --- a/pkg/server/web/controller.go +++ b/pkg/server/web/controller.go @@ -28,7 +28,7 @@ import ( "strconv" "strings" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/session" "github.com/astaxie/beego/pkg/server/web/context" "github.com/astaxie/beego/pkg/server/web/context/param" diff --git a/pkg/server/web/error.go b/pkg/server/web/error.go index a005c110..d0a8d778 100644 --- a/pkg/server/web/error.go +++ b/pkg/server/web/error.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/astaxie/beego/pkg" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/hooks.go b/pkg/server/web/hooks.go index 2f0cb159..15969168 100644 --- a/pkg/server/web/hooks.go +++ b/pkg/server/web/hooks.go @@ -7,8 +7,8 @@ import ( "net/http" "path/filepath" - "github.com/astaxie/beego/pkg/infrastructure/logs" - "github.com/astaxie/beego/pkg/infrastructure/session" + "github.com/astaxie/beego/pkg/core/logs" + "github.com/astaxie/beego/pkg/core/session" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/pagination/controller.go b/pkg/server/web/pagination/controller.go index 530a72ff..675437f8 100644 --- a/pkg/server/web/pagination/controller.go +++ b/pkg/server/web/pagination/controller.go @@ -15,7 +15,7 @@ package pagination import ( - "github.com/astaxie/beego/pkg/infrastructure/utils/pagination" + "github.com/astaxie/beego/pkg/core/utils/pagination" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/parser.go b/pkg/server/web/parser.go index a4507010..9dfeca56 100644 --- a/pkg/server/web/parser.go +++ b/pkg/server/web/parser.go @@ -31,9 +31,9 @@ import ( "golang.org/x/tools/go/packages" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web/context/param" ) diff --git a/pkg/server/web/router.go b/pkg/server/web/router.go index a9d1b0cf..07007a2b 100644 --- a/pkg/server/web/router.go +++ b/pkg/server/web/router.go @@ -25,9 +25,9 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" beecontext "github.com/astaxie/beego/pkg/server/web/context" "github.com/astaxie/beego/pkg/server/web/context/param" ) diff --git a/pkg/server/web/router_test.go b/pkg/server/web/router_test.go index a59cde8b..2bc7990c 100644 --- a/pkg/server/web/router_test.go +++ b/pkg/server/web/router_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/server/web/server.go b/pkg/server/web/server.go index 7bd9023d..75523d0c 100644 --- a/pkg/server/web/server.go +++ b/pkg/server/web/server.go @@ -31,10 +31,10 @@ import ( "golang.org/x/crypto/acme/autocert" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" beecontext "github.com/astaxie/beego/pkg/server/web/context" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web/grace" ) diff --git a/pkg/server/web/staticfile.go b/pkg/server/web/staticfile.go index 7b9942f4..4aabbc60 100644 --- a/pkg/server/web/staticfile.go +++ b/pkg/server/web/staticfile.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/logs" + "github.com/astaxie/beego/pkg/core/logs" lru "github.com/hashicorp/golang-lru" "github.com/astaxie/beego/pkg/server/web/context" diff --git a/pkg/server/web/statistics.go b/pkg/server/web/statistics.go index ccc3a1fc..7d5d5800 100644 --- a/pkg/server/web/statistics.go +++ b/pkg/server/web/statistics.go @@ -19,7 +19,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" ) // Statistics struct diff --git a/pkg/server/web/template.go b/pkg/server/web/template.go index 1192a3f2..4a07b0da 100644 --- a/pkg/server/web/template.go +++ b/pkg/server/web/template.go @@ -27,8 +27,8 @@ import ( "strings" "sync" - "github.com/astaxie/beego/pkg/infrastructure/logs" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/logs" + "github.com/astaxie/beego/pkg/core/utils" ) var ( diff --git a/pkg/server/web/tree.go b/pkg/server/web/tree.go index 55f68076..9038c010 100644 --- a/pkg/server/web/tree.go +++ b/pkg/server/web/tree.go @@ -19,7 +19,7 @@ import ( "regexp" "strings" - "github.com/astaxie/beego/pkg/infrastructure/utils" + "github.com/astaxie/beego/pkg/core/utils" "github.com/astaxie/beego/pkg/server/web/context" ) diff --git a/pkg/task/govenor_command.go b/pkg/task/govenor_command.go index be351dc1..a9583970 100644 --- a/pkg/task/govenor_command.go +++ b/pkg/task/govenor_command.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" - "github.com/astaxie/beego/pkg/infrastructure/governor" + "github.com/astaxie/beego/pkg/core/governor" ) type listTaskCommand struct { diff --git a/pkg/task/task.go b/pkg/task/task.go index e76706e3..8f25a0f3 100644 --- a/pkg/task/task.go +++ b/pkg/task/task.go @@ -39,7 +39,7 @@ type taskManager struct { started bool } -func newTaskManager()*taskManager{ +func newTaskManager() *taskManager { return &taskManager{ adminTaskList: make(map[string]Tasker), taskLock: sync.RWMutex{}, @@ -53,11 +53,11 @@ func newTaskManager()*taskManager{ var ( globalTaskManager *taskManager - seconds = bounds{0, 59, nil} - minutes = bounds{0, 59, nil} - hours = bounds{0, 23, nil} - days = bounds{1, 31, nil} - months = bounds{1, 12, map[string]uint{ + seconds = bounds{0, 59, nil} + minutes = bounds{0, 59, nil} + hours = bounds{0, 23, nil} + days = bounds{1, 31, nil} + months = bounds{1, 12, map[string]uint{ "jan": 1, "feb": 2, "mar": 3, @@ -436,7 +436,6 @@ func ClearTask() { globalTaskManager.ClearTask() } - // StartTask start all tasks func (m *taskManager) StartTask() { m.taskLock.Lock() @@ -451,7 +450,7 @@ func (m *taskManager) StartTask() { go m.run() } -func(m *taskManager) run() { +func (m *taskManager) run() { now := time.Now().Local() for _, t := range m.adminTaskList { t.SetNext(nil, now) @@ -503,14 +502,14 @@ func(m *taskManager) run() { } // StopTask stop all tasks -func(m *taskManager) StopTask() { +func (m *taskManager) StopTask() { go func() { m.stop <- true }() } // AddTask add task with name -func (m *taskManager)AddTask(taskname string, t Tasker) { +func (m *taskManager) AddTask(taskname string, t Tasker) { isChanged := false m.taskLock.Lock() t.SetNext(nil, time.Now().Local()) @@ -529,7 +528,7 @@ func (m *taskManager)AddTask(taskname string, t Tasker) { } // DeleteTask delete task with name -func(m *taskManager) DeleteTask(taskname string) { +func (m *taskManager) DeleteTask(taskname string) { isChanged := false m.taskLock.Lock() @@ -547,7 +546,7 @@ func(m *taskManager) DeleteTask(taskname string) { } // ClearTask clear all tasks -func(m *taskManager) ClearTask() { +func (m *taskManager) ClearTask() { isChanged := false m.taskLock.Lock()