Skip to content

Commit ee535d8

Browse files
author
蒋吉兆
committed
增加在线仓库模式插件示例
1 parent f541043 commit ee535d8

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

server/go.mod

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,33 @@ module github.com/flipped-aurora/gin-vue-admin/server
33
go 1.16
44

55
require (
6-
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
76
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
87
github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible
9-
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
108
github.com/casbin/casbin/v2 v2.11.0
119
github.com/casbin/gorm-adapter/v3 v3.0.2
1210
github.com/dgrijalva/jwt-go v3.2.0+incompatible
13-
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
11+
github.com/flipped-aurora/gva-plug-email v0.0.0-20210823152517-a061eeea2d16
1412
github.com/fsnotify/fsnotify v1.4.9
1513
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6
1614
github.com/gin-gonic/gin v1.6.3
17-
github.com/go-ole/go-ole v1.2.4 // indirect
18-
github.com/go-openapi/jsonreference v0.19.6 // indirect
19-
github.com/go-openapi/spec v0.20.3 // indirect
20-
github.com/go-openapi/swag v0.19.15 // indirect
21-
github.com/go-playground/validator/v10 v10.3.0 // indirect
2215
github.com/go-redis/redis/v8 v8.11.0
2316
github.com/go-sql-driver/mysql v1.5.0
2417
github.com/gookit/color v1.3.1
25-
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
2618
github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84
27-
github.com/json-iterator/go v1.1.10 // indirect
2819
github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible
29-
github.com/lestrrat-go/strftime v1.0.3 // indirect
30-
github.com/mailru/easyjson v0.7.7 // indirect
31-
github.com/mitchellh/mapstructure v1.2.2 // indirect
3220
github.com/mojocn/base64Captcha v1.3.1
33-
github.com/pelletier/go-toml v1.6.0 // indirect
34-
github.com/pkg/errors v0.9.1 // indirect
3521
github.com/qiniu/api.v7/v7 v7.4.1
3622
github.com/robfig/cron/v3 v3.0.1
3723
github.com/satori/go.uuid v1.2.0
3824
github.com/shirou/gopsutil v3.21.1+incompatible
39-
github.com/spf13/afero v1.2.2 // indirect
40-
github.com/spf13/cast v1.3.1 // indirect
41-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
42-
github.com/spf13/pflag v1.0.5 // indirect
4325
github.com/spf13/viper v1.7.0
4426
github.com/swaggo/gin-swagger v1.3.0
4527
github.com/swaggo/swag v1.7.0
46-
github.com/tebeka/strftime v0.1.3 // indirect
4728
github.com/tencentyun/cos-go-sdk-v5 v0.7.19
4829
github.com/unrolled/secure v1.0.7
4930
github.com/xuri/excelize/v2 v2.4.1
5031
go.uber.org/zap v1.10.0
5132
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
52-
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
53-
golang.org/x/tools v0.1.5 // indirect
54-
google.golang.org/protobuf v1.24.0 // indirect
55-
gopkg.in/ini.v1 v1.55.0 // indirect
5633
gorm.io/driver/mysql v1.0.1
5734
gorm.io/gorm v1.20.7
5835
)

server/initialize/router.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package initialize
22

33
import (
4-
"github.com/flipped-aurora/gin-vue-admin/server/plugin/email"
4+
//"github.com/flipped-aurora/gva-plug-email" // 在线仓库模式
5+
"github.com/flipped-aurora/gin-vue-admin/server/plugin/email" // 本地插件仓库地址模式
56
"github.com/flipped-aurora/gin-vue-admin/server/plugin/example_plugin"
67
"net/http"
78

@@ -64,7 +65,7 @@ func Routers() *gin.Engine {
6465
// 添加开放权限的插件 示例
6566
PluginInit(PublicGroup, example_plugin.ExamplePlugin)
6667

67-
// 添加跟角色挂钩权限的插件 示例
68+
// 添加跟角色挂钩权限的插件 示例 本地示例模式于在线仓库模式注意上方的import 可以自行切换 效果相同
6869
PluginInit(PrivateGroup, email.CreateEmailPlug(
6970
global.GVA_CONFIG.Email.To,
7071
global.GVA_CONFIG.Email.From,

0 commit comments

Comments
 (0)