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