未验证 提交 1ebc770f 编写于 作者: C colynn.liu 提交者: GitHub

Merge pull request #114 from go-atomci/fix-58-casbin-mysql-adapter

fix: casbin mysql adapter import error
......@@ -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"
)
......
此差异已折叠。
/*
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.
先完成此消息的编辑!
想要评论请 注册