rename infrastructure to core

This commit is contained in:
Ming Deng 2020-10-05 18:13:26 +08:00
parent ff7a8b966b
commit 48e98482f7
190 changed files with 129 additions and 130 deletions

View File

@ -17,7 +17,7 @@ package adapter
import ( import (
"time" "time"
_ "github.com/astaxie/beego/pkg/infrastructure/governor" _ "github.com/astaxie/beego/pkg/core/governor"
"github.com/astaxie/beego/pkg/server/web" "github.com/astaxie/beego/pkg/server/web"
) )

View File

@ -18,7 +18,7 @@ import (
context2 "context" context2 "context"
"github.com/astaxie/beego/pkg/adapter/session" "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" "github.com/astaxie/beego/pkg/server/web"
) )

View File

@ -19,7 +19,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
) )
type newToOldConfigerAdapter struct { type newToOldConfigerAdapter struct {

View File

@ -41,7 +41,7 @@
package config package config
import ( 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. // Configer defines how to get and set value from configuration raw data.

View File

@ -17,7 +17,7 @@
package env package env
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/config/env" "github.com/astaxie/beego/pkg/core/config/env"
) )
// Get returns a value by key. // Get returns a value by key.

View File

@ -15,7 +15,7 @@
package config package config
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
) )
// NewFakeConfig return a fake Configer // NewFakeConfig return a fake Configer

View File

@ -15,5 +15,5 @@
package config package config
import ( import (
_ "github.com/astaxie/beego/pkg/infrastructure/config/json" _ "github.com/astaxie/beego/pkg/core/config/json"
) )

View File

@ -30,5 +30,5 @@
package xml package xml
import ( import (
_ "github.com/astaxie/beego/pkg/infrastructure/config/xml" _ "github.com/astaxie/beego/pkg/core/config/xml"
) )

View File

@ -30,5 +30,5 @@
package yaml package yaml
import ( import (
_ "github.com/astaxie/beego/pkg/infrastructure/config/yaml" _ "github.com/astaxie/beego/pkg/core/config/yaml"
) )

View File

@ -17,9 +17,9 @@ package adapter
import ( import (
"strings" "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. // Log levels to control the logging output.

View File

@ -24,7 +24,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/astaxie/beego/pkg" "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" "github.com/astaxie/beego/pkg/server/web"
) )

View File

@ -60,7 +60,7 @@ import (
"github.com/astaxie/beego/pkg/client/orm" "github.com/astaxie/beego/pkg/client/orm"
"github.com/astaxie/beego/pkg/client/orm/hints" "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 // DebugQueries define the debug

View File

@ -37,7 +37,7 @@ import (
"net/http" "net/http"
"github.com/astaxie/beego/pkg/adapter/session" "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 // SessionStore store each session

View File

@ -6,7 +6,7 @@ import (
"net/http" "net/http"
"github.com/astaxie/beego/pkg/adapter/session" "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 // SessionStore ledis session store

View File

@ -38,7 +38,7 @@ import (
"github.com/astaxie/beego/pkg/adapter/session" "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 // SessionStore memcache session store

View File

@ -45,7 +45,7 @@ import (
"net/http" "net/http"
"github.com/astaxie/beego/pkg/adapter/session" "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 // import mysql driver
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"

View File

@ -58,7 +58,7 @@ import (
// import postgresql Driver // import postgresql Driver
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/astaxie/beego/pkg/infrastructure/session/postgres" "github.com/astaxie/beego/pkg/core/session/postgres"
) )
// SessionStore postgresql session store // SessionStore postgresql session store

View File

@ -17,7 +17,7 @@ package session
import ( import (
"context" "context"
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
type oldToNewProviderAdapter struct { type oldToNewProviderAdapter struct {

View File

@ -38,7 +38,7 @@ import (
"github.com/astaxie/beego/pkg/adapter/session" "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 // MaxPoolSize redis max pool size

View File

@ -37,7 +37,7 @@ import (
"net/http" "net/http"
"github.com/astaxie/beego/pkg/adapter/session" "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 // MaxPoolSize redis_cluster max pool size

View File

@ -38,7 +38,7 @@ import (
"github.com/astaxie/beego/pkg/adapter/session" "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 // DefaultPoolSize redis_sentinel default pool size

View File

@ -18,7 +18,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
// CookieSessionStore Cookie SessionStore // CookieSessionStore Cookie SessionStore

View File

@ -18,7 +18,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
// FileSessionStore File session store // FileSessionStore File session store

View File

@ -18,7 +18,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
// MemSessionStore memory session store. // MemSessionStore memory session store.

View File

@ -15,7 +15,7 @@
package session package session
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
// EncodeGob encode the obj to gob // EncodeGob encode the obj to gob

View File

@ -32,7 +32,7 @@ import (
"net/http" "net/http"
"os" "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. // Store contains all data for one session process with specific id.

View File

@ -6,7 +6,7 @@ import (
"github.com/astaxie/beego/pkg/adapter/session" "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 // Provider holds ssdb client and configs

View File

@ -18,7 +18,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/astaxie/beego/pkg/infrastructure/session" "github.com/astaxie/beego/pkg/core/session"
) )
type NewToOldStoreAdapter struct { type NewToOldStoreAdapter struct {

View File

@ -31,7 +31,7 @@
package toolbox package toolbox
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/governor" "github.com/astaxie/beego/pkg/core/governor"
) )
// AdminCheckList holds health checker map // AdminCheckList holds health checker map

View File

@ -19,7 +19,7 @@ import (
"os" "os"
"time" "time"
"github.com/astaxie/beego/pkg/infrastructure/governor" "github.com/astaxie/beego/pkg/core/governor"
) )
var startTime = time.Now() var startTime = time.Now()

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// GetFuncName get function name // GetFuncName get function name

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// Display print the data in console // Display print the data in console

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// SelfPath gets compiled executable file absolute path // SelfPath gets compiled executable file absolute path

View File

@ -17,7 +17,7 @@ package utils
import ( import (
"io" "io"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// Email is the type used for email messages // Email is the type used for email messages

View File

@ -17,7 +17,7 @@ package pagination
import ( import (
"net/http" "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. // Paginator within the state of a http request.

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// RandomCreateBytes generate random []byte by specify chars. // RandomCreateBytes generate random []byte by specify chars.

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// BeeMap is a map with lock // BeeMap is a map with lock

View File

@ -15,7 +15,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
type reducetype func(interface{}) interface{} type reducetype func(interface{}) interface{}

View File

@ -1,7 +1,7 @@
package utils package utils
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// GetGOPATHs returns all paths in GOPATH variable. // GetGOPATHs returns all paths in GOPATH variable.

View File

@ -17,7 +17,7 @@ package validation
import ( import (
"reflect" "reflect"
"github.com/astaxie/beego/pkg/infrastructure/validation" "github.com/astaxie/beego/pkg/core/validation"
) )
const ( const (

View File

@ -50,7 +50,7 @@ import (
"fmt" "fmt"
"regexp" "regexp"
"github.com/astaxie/beego/pkg/infrastructure/validation" "github.com/astaxie/beego/pkg/core/validation"
) )
// ValidFormer valid interface // ValidFormer valid interface

View File

@ -17,7 +17,7 @@ package validation
import ( import (
"sync" "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 // CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty

View File

@ -18,7 +18,7 @@ import (
"context" "context"
"database/sql" "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 // DoNothingOrm won't do anything, usually you use this to custom your mock Ormer implementation

View File

@ -19,10 +19,10 @@ import (
"reflect" "reflect"
"strings" "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/client/orm"
"github.com/astaxie/beego/pkg/infrastructure/bean" "github.com/astaxie/beego/pkg/core/bean"
) )
// DefaultValueFilterChainBuilder only works for InsertXXX method, // DefaultValueFilterChainBuilder only works for InsertXXX method,

View File

@ -20,7 +20,7 @@ import (
"reflect" "reflect"
"time" "time"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
const ( const (

View File

@ -21,7 +21,7 @@ import (
"sync" "sync"
"testing" "testing"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View File

@ -15,7 +15,7 @@
package hints package hints
import ( import (
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
const ( const (

View File

@ -17,7 +17,7 @@ package migration
import ( import (
"fmt" "fmt"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
// Index struct defines the structure of Index Columns // Index struct defines the structure of Index Columns

View File

@ -34,7 +34,7 @@ import (
"time" "time"
"github.com/astaxie/beego/pkg/client/orm" "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 // const the data format for the bee generate migration datatype

View File

@ -63,9 +63,9 @@ import (
"time" "time"
"github.com/astaxie/beego/pkg/client/orm/hints" "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 // DebugQueries define the debug

View File

@ -20,7 +20,7 @@ import (
"reflect" "reflect"
"time" "time"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
// TableNaming is usually used by model // TableNaming is usually used by model

View File

@ -22,7 +22,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
const DefaultValueTagKey = "default" const DefaultValueTagKey = "default"

View File

@ -21,7 +21,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
var env *utils.BeeMap var env *utils.BeeMap

View File

@ -26,8 +26,8 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"google.golang.org/grpc" "google.golang.org/grpc"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
const etcdOpts = "etcdOpts" const etcdOpts = "etcdOpts"

View File

@ -27,8 +27,8 @@ import (
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
// JSONConfig is a json config parser and implements Config interface. // JSONConfig is a json config parser and implements Config interface.

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
) )
func TestJsonStartsWithArray(t *testing.T) { func TestJsonStartsWithArray(t *testing.T) {

View File

@ -42,8 +42,8 @@ import (
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
"github.com/beego/x2j" "github.com/beego/x2j"
) )

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
) )
func TestXML(t *testing.T) { func TestXML(t *testing.T) {

View File

@ -44,8 +44,8 @@ import (
"github.com/beego/goyaml2" "github.com/beego/goyaml2"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
// Config is a yaml config parser and implements Config interface. // Config is a yaml config parser and implements Config interface.

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/astaxie/beego/pkg/infrastructure/config" "github.com/astaxie/beego/pkg/core/config"
) )
func TestYaml(t *testing.T) { func TestYaml(t *testing.T) {

View File

@ -26,7 +26,7 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/astaxie/beego/pkg/infrastructure/utils" "github.com/astaxie/beego/pkg/core/utils"
) )
var startTime = time.Now() var startTime = time.Now()

View File

@ -9,7 +9,7 @@ import (
"github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/proto"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
const ( const (

View File

@ -12,7 +12,7 @@ import (
"github.com/elastic/go-elasticsearch/v6" "github.com/elastic/go-elasticsearch/v6"
"github.com/elastic/go-elasticsearch/v6/esapi" "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 // NewES returns a LoggerInterface

View File

@ -17,7 +17,7 @@ package es
import ( import (
"fmt" "fmt"
"github.com/astaxie/beego/pkg/infrastructure/logs" "github.com/astaxie/beego/pkg/core/logs"
) )
// IndexNaming generate the index name // IndexNaming generate the index name

View File

@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert" "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) { func TestDefaultIndexNaming_IndexName(t *testing.T) {

Some files were not shown because too many files have changed in this diff Show More