mirror of
https://github.com/astaxie/beego.git
synced 2024-11-21 17:20:55 +00:00
commit
f1358cf78d
@ -96,7 +96,7 @@ after_script:
|
||||
- rm -rf ./res/var/*
|
||||
script:
|
||||
- go test ./...
|
||||
- staticcheck -show-ignored -checks "-ST1017,-U1000,-ST1005,-S1034,-S1012,-SA4006,-SA6005,-SA1019,-SA1024" ./pkg
|
||||
- staticcheck -show-ignored -checks "-ST1017,-U1000,-ST1005,-S1034,-S1012,-SA4006,-SA6005,-SA1019,-SA1024" ./
|
||||
- unconvert $(go list ./... | grep -v /vendor/)
|
||||
- ineffassign .
|
||||
- find . ! \( -path './vendor' -prune \) -type f -name '*.go' -print0 | xargs -0 gofmt -l -s
|
||||
|
@ -17,8 +17,8 @@ package adapter
|
||||
import (
|
||||
"time"
|
||||
|
||||
_ "github.com/astaxie/beego/pkg/core/governor"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
_ "github.com/astaxie/beego/core/governor"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// FilterMonitorFunc is default monitor filter when admin module is enable.
|
@ -17,9 +17,9 @@ package adapter
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
context2 "github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
context2 "github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
var (
|
@ -15,14 +15,14 @@
|
||||
package adapter
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
// VERSION represent beego web framework version.
|
||||
VERSION = pkg.VERSION
|
||||
VERSION = beego.VERSION
|
||||
|
||||
// DEV is for develop
|
||||
DEV = web.DEV
|
@ -18,7 +18,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/cache"
|
||||
"github.com/astaxie/beego/client/cache"
|
||||
)
|
||||
|
||||
type newToOldCacheAdapter struct {
|
@ -15,7 +15,7 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/cache"
|
||||
"github.com/astaxie/beego/client/cache"
|
||||
)
|
||||
|
||||
// GetString convert interface to string.
|
@ -15,7 +15,7 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/cache"
|
||||
"github.com/astaxie/beego/client/cache"
|
||||
)
|
||||
|
||||
// NewFileCache Create new file cache with no config.
|
@ -30,8 +30,8 @@
|
||||
package memcache
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
"github.com/astaxie/beego/pkg/client/cache/memcache"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
"github.com/astaxie/beego/client/cache/memcache"
|
||||
)
|
||||
|
||||
// NewMemCache create new memcache adapter.
|
@ -21,7 +21,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
)
|
||||
|
||||
func TestMemcacheCache(t *testing.T) {
|
@ -15,7 +15,7 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/cache"
|
||||
"github.com/astaxie/beego/client/cache"
|
||||
)
|
||||
|
||||
// NewMemoryCache returns a new MemoryCache.
|
@ -30,8 +30,8 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
redis2 "github.com/astaxie/beego/pkg/client/cache/redis"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
redis2 "github.com/astaxie/beego/client/cache/redis"
|
||||
)
|
||||
|
||||
var (
|
@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/gomodule/redigo/redis"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
)
|
||||
|
||||
func TestRedisCache(t *testing.T) {
|
@ -1,8 +1,8 @@
|
||||
package ssdb
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
ssdb2 "github.com/astaxie/beego/pkg/client/cache/ssdb"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
ssdb2 "github.com/astaxie/beego/client/cache/ssdb"
|
||||
)
|
||||
|
||||
// NewSsdbCache create new ssdb adapter.
|
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/cache"
|
||||
"github.com/astaxie/beego/adapter/cache"
|
||||
)
|
||||
|
||||
func TestSsdbcacheCache(t *testing.T) {
|
@ -17,9 +17,9 @@ package adapter
|
||||
import (
|
||||
context2 "context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
newCfg "github.com/astaxie/beego/pkg/core/config"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
newCfg "github.com/astaxie/beego/core/config"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Config is the main struct for BConfig
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/astaxie/beego/pkg/core/config"
|
||||
"github.com/astaxie/beego/core/config"
|
||||
)
|
||||
|
||||
type newToOldConfigerAdapter struct {
|
@ -41,7 +41,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/core/config"
|
||||
"github.com/astaxie/beego/core/config"
|
||||
)
|
||||
|
||||
// Configer defines how to get and set value from configuration raw data.
|
@ -17,7 +17,7 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/core/config/env"
|
||||
"github.com/astaxie/beego/core/config/env"
|
||||
)
|
||||
|
||||
// Get returns a value by key.
|
@ -15,7 +15,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/core/config"
|
||||
"github.com/astaxie/beego/core/config"
|
||||
)
|
||||
|
||||
// NewFakeConfig return a fake Configer
|
@ -15,5 +15,5 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
_ "github.com/astaxie/beego/pkg/core/config/json"
|
||||
_ "github.com/astaxie/beego/core/config/json"
|
||||
)
|
@ -30,5 +30,5 @@
|
||||
package xml
|
||||
|
||||
import (
|
||||
_ "github.com/astaxie/beego/pkg/core/config/xml"
|
||||
_ "github.com/astaxie/beego/core/config/xml"
|
||||
)
|
@ -19,7 +19,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/config"
|
||||
"github.com/astaxie/beego/adapter/config"
|
||||
)
|
||||
|
||||
func TestXML(t *testing.T) {
|
@ -30,5 +30,5 @@
|
||||
package yaml
|
||||
|
||||
import (
|
||||
_ "github.com/astaxie/beego/pkg/core/config/yaml"
|
||||
_ "github.com/astaxie/beego/core/config/yaml"
|
||||
)
|
@ -19,7 +19,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/config"
|
||||
"github.com/astaxie/beego/adapter/config"
|
||||
)
|
||||
|
||||
func TestYaml(t *testing.T) {
|
@ -19,7 +19,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// InitGzip init the gzipcompress
|
@ -27,7 +27,7 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// commonly used mime-types
|
@ -15,7 +15,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// BeegoInput operates the http request header, data, cookie and body.
|
@ -15,7 +15,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// BeegoOutput does work for sending response header.
|
@ -1,7 +1,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// Renderer defines an http response renderer
|
@ -18,10 +18,10 @@ import (
|
||||
"mime/multipart"
|
||||
"net/url"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
webContext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
webContext "github.com/astaxie/beego/server/web/context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
var (
|
@ -17,10 +17,10 @@ package adapter
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
@ -15,9 +15,9 @@
|
||||
package adapter
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// FilterFunc defines a filter function which is invoked before the controller handler is executed.
|
@ -15,7 +15,7 @@
|
||||
package adapter
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// FlashData is a tools to maintain data when using across request.
|
@ -18,7 +18,7 @@ import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type FileSystem web.FileSystem
|
@ -46,7 +46,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/grace"
|
||||
"github.com/astaxie/beego/server/web/grace"
|
||||
)
|
||||
|
||||
const (
|
@ -3,7 +3,7 @@ package grace
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/grace"
|
||||
"github.com/astaxie/beego/server/web/grace"
|
||||
)
|
||||
|
||||
// Server embedded http.Server
|
@ -38,7 +38,7 @@ import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/httplib"
|
||||
"github.com/astaxie/beego/client/httplib"
|
||||
)
|
||||
|
||||
// SetDefaultSetting Overwrite default settings
|
@ -17,9 +17,9 @@ package adapter
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
|
||||
webLog "github.com/astaxie/beego/pkg/core/logs"
|
||||
webLog "github.com/astaxie/beego/core/logs"
|
||||
)
|
||||
|
||||
// Log levels to control the logging output.
|
@ -15,7 +15,7 @@
|
||||
package logs
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
)
|
||||
|
||||
// AccessLogRecord struct for holding access log data.
|
5
adapter/logs/alils/alils.go
Normal file
5
adapter/logs/alils/alils.go
Normal file
@ -0,0 +1,5 @@
|
||||
package alils
|
||||
|
||||
import (
|
||||
_ "github.com/astaxie/beego/core/logs/alils"
|
||||
)
|
5
adapter/logs/es/es.go
Normal file
5
adapter/logs/es/es.go
Normal file
@ -0,0 +1,5 @@
|
||||
package es
|
||||
|
||||
import (
|
||||
_ "github.com/astaxie/beego/core/logs/es"
|
||||
)
|
@ -37,7 +37,7 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
)
|
||||
|
||||
// RFC5424 log message levels.
|
@ -17,7 +17,7 @@ package logs
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
)
|
||||
|
||||
type oldToNewAdapter struct {
|
@ -15,7 +15,7 @@
|
||||
package logs
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
)
|
||||
|
||||
// ColorByStatus return color by http code
|
@ -23,9 +23,9 @@ import (
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/astaxie/beego/pkg"
|
||||
"github.com/astaxie/beego/pkg/core/logs"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func PrometheusMiddleWare(next http.Handler) http.Handler {
|
||||
@ -59,13 +59,13 @@ func registerBuildInfo() {
|
||||
Help: "The building information",
|
||||
ConstLabels: map[string]string{
|
||||
"appname": web.BConfig.AppName,
|
||||
"build_version": pkg.BuildVersion,
|
||||
"build_revision": pkg.BuildGitRevision,
|
||||
"build_status": pkg.BuildStatus,
|
||||
"build_tag": pkg.BuildTag,
|
||||
"build_time": strings.Replace(pkg.BuildTime, "--", " ", 1),
|
||||
"go_version": pkg.GoVersion,
|
||||
"git_branch": pkg.GitBranch,
|
||||
"build_version": beego.BuildVersion,
|
||||
"build_revision": beego.BuildGitRevision,
|
||||
"build_status": beego.BuildStatus,
|
||||
"build_tag": beego.BuildTag,
|
||||
"build_time": strings.Replace(beego.BuildTime, "--", " ", 1),
|
||||
"go_version": beego.GoVersion,
|
||||
"git_branch": beego.GitBranch,
|
||||
"start_time": time.Now().Format("2006-01-02 15:04:05"),
|
||||
},
|
||||
}, []string{})
|
@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
)
|
||||
|
||||
func TestPrometheusMiddleWare(t *testing.T) {
|
@ -15,7 +15,7 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm/migration"
|
||||
"github.com/astaxie/beego/client/orm/migration"
|
||||
)
|
||||
|
||||
// Index struct defines the structure of Index Columns
|
@ -28,7 +28,7 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm/migration"
|
||||
"github.com/astaxie/beego/client/orm/migration"
|
||||
)
|
||||
|
||||
// const the data format for the bee generate migration datatype
|
@ -17,10 +17,10 @@ package adapter
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
adtContext "github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
adtContext "github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type namespaceCond func(*adtContext.Context) bool
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// RunCommand listen for orm command and then run it if command arguments passed.
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
var (
|
@ -19,7 +19,7 @@ import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// DriverType database driver constant int.
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// ResetModelCache Clean model cache. Then you can re-RegisterModel.
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// RegisterModel register models
|
@ -17,7 +17,7 @@ package orm
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// Define the Type enum
|
@ -58,9 +58,9 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/pkg/client/orm/hints"
|
||||
"github.com/astaxie/beego/pkg/core/utils"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
"github.com/astaxie/beego/client/orm/hints"
|
||||
"github.com/astaxie/beego/core/utils"
|
||||
)
|
||||
|
||||
// DebugQueries define the debug
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// ExprSep define the expression separation
|
@ -17,7 +17,7 @@ package orm
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// Log implement the log.Logger
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// define Col operations
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// QueryBuilder is the Query builder interface
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// CommaSpace is the separation
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// TiDBQueryBuilder is the SQL build
|
@ -15,7 +15,7 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
type baseQuerySetter struct {
|
@ -18,7 +18,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
// Params stores the Params
|
@ -21,7 +21,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/pkg/client/orm"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
)
|
||||
|
||||
type fn func(string) string
|
@ -58,10 +58,10 @@ package apiauth
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
beego "github.com/astaxie/beego/pkg/adapter"
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/filter/apiauth"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/filter/apiauth"
|
||||
)
|
||||
|
||||
// AppIDToAppSecret is used to get appsecret throw appid
|
@ -38,10 +38,10 @@ package auth
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
beego "github.com/astaxie/beego/pkg/adapter"
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/filter/auth"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/filter/auth"
|
||||
)
|
||||
|
||||
// Basic is the http basic auth
|
@ -44,10 +44,10 @@ import (
|
||||
|
||||
"github.com/casbin/casbin"
|
||||
|
||||
beego "github.com/astaxie/beego/pkg/adapter"
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/filter/authz"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/filter/authz"
|
||||
)
|
||||
|
||||
// NewAuthorizer returns the authorizer.
|
@ -19,9 +19,9 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
beego "github.com/astaxie/beego/pkg/adapter"
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/adapter/plugins/auth"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/adapter/plugins/auth"
|
||||
"github.com/casbin/casbin"
|
||||
)
|
||||
|
@ -36,11 +36,11 @@
|
||||
package cors
|
||||
|
||||
import (
|
||||
beego "github.com/astaxie/beego/pkg/adapter"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/filter/cors"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/filter/cors"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
)
|
||||
|
||||
// Options represents Access Control options.
|
@ -15,9 +15,9 @@
|
||||
package adapter
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
beecontext "github.com/astaxie/beego/pkg/server/web/context"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
// PolicyFunc defines a policy function which is invoked before the controller handler is executed.
|
@ -18,10 +18,10 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
beecontext "github.com/astaxie/beego/pkg/adapter/context"
|
||||
"github.com/astaxie/beego/pkg/server/web/context"
|
||||
beecontext "github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// default filter execution points
|
@ -36,8 +36,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
beecb "github.com/astaxie/beego/pkg/server/web/session/couchbase"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
beecb "github.com/astaxie/beego/server/web/session/couchbase"
|
||||
)
|
||||
|
||||
// SessionStore store each session
|
@ -5,8 +5,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
beeLedis "github.com/astaxie/beego/pkg/server/web/session/ledis"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
beeLedis "github.com/astaxie/beego/server/web/session/ledis"
|
||||
)
|
||||
|
||||
// SessionStore ledis session store
|
@ -36,9 +36,9 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
|
||||
beemem "github.com/astaxie/beego/pkg/server/web/session/memcache"
|
||||
beemem "github.com/astaxie/beego/server/web/session/memcache"
|
||||
)
|
||||
|
||||
// SessionStore memcache session store
|
@ -44,8 +44,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/pkg/server/web/session/mysql"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
"github.com/astaxie/beego/server/web/session/mysql"
|
||||
|
||||
// import mysql driver
|
||||
_ "github.com/go-sql-driver/mysql"
|
@ -54,11 +54,11 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
// import postgresql Driver
|
||||
_ "github.com/lib/pq"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/session/postgres"
|
||||
"github.com/astaxie/beego/server/web/session/postgres"
|
||||
)
|
||||
|
||||
// SessionStore postgresql session store
|
@ -17,7 +17,7 @@ package session
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/session"
|
||||
"github.com/astaxie/beego/server/web/session"
|
||||
)
|
||||
|
||||
type oldToNewProviderAdapter struct {
|
@ -36,9 +36,9 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
|
||||
beeRedis "github.com/astaxie/beego/pkg/server/web/session/redis"
|
||||
beeRedis "github.com/astaxie/beego/server/web/session/redis"
|
||||
)
|
||||
|
||||
// MaxPoolSize redis max pool size
|
@ -36,8 +36,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
cluster "github.com/astaxie/beego/pkg/server/web/session/redis_cluster"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
cluster "github.com/astaxie/beego/server/web/session/redis_cluster"
|
||||
)
|
||||
|
||||
// MaxPoolSize redis_cluster max pool size
|
@ -36,9 +36,9 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
|
||||
sentinel "github.com/astaxie/beego/pkg/server/web/session/redis_sentinel"
|
||||
sentinel "github.com/astaxie/beego/server/web/session/redis_sentinel"
|
||||
)
|
||||
|
||||
// DefaultPoolSize redis_sentinel default pool size
|
@ -5,7 +5,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/astaxie/beego/pkg/adapter/session"
|
||||
"github.com/astaxie/beego/adapter/session"
|
||||
)
|
||||
|
||||
func TestRedisSentinel(t *testing.T) {
|
@ -18,7 +18,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/astaxie/beego/pkg/server/web/session"
|
||||
"github.com/astaxie/beego/server/web/session"
|
||||
)
|
||||
|
||||
// CookieSessionStore Cookie SessionStore
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user