using new organization

This commit is contained in:
Ming Deng 2020-12-13 23:09:19 +08:00
parent 093f976365
commit a70f7fc920
253 changed files with 504 additions and 503 deletions

View File

@ -14,4 +14,4 @@ A complete runnable program is good.
4. What did you expect to see?
5. What did you see instead?
5. What did you see instead?

View File

@ -16,4 +16,4 @@ jobs:
stale-issue-message: 'This issue is inactive for a long time.'
stale-pr-message: 'This PR is inactive for a long time'
stale-issue-label: 'inactive-issue'
stale-pr-label: 'inactive-pr'
stale-pr-label: 'inactive-pr'

View File

@ -10,7 +10,7 @@ services:
- docker
env:
global:
- GO_REPO_FULLNAME="github.com/astaxie/beego"
- GO_REPO_FULLNAME="github.com/beego/beego"
matrix:
- ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db
- ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable"
@ -102,4 +102,4 @@ script:
- find . ! \( -path './vendor' -prune \) -type f -name '*.go' -print0 | xargs -0 gofmt -l -s
- golint ./...
addons:
postgresql: "9.6"
postgresql: "9.6"

View File

@ -71,7 +71,7 @@ do it in other way.
### Create issues
Any significant improvement should be documented as [a GitHub
issue](https://github.com/astaxie/beego/issues) before anybody
issue](https://github.com/beego/beego/issues) before anybody
starts working on it.
Also when filing an issue, make sure to answer these five questions:
@ -90,4 +90,4 @@ never hurts to add a quick "+1" or "I have this problem too". This will
help prioritize the most common problems and requests.
Also, if you don't know how to use it. please make sure you have read through
the docs in http://beego.me/docs
the docs in http://beego.me/docs

View File

@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

View File

@ -1,4 +1,4 @@
# Beego [![Build Status](https://travis-ci.org/astaxie/beego.svg?branch=master)](https://travis-ci.org/astaxie/beego) [![GoDoc](http://godoc.org/github.com/astaxie/beego?status.svg)](http://godoc.org/github.com/astaxie/beego) [![Foundation](https://img.shields.io/badge/Golang-Foundation-green.svg)](http://golangfoundation.org) [![Go Report Card](https://goreportcard.com/badge/github.com/astaxie/beego)](https://goreportcard.com/report/github.com/astaxie/beego)
# Beego [![Build Status](https://travis-ci.org/astaxie/beego.svg?branch=master)](https://travis-ci.org/astaxie/beego) [![GoDoc](http://godoc.org/github.com/beego/beego?status.svg)](http://godoc.org/github.com/beego/beego) [![Foundation](https://img.shields.io/badge/Golang-Foundation-green.svg)](http://golangfoundation.org) [![Go Report Card](https://goreportcard.com/badge/github.com/beego/beego)](https://goreportcard.com/report/github.com/beego/beego)
Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend
services.
@ -38,14 +38,14 @@ Beego is compos of four parts:
#### Download and install
go get github.com/astaxie/beego@v2.0.0
go get github.com/beego/beego@v2.0.0
#### Create file `hello.go`
```go
package main
import "github.com/astaxie/beego/server/web"
import "github.com/beego/beego/server/web"
func main() {
web.Run()

View File

@ -17,8 +17,8 @@ package adapter
import (
"time"
_ "github.com/astaxie/beego/core/admin"
"github.com/astaxie/beego/server/web"
_ "github.com/beego/beego/core/admin"
"github.com/beego/beego/server/web"
)
// FilterMonitorFunc is default monitor filter when admin module is enable.

View File

@ -17,9 +17,9 @@ package adapter
import (
"net/http"
context2 "github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
context2 "github.com/beego/beego/adapter/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
var (

View File

@ -15,8 +15,8 @@
package adapter
import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego"
"github.com/beego/beego/server/web"
)
const (

View File

@ -16,7 +16,7 @@
// Usage:
//
// import(
// "github.com/astaxie/beego/cache"
// "github.com/beego/beego/cache"
// )
//
// bm, err := cache.NewCache("memory", `{"interval":60}`)

View File

@ -18,7 +18,7 @@ import (
"context"
"time"
"github.com/astaxie/beego/client/cache"
"github.com/beego/beego/client/cache"
)
type newToOldCacheAdapter struct {

View File

@ -15,7 +15,7 @@
package cache
import (
"github.com/astaxie/beego/client/cache"
"github.com/beego/beego/client/cache"
)
// GetString convert interface to string.

View File

@ -15,7 +15,7 @@
package cache
import (
"github.com/astaxie/beego/client/cache"
"github.com/beego/beego/client/cache"
)
// NewFileCache Create new file cache with no config.

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/cache/memcache"
// "github.com/astaxie/beego/cache"
// _ "github.com/beego/beego/cache/memcache"
// "github.com/beego/beego/cache"
// )
//
// bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`)
@ -30,8 +30,8 @@
package memcache
import (
"github.com/astaxie/beego/adapter/cache"
"github.com/astaxie/beego/client/cache/memcache"
"github.com/beego/beego/adapter/cache"
"github.com/beego/beego/client/cache/memcache"
)
// NewMemCache create new memcache adapter.

View File

@ -21,7 +21,7 @@ import (
"testing"
"time"
"github.com/astaxie/beego/adapter/cache"
"github.com/beego/beego/adapter/cache"
)
func TestMemcacheCache(t *testing.T) {

View File

@ -15,7 +15,7 @@
package cache
import (
"github.com/astaxie/beego/client/cache"
"github.com/beego/beego/client/cache"
)
// NewMemoryCache returns a new MemoryCache.

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/cache/redis"
// "github.com/astaxie/beego/cache"
// _ "github.com/beego/beego/cache/redis"
// "github.com/beego/beego/cache"
// )
//
// bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
@ -30,8 +30,8 @@
package redis
import (
"github.com/astaxie/beego/adapter/cache"
redis2 "github.com/astaxie/beego/client/cache/redis"
"github.com/beego/beego/adapter/cache"
redis2 "github.com/beego/beego/client/cache/redis"
)
var (

View File

@ -22,7 +22,7 @@ import (
"github.com/gomodule/redigo/redis"
"github.com/astaxie/beego/adapter/cache"
"github.com/beego/beego/adapter/cache"
)
func TestRedisCache(t *testing.T) {

View File

@ -1,8 +1,8 @@
package ssdb
import (
"github.com/astaxie/beego/adapter/cache"
ssdb2 "github.com/astaxie/beego/client/cache/ssdb"
"github.com/beego/beego/adapter/cache"
ssdb2 "github.com/beego/beego/client/cache/ssdb"
)
// NewSsdbCache create new ssdb adapter.

View File

@ -7,7 +7,7 @@ import (
"testing"
"time"
"github.com/astaxie/beego/adapter/cache"
"github.com/beego/beego/adapter/cache"
)
func TestSsdbcacheCache(t *testing.T) {

View File

@ -15,9 +15,9 @@
package adapter
import (
"github.com/astaxie/beego/adapter/session"
newCfg "github.com/astaxie/beego/core/config"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/adapter/session"
newCfg "github.com/beego/beego/core/config"
"github.com/beego/beego/server/web"
)
// Config is the main struct for BConfig

View File

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

View File

@ -14,7 +14,7 @@
// Package config is used to parse config.
// Usage:
// import "github.com/astaxie/beego/config"
// import "github.com/beego/beego/config"
// Examples.
//
// cnf, err := config.NewConfig("ini", "config.conf")
@ -41,7 +41,7 @@
package config
import (
"github.com/astaxie/beego/core/config"
"github.com/beego/beego/core/config"
)
// Configer defines how to get and set value from configuration raw data.

View File

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

View File

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

View File

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

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/config/xml"
// "github.com/astaxie/beego/config"
// _ "github.com/beego/beego/config/xml"
// "github.com/beego/beego/config"
// )
//
// cnf, err := config.NewConfig("xml", "config.xml")
@ -30,5 +30,5 @@
package xml
import (
_ "github.com/astaxie/beego/core/config/xml"
_ "github.com/beego/beego/core/config/xml"
)

View File

@ -19,7 +19,7 @@ import (
"os"
"testing"
"github.com/astaxie/beego/adapter/config"
"github.com/beego/beego/adapter/config"
)
func TestXML(t *testing.T) {

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/config/yaml"
// "github.com/astaxie/beego/config"
// _ "github.com/beego/beego/config/yaml"
// "github.com/beego/beego/config"
// )
//
// cnf, err := config.NewConfig("yaml", "config.yaml")
@ -30,5 +30,5 @@
package yaml
import (
_ "github.com/astaxie/beego/core/config/yaml"
_ "github.com/beego/beego/core/config/yaml"
)

View File

@ -19,7 +19,7 @@ import (
"os"
"testing"
"github.com/astaxie/beego/adapter/config"
"github.com/beego/beego/adapter/config"
)
func TestYaml(t *testing.T) {

View File

@ -19,7 +19,7 @@ import (
"net/http"
"os"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
// InitGzip init the gzipcompress

View File

@ -15,7 +15,7 @@
// Package context provide the context utils
// Usage:
//
// import "github.com/astaxie/beego/context"
// import "github.com/beego/beego/context"
//
// ctx := context.Context{Request:req,ResponseWriter:rw}
//
@ -27,7 +27,7 @@ import (
"net"
"net/http"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
// commonly used mime-types

View File

@ -15,7 +15,7 @@
package context
import (
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
// BeegoInput operates the http request header, data, cookie and body.

View File

@ -15,7 +15,7 @@
package context
import (
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
// BeegoOutput does work for sending response header.

View File

@ -1,7 +1,7 @@
package context
import (
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
// Renderer defines an http response renderer

View File

@ -18,10 +18,10 @@ import (
"mime/multipart"
"net/url"
"github.com/astaxie/beego/adapter/session"
webContext "github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/adapter/session"
webContext "github.com/beego/beego/server/web/context"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
var (

View File

@ -17,10 +17,10 @@ package adapter
import (
"net/http"
"github.com/astaxie/beego/adapter/context"
beecontext "github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/adapter/context"
beecontext "github.com/beego/beego/server/web/context"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
const (

View File

@ -15,9 +15,9 @@
package adapter
import (
"github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/server/web"
beecontext "github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/adapter/context"
"github.com/beego/beego/server/web"
beecontext "github.com/beego/beego/server/web/context"
)
// FilterFunc defines a filter function which is invoked before the controller handler is executed.

View File

@ -15,7 +15,7 @@
package adapter
import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
// FlashData is a tools to maintain data when using across request.

View File

@ -18,7 +18,7 @@ import (
"net/http"
"path/filepath"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
type FileSystem web.FileSystem

View File

@ -22,7 +22,7 @@
// "net/http"
// "os"
//
// "github.com/astaxie/beego/grace"
// "github.com/beego/beego/grace"
// )
//
// func handler(w http.ResponseWriter, r *http.Request) {
@ -46,7 +46,7 @@ import (
"net/http"
"time"
"github.com/astaxie/beego/server/web/grace"
"github.com/beego/beego/server/web/grace"
)
const (

View File

@ -3,7 +3,7 @@ package grace
import (
"os"
"github.com/astaxie/beego/server/web/grace"
"github.com/beego/beego/server/web/grace"
)
// Server embedded http.Server

View File

@ -15,7 +15,7 @@
// Package httplib is used as http.Client
// Usage:
//
// import "github.com/astaxie/beego/httplib"
// import "github.com/beego/beego/httplib"
//
// b := httplib.Post("http://beego.me/")
// b.Param("username","astaxie")
@ -38,7 +38,7 @@ import (
"net/url"
"time"
"github.com/astaxie/beego/client/httplib"
"github.com/beego/beego/client/httplib"
)
// SetDefaultSetting Overwrite default settings

View File

@ -17,13 +17,13 @@ package adapter
import (
"strings"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/core/logs"
webLog "github.com/astaxie/beego/core/logs"
webLog "github.com/beego/beego/core/logs"
)
// Log levels to control the logging output.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
const (
LevelEmergency = webLog.LevelEmergency
LevelAlert = webLog.LevelAlert
@ -36,90 +36,90 @@ const (
)
// BeeLogger references the used application logger.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
var BeeLogger = logs.GetBeeLogger()
// SetLevel sets the global log level used by the simple logger.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func SetLevel(l int) {
logs.SetLevel(l)
}
// SetLogFuncCall set the CallDepth, default is 3
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func SetLogFuncCall(b bool) {
logs.SetLogFuncCall(b)
}
// SetLogger sets a new logger.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func SetLogger(adaptername string, config string) error {
return logs.SetLogger(adaptername, config)
}
// Emergency logs a message at emergency level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Emergency(v ...interface{}) {
logs.Emergency(generateFmtStr(len(v)), v...)
}
// Alert logs a message at alert level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Alert(v ...interface{}) {
logs.Alert(generateFmtStr(len(v)), v...)
}
// Critical logs a message at critical level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Critical(v ...interface{}) {
logs.Critical(generateFmtStr(len(v)), v...)
}
// Error logs a message at error level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Error(v ...interface{}) {
logs.Error(generateFmtStr(len(v)), v...)
}
// Warning logs a message at warning level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Warning(v ...interface{}) {
logs.Warning(generateFmtStr(len(v)), v...)
}
// Warn compatibility alias for Warning()
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Warn(v ...interface{}) {
logs.Warn(generateFmtStr(len(v)), v...)
}
// Notice logs a message at notice level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Notice(v ...interface{}) {
logs.Notice(generateFmtStr(len(v)), v...)
}
// Informational logs a message at info level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Informational(v ...interface{}) {
logs.Informational(generateFmtStr(len(v)), v...)
}
// Info compatibility alias for Warning()
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Info(v ...interface{}) {
logs.Info(generateFmtStr(len(v)), v...)
}
// Debug logs a message at debug level.
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Debug(v ...interface{}) {
logs.Debug(generateFmtStr(len(v)), v...)
}
// Trace logs a message at trace level.
// compatibility alias for Warning()
// Deprecated: use github.com/astaxie/beego/logs instead.
// Deprecated: use github.com/beego/beego/logs instead.
func Trace(v ...interface{}) {
logs.Trace(generateFmtStr(len(v)), v...)
}

View File

@ -15,7 +15,7 @@
package logs
import (
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/core/logs"
)
// AccessLogRecord struct for holding access log data.

View File

@ -1,5 +1,5 @@
package alils
import (
_ "github.com/astaxie/beego/core/logs/alils"
_ "github.com/beego/beego/core/logs/alils"
)

View File

@ -1,5 +1,5 @@
package es
import (
_ "github.com/astaxie/beego/core/logs/es"
_ "github.com/beego/beego/core/logs/es"
)

View File

@ -15,7 +15,7 @@
// Package logs provide a general log interface
// Usage:
//
// import "github.com/astaxie/beego/logs"
// import "github.com/beego/beego/logs"
//
// log := NewLogger(10000)
// log.SetLogger("console", "")
@ -37,7 +37,7 @@ import (
"log"
"time"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/core/logs"
)
// RFC5424 log message levels.

View File

@ -17,7 +17,7 @@ package logs
import (
"time"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/core/logs"
)
type oldToNewAdapter struct {

View File

@ -15,7 +15,7 @@
package logs
import (
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/core/logs"
)
// ColorByStatus return color by http code

View File

@ -23,9 +23,9 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/astaxie/beego"
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web"
)
func PrometheusMiddleWare(next http.Handler) http.Handler {

View File

@ -22,7 +22,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/astaxie/beego/adapter/context"
"github.com/beego/beego/adapter/context"
)
func TestPrometheusMiddleWare(t *testing.T) {

View File

@ -15,7 +15,7 @@
package migration
import (
"github.com/astaxie/beego/client/orm/migration"
"github.com/beego/beego/client/orm/migration"
)
// Index struct defines the structure of Index Columns

View File

@ -28,7 +28,7 @@
package migration
import (
"github.com/astaxie/beego/client/orm/migration"
"github.com/beego/beego/client/orm/migration"
)
// const the data format for the bee generate migration datatype

View File

@ -17,10 +17,10 @@ package adapter
import (
"net/http"
adtContext "github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/server/web/context"
adtContext "github.com/beego/beego/adapter/context"
"github.com/beego/beego/server/web/context"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
type namespaceCond func(*adtContext.Context) bool
@ -91,28 +91,28 @@ func oldToNewFilter(filter []FilterFunc) []web.FilterFunc {
}
// Router same as beego.Rourer
// refer: https://godoc.org/github.com/astaxie/beego#Router
// refer: https://godoc.org/github.com/beego/beego#Router
func (n *Namespace) Router(rootpath string, c ControllerInterface, mappingMethods ...string) *Namespace {
(*web.Namespace)(n).Router(rootpath, c, mappingMethods...)
return n
}
// AutoRouter same as beego.AutoRouter
// refer: https://godoc.org/github.com/astaxie/beego#AutoRouter
// refer: https://godoc.org/github.com/beego/beego#AutoRouter
func (n *Namespace) AutoRouter(c ControllerInterface) *Namespace {
(*web.Namespace)(n).AutoRouter(c)
return n
}
// AutoPrefix same as beego.AutoPrefix
// refer: https://godoc.org/github.com/astaxie/beego#AutoPrefix
// refer: https://godoc.org/github.com/beego/beego#AutoPrefix
func (n *Namespace) AutoPrefix(prefix string, c ControllerInterface) *Namespace {
(*web.Namespace)(n).AutoPrefix(prefix, c)
return n
}
// Get same as beego.Get
// refer: https://godoc.org/github.com/astaxie/beego#Get
// refer: https://godoc.org/github.com/beego/beego#Get
func (n *Namespace) Get(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Get(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -121,7 +121,7 @@ func (n *Namespace) Get(rootpath string, f FilterFunc) *Namespace {
}
// Post same as beego.Post
// refer: https://godoc.org/github.com/astaxie/beego#Post
// refer: https://godoc.org/github.com/beego/beego#Post
func (n *Namespace) Post(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Post(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -130,7 +130,7 @@ func (n *Namespace) Post(rootpath string, f FilterFunc) *Namespace {
}
// Delete same as beego.Delete
// refer: https://godoc.org/github.com/astaxie/beego#Delete
// refer: https://godoc.org/github.com/beego/beego#Delete
func (n *Namespace) Delete(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Delete(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -139,7 +139,7 @@ func (n *Namespace) Delete(rootpath string, f FilterFunc) *Namespace {
}
// Put same as beego.Put
// refer: https://godoc.org/github.com/astaxie/beego#Put
// refer: https://godoc.org/github.com/beego/beego#Put
func (n *Namespace) Put(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Put(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -148,7 +148,7 @@ func (n *Namespace) Put(rootpath string, f FilterFunc) *Namespace {
}
// Head same as beego.Head
// refer: https://godoc.org/github.com/astaxie/beego#Head
// refer: https://godoc.org/github.com/beego/beego#Head
func (n *Namespace) Head(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Head(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -157,7 +157,7 @@ func (n *Namespace) Head(rootpath string, f FilterFunc) *Namespace {
}
// Options same as beego.Options
// refer: https://godoc.org/github.com/astaxie/beego#Options
// refer: https://godoc.org/github.com/beego/beego#Options
func (n *Namespace) Options(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Options(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -166,7 +166,7 @@ func (n *Namespace) Options(rootpath string, f FilterFunc) *Namespace {
}
// Patch same as beego.Patch
// refer: https://godoc.org/github.com/astaxie/beego#Patch
// refer: https://godoc.org/github.com/beego/beego#Patch
func (n *Namespace) Patch(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Patch(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -175,7 +175,7 @@ func (n *Namespace) Patch(rootpath string, f FilterFunc) *Namespace {
}
// Any same as beego.Any
// refer: https://godoc.org/github.com/astaxie/beego#Any
// refer: https://godoc.org/github.com/beego/beego#Any
func (n *Namespace) Any(rootpath string, f FilterFunc) *Namespace {
(*web.Namespace)(n).Any(rootpath, func(ctx *context.Context) {
f((*adtContext.Context)(ctx))
@ -184,14 +184,14 @@ func (n *Namespace) Any(rootpath string, f FilterFunc) *Namespace {
}
// Handler same as beego.Handler
// refer: https://godoc.org/github.com/astaxie/beego#Handler
// refer: https://godoc.org/github.com/beego/beego#Handler
func (n *Namespace) Handler(rootpath string, h http.Handler) *Namespace {
(*web.Namespace)(n).Handler(rootpath, h)
return n
}
// Include add include class
// refer: https://godoc.org/github.com/astaxie/beego#Include
// refer: https://godoc.org/github.com/beego/beego#Include
func (n *Namespace) Include(cList ...ControllerInterface) *Namespace {
nL := oldToNewCtrlIntfs(cList)
(*web.Namespace)(n).Include(nL...)

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// RunCommand listen for orm command and then run it if command arguments passed.

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
var (

View File

@ -19,7 +19,7 @@ import (
"database/sql"
"time"
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// DriverType database driver constant int.

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// ResetModelCache Clean model cache. Then you can re-RegisterModel.

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// RegisterModel register models

View File

@ -17,7 +17,7 @@ package orm
import (
"time"
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// Define the Type enum

View File

@ -21,7 +21,7 @@
//
// import (
// "fmt"
// "github.com/astaxie/beego/orm"
// "github.com/beego/beego/orm"
// _ "github.com/go-sql-driver/mysql" // import your used driver
// )
//
@ -58,9 +58,9 @@ import (
"database/sql"
"errors"
"github.com/astaxie/beego/client/orm"
"github.com/astaxie/beego/client/orm/hints"
"github.com/astaxie/beego/core/utils"
"github.com/beego/beego/client/orm"
"github.com/beego/beego/client/orm/hints"
"github.com/beego/beego/core/utils"
)
// DebugQueries define the debug

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// ExprSep define the expression separation

View File

@ -17,7 +17,7 @@ package orm
import (
"io"
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// Log implement the log.Logger

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// define Col operations

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// QueryBuilder is the Query builder interface

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// CommaSpace is the separation

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// TiDBQueryBuilder is the SQL build

View File

@ -15,7 +15,7 @@
package orm
import (
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
type baseQuerySetter struct {

View File

@ -18,7 +18,7 @@ import (
"context"
"database/sql"
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
// Params stores the Params

View File

@ -21,7 +21,7 @@ import (
"strings"
"time"
"github.com/astaxie/beego/client/orm"
"github.com/beego/beego/client/orm"
)
type fn func(string) string

View File

@ -16,8 +16,8 @@
//
// Simple Usage:
// import(
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/apiauth"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/apiauth"
// )
//
// func main(){
@ -58,10 +58,10 @@ package apiauth
import (
"net/url"
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"
beego "github.com/beego/beego/adapter"
"github.com/beego/beego/adapter/context"
beecontext "github.com/beego/beego/server/web/context"
"github.com/beego/beego/server/web/filter/apiauth"
)
// AppIDToAppSecret is used to get appsecret throw appid

View File

@ -15,8 +15,8 @@
// Package auth provides handlers to enable basic auth support.
// Simple Usage:
// import(
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/auth"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/auth"
// )
//
// func main(){
@ -38,10 +38,10 @@ package auth
import (
"net/http"
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"
beego "github.com/beego/beego/adapter"
"github.com/beego/beego/adapter/context"
beecontext "github.com/beego/beego/server/web/context"
"github.com/beego/beego/server/web/filter/auth"
)
// Basic is the http basic auth

View File

@ -15,8 +15,8 @@
// Package authz provides handlers to enable ACL, RBAC, ABAC authorization support.
// Simple Usage:
// import(
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/authz"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/authz"
// "github.com/casbin/casbin"
// )
//
@ -44,10 +44,10 @@ import (
"github.com/casbin/casbin"
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"
beego "github.com/beego/beego/adapter"
"github.com/beego/beego/adapter/context"
beecontext "github.com/beego/beego/server/web/context"
"github.com/beego/beego/server/web/filter/authz"
)
// NewAuthorizer returns the authorizer.

View File

@ -11,4 +11,4 @@ g = _, _
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && (r.act == p.act || p.act == "*")
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && (r.act == p.act || p.act == "*")

View File

@ -4,4 +4,4 @@ p, bob, /dataset2/resource1, *
p, bob, /dataset2/resource2, GET
p, bob, /dataset2/folder1/*, POST
p, dataset1_admin, /dataset1/*, *
g, cathy, dataset1_admin
g, cathy, dataset1_admin

1 p, alice, /dataset1/*, GET
4 p, bob, /dataset2/resource2, GET
5 p, bob, /dataset2/folder1/*, POST
6 p, dataset1_admin, /dataset1/*, *
7 g, cathy, dataset1_admin

View File

@ -19,9 +19,9 @@ import (
"net/http/httptest"
"testing"
beego "github.com/astaxie/beego/adapter"
"github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/adapter/plugins/auth"
beego "github.com/beego/beego/adapter"
"github.com/beego/beego/adapter/context"
"github.com/beego/beego/adapter/plugins/auth"
"github.com/casbin/casbin"
)

View File

@ -15,8 +15,8 @@
// Package cors provides handlers to enable CORS support.
// Usage
// import (
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/cors"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/cors"
// )
//
// func main() {
@ -36,11 +36,11 @@
package cors
import (
beego "github.com/astaxie/beego/adapter"
beecontext "github.com/astaxie/beego/server/web/context"
"github.com/astaxie/beego/server/web/filter/cors"
beego "github.com/beego/beego/adapter"
beecontext "github.com/beego/beego/server/web/context"
"github.com/beego/beego/server/web/filter/cors"
"github.com/astaxie/beego/adapter/context"
"github.com/beego/beego/adapter/context"
)
// Options represents Access Control options.

View File

@ -15,9 +15,9 @@
package adapter
import (
"github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/server/web"
beecontext "github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/adapter/context"
"github.com/beego/beego/server/web"
beecontext "github.com/beego/beego/server/web/context"
)
// PolicyFunc defines a policy function which is invoked before the controller handler is executed.

View File

@ -18,10 +18,10 @@ import (
"net/http"
"time"
beecontext "github.com/astaxie/beego/adapter/context"
"github.com/astaxie/beego/server/web/context"
beecontext "github.com/beego/beego/adapter/context"
"github.com/beego/beego/server/web/context"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
// default filter execution points

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/couchbase"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/couchbase"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -36,8 +36,8 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
beecb "github.com/astaxie/beego/server/web/session/couchbase"
"github.com/beego/beego/adapter/session"
beecb "github.com/beego/beego/server/web/session/couchbase"
)
// SessionStore store each session

View File

@ -5,8 +5,8 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
beeLedis "github.com/astaxie/beego/server/web/session/ledis"
"github.com/beego/beego/adapter/session"
beeLedis "github.com/beego/beego/server/web/session/ledis"
)
// SessionStore ledis session store

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/memcache"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/memcache"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -36,9 +36,9 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
beemem "github.com/astaxie/beego/server/web/session/memcache"
beemem "github.com/beego/beego/server/web/session/memcache"
)
// SessionStore memcache session store

View File

@ -28,8 +28,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/mysql"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/mysql"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -44,8 +44,8 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/astaxie/beego/server/web/session/mysql"
"github.com/beego/beego/adapter/session"
"github.com/beego/beego/server/web/session/mysql"
// import mysql driver
_ "github.com/go-sql-driver/mysql"

View File

@ -38,8 +38,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/postgresql"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/postgresql"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -54,11 +54,11 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
// import postgresql Driver
_ "github.com/lib/pq"
"github.com/astaxie/beego/server/web/session/postgres"
"github.com/beego/beego/server/web/session/postgres"
)
// SessionStore postgresql session store

View File

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

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/redis"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/redis"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -36,9 +36,9 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
beeRedis "github.com/astaxie/beego/server/web/session/redis"
beeRedis "github.com/beego/beego/server/web/session/redis"
)
// MaxPoolSize redis max pool size

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/redis_cluster"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/redis_cluster"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -36,8 +36,8 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
cluster "github.com/astaxie/beego/server/web/session/redis_cluster"
"github.com/beego/beego/adapter/session"
cluster "github.com/beego/beego/server/web/session/redis_cluster"
)
// MaxPoolSize redis_cluster max pool size

View File

@ -20,8 +20,8 @@
//
// Usage:
// import(
// _ "github.com/astaxie/beego/session/redis_sentinel"
// "github.com/astaxie/beego/session"
// _ "github.com/beego/beego/session/redis_sentinel"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -36,9 +36,9 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
sentinel "github.com/astaxie/beego/server/web/session/redis_sentinel"
sentinel "github.com/beego/beego/server/web/session/redis_sentinel"
)
// DefaultPoolSize redis_sentinel default pool size

View File

@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
)
func TestRedisSentinel(t *testing.T) {

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
//
// Usage:
// import(
// "github.com/astaxie/beego/session"
// "github.com/beego/beego/session"
// )
//
// func init() {
@ -32,7 +32,7 @@ import (
"net/http"
"os"
"github.com/astaxie/beego/server/web/session"
"github.com/beego/beego/server/web/session"
)
// Store contains all data for one session process with specific id.

View File

@ -4,9 +4,9 @@ import (
"context"
"net/http"
"github.com/astaxie/beego/adapter/session"
"github.com/beego/beego/adapter/session"
beeSsdb "github.com/astaxie/beego/server/web/session/ssdb"
beeSsdb "github.com/beego/beego/server/web/session/ssdb"
)
// Provider holds ssdb client and configs

View File

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

View File

@ -21,7 +21,7 @@
package swagger
import (
"github.com/astaxie/beego/server/web/swagger"
"github.com/beego/beego/server/web/swagger"
)
// Swagger list the resource

View File

@ -19,7 +19,7 @@ import (
"io"
"net/http"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
// ExecuteTemplate applies the template with name to the specified data object,

View File

@ -19,7 +19,7 @@ import (
"net/url"
"time"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)
const (

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