Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
7032064f
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
10 个月 前同步成功
通知
324
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7032064f
编写于
5月 22, 2023
作者:
W
WWater
提交者:
GitHub
5月 22, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix go mod (#1421)
上级
70ace27b
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
88 addition
and
67 deletion
+88
-67
server/go.mod
server/go.mod
+23
-17
server/go.sum
server/go.sum
+53
-38
server/model/system/request/jwt.go
server/model/system/request/jwt.go
+1
-1
server/model/system/sys_user.go
server/model/system/sys_user.go
+1
-1
server/service/system/sys_initdb_mysql.go
server/service/system/sys_initdb_mysql.go
+2
-2
server/service/system/sys_initdb_pgsql.go
server/service/system/sys_initdb_pgsql.go
+2
-2
server/service/system/sys_user.go
server/service/system/sys_user.go
+2
-2
server/source/system/user.go
server/source/system/user.go
+3
-3
server/utils/clamis.go
server/utils/clamis.go
+1
-1
未找到文件。
server/go.mod
浏览文件 @
7032064f
...
...
@@ -11,9 +11,10 @@ require (
github.com/flipped-aurora/ws v1.0.2
github.com/fsnotify/fsnotify v1.4.9
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6
github.com/gin-gonic/gin v1.
7
.0
github.com/gin-gonic/gin v1.
9
.0
github.com/go-redis/redis/v8 v8.11.4
github.com/go-sql-driver/mysql v1.6.0
github.com/gofrs/uuid v4.0.0+incompatible
github.com/golang-jwt/jwt/v4 v4.3.0
github.com/gookit/color v1.3.1
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.21.8+incompatible
...
...
@@ -25,19 +26,18 @@ require (
github.com/qiniu/api.v7/v7 v7.4.1
github.com/robfig/cron/v3 v3.0.1
github.com/sashabaranov/go-openai v1.5.7
github.com/satori/go.uuid v1.2.0
github.com/shirou/gopsutil/v3 v3.22.5
github.com/songzhibin97/gkit v1.2.7
github.com/spf13/viper v1.7.0
github.com/stretchr/testify v1.
7
.1
github.com/stretchr/testify v1.
8
.1
github.com/swaggo/gin-swagger v1.3.0
github.com/swaggo/swag v1.7.0
github.com/tencentyun/cos-go-sdk-v5 v0.7.19
github.com/unrolled/secure v1.0.7
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.
0.0-20220411220226-7b82a4e95df4
golang.org/x/sync v0.0.0-202
10220032951-036812b2e83c
golang.org/x/text v0.
3.7
golang.org/x/crypto v0.
5.0
golang.org/x/sync v0.0.0-202
20722155255-886fb9371eb4
golang.org/x/text v0.
7.0
gorm.io/driver/mysql v1.3.3
gorm.io/driver/postgres v1.3.4
gorm.io/driver/sqlserver v1.3.2
...
...
@@ -51,7 +51,9 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/bytedance/sonic v1.8.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denisenkom/go-mssqldb v0.12.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
...
...
@@ -63,13 +65,13 @@ require (
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.3 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.10.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
...
...
@@ -87,17 +89,19 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lestrrat-go/strftime v1.0.6 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.1
4
// indirect
github.com/mattn/go-isatty v0.0.1
7
// indirect
github.com/mitchellh/mapstructure v1.2.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
...
...
@@ -108,20 +112,22 @@ require (
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.9 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/net v0.
0.0-20211216030914-fe4d6282115f
// indirect
golang.org/x/sys v0.
0.0-20220412211240-33da011f77ad
// indirect
golang.org/x/net v0.
7.0
// indirect
golang.org/x/sys v0.
5.0
// indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
golang.org/x/tools v0.1.
5
// indirect
google.golang.org/protobuf v1.2
7
.1 // indirect
golang.org/x/tools v0.1.
12
// indirect
google.golang.org/protobuf v1.2
8
.1 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.
0
// indirect
gopkg.in/yaml.v3 v3.0.
1
// indirect
gorm.io/plugin/dbresolver v1.1.0 // indirect
modernc.org/libc v1.15.1 // indirect
modernc.org/mathutil v1.4.1 // indirect
...
...
server/go.sum
浏览文件 @
7032064f
此差异已折叠。
点击以展开。
server/model/system/request/jwt.go
浏览文件 @
7032064f
package
request
import
(
"github.com/gofrs/uuid"
jwt
"github.com/golang-jwt/jwt/v4"
uuid
"github.com/satori/go.uuid"
)
// Custom claims structure
...
...
server/model/system/sys_user.go
浏览文件 @
7032064f
...
...
@@ -2,7 +2,7 @@ package system
import
(
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/
satori/go.
uuid"
"github.com/
gofrs/
uuid"
)
type
SysUser
struct
{
...
...
server/service/system/sys_initdb_mysql.go
浏览文件 @
7032064f
...
...
@@ -13,7 +13,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
uuid
"github.com/satori/go.
uuid"
"github.com/gofrs/
uuid"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
...
...
@@ -32,7 +32,7 @@ func (h MysqlInitHandler) WriteConfig(ctx context.Context) error {
}
global
.
GVA_CONFIG
.
System
.
DbType
=
"mysql"
global
.
GVA_CONFIG
.
Mysql
=
c
global
.
GVA_CONFIG
.
JWT
.
SigningKey
=
uuid
.
NewV4
(
)
.
String
()
global
.
GVA_CONFIG
.
JWT
.
SigningKey
=
uuid
.
Must
(
uuid
.
NewV4
()
)
.
String
()
cs
:=
utils
.
StructToMap
(
global
.
GVA_CONFIG
)
for
k
,
v
:=
range
cs
{
global
.
GVA_VP
.
Set
(
k
,
v
)
...
...
server/service/system/sys_initdb_pgsql.go
浏览文件 @
7032064f
...
...
@@ -13,7 +13,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
uuid
"github.com/satori/go.
uuid"
"github.com/gofrs/
uuid"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
...
...
@@ -32,7 +32,7 @@ func (h PgsqlInitHandler) WriteConfig(ctx context.Context) error {
}
global
.
GVA_CONFIG
.
System
.
DbType
=
"pgsql"
global
.
GVA_CONFIG
.
Pgsql
=
c
global
.
GVA_CONFIG
.
JWT
.
SigningKey
=
uuid
.
NewV4
(
)
.
String
()
global
.
GVA_CONFIG
.
JWT
.
SigningKey
=
uuid
.
Must
(
uuid
.
NewV4
()
)
.
String
()
cs
:=
utils
.
StructToMap
(
global
.
GVA_CONFIG
)
for
k
,
v
:=
range
cs
{
global
.
GVA_VP
.
Set
(
k
,
v
)
...
...
server/service/system/sys_user.go
浏览文件 @
7032064f
...
...
@@ -9,7 +9,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
uuid
"github.com/satori/go.
uuid"
"github.com/gofrs/
uuid"
"gorm.io/gorm"
)
...
...
@@ -28,7 +28,7 @@ func (userService *UserService) Register(u system.SysUser) (userInter system.Sys
}
// 否则 附加uuid 密码hash加密 注册
u
.
Password
=
utils
.
BcryptHash
(
u
.
Password
)
u
.
UUID
=
uuid
.
NewV4
(
)
u
.
UUID
=
uuid
.
Must
(
uuid
.
NewV4
()
)
err
=
global
.
GVA_DB
.
Create
(
&
u
)
.
Error
return
u
,
err
}
...
...
server/source/system/user.go
浏览文件 @
7032064f
...
...
@@ -5,8 +5,8 @@ import (
sysModel
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
uuid
"github.com/satori/go.uuid"
"gorm.io/gorm"
)
...
...
@@ -49,7 +49,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
entities
:=
[]
sysModel
.
SysUser
{
{
UUID
:
uuid
.
NewV4
(
),
UUID
:
uuid
.
Must
(
uuid
.
NewV4
()
),
Username
:
"admin"
,
Password
:
adminPassword
,
NickName
:
"Mr.奇淼"
,
...
...
@@ -59,7 +59,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
Email
:
"333333333@qq.com"
,
},
{
UUID
:
uuid
.
NewV4
(
),
UUID
:
uuid
.
Must
(
uuid
.
NewV4
()
),
Username
:
"a303176530"
,
Password
:
password
,
NickName
:
"用户1"
,
...
...
server/utils/clamis.go
浏览文件 @
7032064f
...
...
@@ -4,7 +4,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
systemReq
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
"github.com/gin-gonic/gin"
uuid
"github.com/satori/go.
uuid"
"github.com/gofrs/
uuid"
)
func
GetClaims
(
c
*
gin
.
Context
)
(
*
systemReq
.
CustomClaims
,
error
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录