提交 3adf3e3c 编写于 作者: C colynn

Merge branch 'fix-58-casbin-mysql-adapter' into feat-89-scm-table-added

......@@ -22,10 +22,13 @@ import (
"github.com/astaxie/beego"
_ "github.com/go-sql-driver/mysql" // import your used driver
"github.com/go-atomci/atomci/internal/cronjob"
_ "github.com/casbin/beego-orm-adapter/v2"
_ "github.com/go-atomci/atomci/internal/models"
_ "github.com/go-atomci/atomci/internal/initialize"
_ "github.com/go-atomci/atomci/internal/migrations"
_ "github.com/go-atomci/atomci/internal/models"
"github.com/go-atomci/atomci/internal/cronjob"
"github.com/go-atomci/atomci/internal/routers"
)
......
......@@ -32,7 +32,7 @@ replace (
require (
github.com/astaxie/beego v1.12.1
github.com/casbin/beego-orm-adapter/v3 v3.0.2
github.com/casbin/beego-orm-adapter/v2 v2.0.2
github.com/casbin/casbin/v2 v2.37.4
github.com/colynn/go-ldap-client/v3 v3.0.0-20201016034829-4c1455a490de
github.com/dgrijalva/jwt-go v3.2.0+incompatible
......@@ -48,7 +48,9 @@ require (
github.com/isbrick/tools v0.0.0-20211027093338-a3a0ded37175
github.com/jarcoal/httpmock v1.1.0
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pborman/uuid v1.2.0
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
......
此差异已折叠。
/*
Copyright 2021 The AtomCI Group Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
*/
package mycasbin
// CasbinRule ..
type CasbinRule struct {
ID uint `gorm:"primaryKey;autoIncrement"`
Ptype string `gorm:"size:512"`
V0 string `gorm:"size:512"`
V1 string `gorm:"size:512"`
V2 string `gorm:"size:512"`
V3 string `gorm:"size:512"`
V4 string `gorm:"size:512"`
V5 string `gorm:"size:512"`
}
// TableName ..
func (CasbinRule) TableName() string {
return "casbin_rule"
}
......@@ -17,11 +17,12 @@ limitations under the License.
package mycasbin
import (
glog "log"
"github.com/astaxie/beego"
"github.com/go-atomci/atomci/internal/middleware/log"
glog "log"
beegoormadapter "github.com/casbin/beego-orm-adapter/v3"
beegoormadapter "github.com/casbin/beego-orm-adapter/v2"
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
_ "github.com/go-sql-driver/mysql"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册