ljw 1 год назад
Родитель
Сommit
5609a1a618

+ 74 - 6
cmd/apimain.go

@@ -14,6 +14,9 @@ import (
14 14
 	"fmt"
15 15
 	"github.com/go-redis/redis/v8"
16 16
 	"github.com/nicksnyder/go-i18n/v2/i18n"
17
+	"github.com/spf13/cobra"
18
+	"os"
19
+	"strconv"
17 20
 )
18 21
 
19 22
 // @title 管理系统API
@@ -26,9 +29,79 @@ import (
26 29
 // @securitydefinitions.apikey BearerAuth
27 30
 // @in header
28 31
 // @name Authorization
32
+
33
+var rootCmd = &cobra.Command{
34
+	Use:   "apimain",
35
+	Short: "RUSTDESK API SERVER",
36
+	PersistentPreRun: func(cmd *cobra.Command, args []string) {
37
+		InitGlobal()
38
+	},
39
+	Run: func(cmd *cobra.Command, args []string) {
40
+		//gin
41
+		http.ApiInit()
42
+	},
43
+}
44
+
45
+var resetPwdCmd = &cobra.Command{
46
+	Use:     "reset-admin-pwd [pwd]",
47
+	Example: "reset-admin-pwd 123456",
48
+	Short:   "Reset Admin Password",
49
+	Args:    cobra.ExactArgs(1),
50
+	Run: func(cmd *cobra.Command, args []string) {
51
+		pwd := args[0]
52
+		admin := service.AllService.UserService.InfoById(1)
53
+		err := service.AllService.UserService.UpdatePassword(admin, pwd)
54
+		if err != nil {
55
+			fmt.Printf("reset password fail! %v \n", err)
56
+			return
57
+		}
58
+		fmt.Printf("reset password success! \n")
59
+	},
60
+}
61
+var resetUserPwdCmd = &cobra.Command{
62
+	Use:     "reset-pwd [userId] [pwd]",
63
+	Example: "reset-pwd 2 123456",
64
+	Short:   "Reset User Password",
65
+	Args:    cobra.ExactArgs(2),
66
+	Run: func(cmd *cobra.Command, args []string) {
67
+		userId := args[0]
68
+		pwd := args[1]
69
+		uid, err := strconv.Atoi(userId)
70
+		if err != nil {
71
+			fmt.Printf("userId must be int! \n")
72
+			return
73
+		}
74
+		if uid <= 0 {
75
+			fmt.Printf("userId must be greater than 0! \n")
76
+			return
77
+		}
78
+		u := service.AllService.UserService.InfoById(uint(uid))
79
+		err = service.AllService.UserService.UpdatePassword(u, pwd)
80
+		if err != nil {
81
+			fmt.Printf("reset password fail! %v \n", err)
82
+			return
83
+		}
84
+		fmt.Printf("reset password success! \n")
85
+	},
86
+}
87
+
88
+func init() {
89
+	rootCmd.PersistentFlags().StringVarP(&global.ConfigPath, "config", "c", "./conf/config.yaml", "choose config file")
90
+	rootCmd.AddCommand(resetPwdCmd, resetUserPwdCmd)
91
+}
29 92
 func main() {
93
+	if err := rootCmd.Execute(); err != nil {
94
+		fmt.Println(err)
95
+		os.Exit(1)
96
+	}
97
+}
98
+
99
+func InitGlobal() {
30 100
 	//配置解析
31
-	global.Viper = config.Init(&global.Config)
101
+	global.Viper = config.Init(&global.Config, global.ConfigPath)
102
+
103
+	//从配置文件中加载密钥
104
+	config.LoadKeyFile(&global.Config.Rustdesk)
32 105
 
33 106
 	//日志
34 107
 	global.Logger = logger.New(&logger.Config{
@@ -94,12 +167,7 @@ func main() {
94 167
 
95 168
 	//locker
96 169
 	global.Lock = lock.NewLocal()
97
-
98
-	//gin
99
-	http.ApiInit()
100
-
101 170
 }
102
-
103 171
 func DatabaseAutoUpdate() {
104 172
 	version := 246
105 173
 

+ 6 - 10
config/config.go

@@ -1,7 +1,6 @@
1 1
 package config
2 2
 
3 3
 import (
4
-	"flag"
5 4
 	"fmt"
6 5
 	"github.com/fsnotify/fsnotify"
7 6
 	"github.com/spf13/viper"
@@ -35,18 +34,15 @@ type Config struct {
35 34
 }
36 35
 
37 36
 // Init 初始化配置
38
-func Init(rowVal interface{}) *viper.Viper {
39
-	var config string
40
-	flag.StringVar(&config, "c", "", "choose config file.")
41
-	flag.Parse()
42
-	if config == "" { // 优先级: 命令行 > 默认值
43
-		config = DefaultConfig
37
+func Init(rowVal interface{}, path string) *viper.Viper {
38
+	if path == "" {
39
+		path = DefaultConfig
44 40
 	}
45
-	v := viper.New()
41
+	v := viper.GetViper()
46 42
 	v.AutomaticEnv()
47 43
 	v.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
48 44
 	v.SetEnvPrefix("RUSTDESK_API")
49
-	v.SetConfigFile(config)
45
+	v.SetConfigFile(path)
50 46
 	v.SetConfigType("yaml")
51 47
 	err := v.ReadInConfig()
52 48
 	if err != nil {
@@ -63,7 +59,7 @@ func Init(rowVal interface{}) *viper.Viper {
63 59
 	if err := v.Unmarshal(rowVal); err != nil {
64 60
 		fmt.Println(err)
65 61
 	}
66
-	LoadKeyFile(&rowVal.(*Config).Rustdesk)
62
+
67 63
 	return v
68 64
 }
69 65
 

+ 117 - 5
docs/admin/admin_docs.go

@@ -3067,6 +3067,90 @@ const docTemplateadmin = `{
3067 3067
                 }
3068 3068
             }
3069 3069
         },
3070
+        "/admin/user/myPeer": {
3071
+            "get": {
3072
+                "security": [
3073
+                    {
3074
+                        "token": []
3075
+                    }
3076
+                ],
3077
+                "description": "设备列表",
3078
+                "consumes": [
3079
+                    "application/json"
3080
+                ],
3081
+                "produces": [
3082
+                    "application/json"
3083
+                ],
3084
+                "tags": [
3085
+                    "设备"
3086
+                ],
3087
+                "summary": "设备列表",
3088
+                "parameters": [
3089
+                    {
3090
+                        "type": "integer",
3091
+                        "description": "页码",
3092
+                        "name": "page",
3093
+                        "in": "query"
3094
+                    },
3095
+                    {
3096
+                        "type": "integer",
3097
+                        "description": "页大小",
3098
+                        "name": "page_size",
3099
+                        "in": "query"
3100
+                    },
3101
+                    {
3102
+                        "type": "integer",
3103
+                        "description": "时间",
3104
+                        "name": "time_ago",
3105
+                        "in": "query"
3106
+                    },
3107
+                    {
3108
+                        "type": "string",
3109
+                        "description": "ID",
3110
+                        "name": "id",
3111
+                        "in": "query"
3112
+                    },
3113
+                    {
3114
+                        "type": "string",
3115
+                        "description": "主机名",
3116
+                        "name": "hostname",
3117
+                        "in": "query"
3118
+                    },
3119
+                    {
3120
+                        "type": "string",
3121
+                        "description": "uuids 用逗号分隔",
3122
+                        "name": "uuids",
3123
+                        "in": "query"
3124
+                    }
3125
+                ],
3126
+                "responses": {
3127
+                    "200": {
3128
+                        "description": "OK",
3129
+                        "schema": {
3130
+                            "allOf": [
3131
+                                {
3132
+                                    "$ref": "#/definitions/response.Response"
3133
+                                },
3134
+                                {
3135
+                                    "type": "object",
3136
+                                    "properties": {
3137
+                                        "data": {
3138
+                                            "$ref": "#/definitions/model.PeerList"
3139
+                                        }
3140
+                                    }
3141
+                                }
3142
+                            ]
3143
+                        }
3144
+                    },
3145
+                    "500": {
3146
+                        "description": "Internal Server Error",
3147
+                        "schema": {
3148
+                            "$ref": "#/definitions/response.Response"
3149
+                        }
3150
+                    }
3151
+                }
3152
+            }
3153
+        },
3070 3154
         "/admin/user/update": {
3071 3155
             "post": {
3072 3156
                 "security": [
@@ -3407,6 +3491,12 @@ const docTemplateadmin = `{
3407 3491
         "admin.LoginPayload": {
3408 3492
             "type": "object",
3409 3493
             "properties": {
3494
+                "avatar": {
3495
+                    "type": "string"
3496
+                },
3497
+                "email": {
3498
+                    "type": "string"
3499
+                },
3410 3500
                 "nickname": {
3411 3501
                     "type": "string"
3412 3502
                 },
@@ -3429,7 +3519,7 @@ const docTemplateadmin = `{
3429 3519
             "required": [
3430 3520
                 "client_id",
3431 3521
                 "client_secret",
3432
-                "op",
3522
+                "oauth_type",
3433 3523
                 "redirect_url"
3434 3524
             ],
3435 3525
             "properties": {
@@ -3448,6 +3538,9 @@ const docTemplateadmin = `{
3448 3538
                 "issuer": {
3449 3539
                     "type": "string"
3450 3540
                 },
3541
+                "oauth_type": {
3542
+                    "type": "string"
3543
+                },
3451 3544
                 "op": {
3452 3545
                     "type": "string"
3453 3546
                 },
@@ -3567,6 +3660,10 @@ const docTemplateadmin = `{
3567 3660
                 "avatar": {
3568 3661
                     "type": "string"
3569 3662
                 },
3663
+                "email": {
3664
+                    "description": "validate:\"required,email\" email不强制",
3665
+                    "type": "string"
3666
+                },
3570 3667
                 "group_id": {
3571 3668
                     "type": "integer"
3572 3669
                 },
@@ -3591,18 +3688,18 @@ const docTemplateadmin = `{
3591 3688
                 "username": {
3592 3689
                     "type": "string",
3593 3690
                     "maxLength": 10,
3594
-                    "minLength": 4
3691
+                    "minLength": 2
3595 3692
                 }
3596 3693
             }
3597 3694
         },
3598 3695
         "admin.UserOauthItem": {
3599 3696
             "type": "object",
3600 3697
             "properties": {
3698
+                "op": {
3699
+                    "type": "string"
3700
+                },
3601 3701
                 "status": {
3602 3702
                     "type": "integer"
3603
-                },
3604
-                "third_type": {
3605
-                    "type": "string"
3606 3703
                 }
3607 3704
             }
3608 3705
         },
@@ -3973,6 +4070,9 @@ const docTemplateadmin = `{
3973 4070
                 "created_at": {
3974 4071
                     "type": "string"
3975 4072
                 },
4073
+                "device_id": {
4074
+                    "type": "string"
4075
+                },
3976 4076
                 "id": {
3977 4077
                     "type": "integer"
3978 4078
                 },
@@ -4042,6 +4142,9 @@ const docTemplateadmin = `{
4042 4142
                 "issuer": {
4043 4143
                     "type": "string"
4044 4144
                 },
4145
+                "oauth_type": {
4146
+                    "type": "string"
4147
+                },
4045 4148
                 "op": {
4046 4149
                     "type": "string"
4047 4150
                 },
@@ -4220,6 +4323,9 @@ const docTemplateadmin = `{
4220 4323
                 "created_at": {
4221 4324
                     "type": "string"
4222 4325
                 },
4326
+                "email": {
4327
+                    "type": "string"
4328
+                },
4223 4329
                 "group_id": {
4224 4330
                     "type": "integer"
4225 4331
                 },
@@ -4269,6 +4375,12 @@ const docTemplateadmin = `{
4269 4375
                 "created_at": {
4270 4376
                     "type": "string"
4271 4377
                 },
4378
+                "device_id": {
4379
+                    "type": "string"
4380
+                },
4381
+                "device_uuid": {
4382
+                    "type": "string"
4383
+                },
4272 4384
                 "expired_at": {
4273 4385
                     "type": "integer"
4274 4386
                 },

+ 117 - 5
docs/admin/admin_swagger.json

@@ -3060,6 +3060,90 @@
3060 3060
                 }
3061 3061
             }
3062 3062
         },
3063
+        "/admin/user/myPeer": {
3064
+            "get": {
3065
+                "security": [
3066
+                    {
3067
+                        "token": []
3068
+                    }
3069
+                ],
3070
+                "description": "设备列表",
3071
+                "consumes": [
3072
+                    "application/json"
3073
+                ],
3074
+                "produces": [
3075
+                    "application/json"
3076
+                ],
3077
+                "tags": [
3078
+                    "设备"
3079
+                ],
3080
+                "summary": "设备列表",
3081
+                "parameters": [
3082
+                    {
3083
+                        "type": "integer",
3084
+                        "description": "页码",
3085
+                        "name": "page",
3086
+                        "in": "query"
3087
+                    },
3088
+                    {
3089
+                        "type": "integer",
3090
+                        "description": "页大小",
3091
+                        "name": "page_size",
3092
+                        "in": "query"
3093
+                    },
3094
+                    {
3095
+                        "type": "integer",
3096
+                        "description": "时间",
3097
+                        "name": "time_ago",
3098
+                        "in": "query"
3099
+                    },
3100
+                    {
3101
+                        "type": "string",
3102
+                        "description": "ID",
3103
+                        "name": "id",
3104
+                        "in": "query"
3105
+                    },
3106
+                    {
3107
+                        "type": "string",
3108
+                        "description": "主机名",
3109
+                        "name": "hostname",
3110
+                        "in": "query"
3111
+                    },
3112
+                    {
3113
+                        "type": "string",
3114
+                        "description": "uuids 用逗号分隔",
3115
+                        "name": "uuids",
3116
+                        "in": "query"
3117
+                    }
3118
+                ],
3119
+                "responses": {
3120
+                    "200": {
3121
+                        "description": "OK",
3122
+                        "schema": {
3123
+                            "allOf": [
3124
+                                {
3125
+                                    "$ref": "#/definitions/response.Response"
3126
+                                },
3127
+                                {
3128
+                                    "type": "object",
3129
+                                    "properties": {
3130
+                                        "data": {
3131
+                                            "$ref": "#/definitions/model.PeerList"
3132
+                                        }
3133
+                                    }
3134
+                                }
3135
+                            ]
3136
+                        }
3137
+                    },
3138
+                    "500": {
3139
+                        "description": "Internal Server Error",
3140
+                        "schema": {
3141
+                            "$ref": "#/definitions/response.Response"
3142
+                        }
3143
+                    }
3144
+                }
3145
+            }
3146
+        },
3063 3147
         "/admin/user/update": {
3064 3148
             "post": {
3065 3149
                 "security": [
@@ -3400,6 +3484,12 @@
3400 3484
         "admin.LoginPayload": {
3401 3485
             "type": "object",
3402 3486
             "properties": {
3487
+                "avatar": {
3488
+                    "type": "string"
3489
+                },
3490
+                "email": {
3491
+                    "type": "string"
3492
+                },
3403 3493
                 "nickname": {
3404 3494
                     "type": "string"
3405 3495
                 },
@@ -3422,7 +3512,7 @@
3422 3512
             "required": [
3423 3513
                 "client_id",
3424 3514
                 "client_secret",
3425
-                "op",
3515
+                "oauth_type",
3426 3516
                 "redirect_url"
3427 3517
             ],
3428 3518
             "properties": {
@@ -3441,6 +3531,9 @@
3441 3531
                 "issuer": {
3442 3532
                     "type": "string"
3443 3533
                 },
3534
+                "oauth_type": {
3535
+                    "type": "string"
3536
+                },
3444 3537
                 "op": {
3445 3538
                     "type": "string"
3446 3539
                 },
@@ -3560,6 +3653,10 @@
3560 3653
                 "avatar": {
3561 3654
                     "type": "string"
3562 3655
                 },
3656
+                "email": {
3657
+                    "description": "validate:\"required,email\" email不强制",
3658
+                    "type": "string"
3659
+                },
3563 3660
                 "group_id": {
3564 3661
                     "type": "integer"
3565 3662
                 },
@@ -3584,18 +3681,18 @@
3584 3681
                 "username": {
3585 3682
                     "type": "string",
3586 3683
                     "maxLength": 10,
3587
-                    "minLength": 4
3684
+                    "minLength": 2
3588 3685
                 }
3589 3686
             }
3590 3687
         },
3591 3688
         "admin.UserOauthItem": {
3592 3689
             "type": "object",
3593 3690
             "properties": {
3691
+                "op": {
3692
+                    "type": "string"
3693
+                },
3594 3694
                 "status": {
3595 3695
                     "type": "integer"
3596
-                },
3597
-                "third_type": {
3598
-                    "type": "string"
3599 3696
                 }
3600 3697
             }
3601 3698
         },
@@ -3966,6 +4063,9 @@
3966 4063
                 "created_at": {
3967 4064
                     "type": "string"
3968 4065
                 },
4066
+                "device_id": {
4067
+                    "type": "string"
4068
+                },
3969 4069
                 "id": {
3970 4070
                     "type": "integer"
3971 4071
                 },
@@ -4035,6 +4135,9 @@
4035 4135
                 "issuer": {
4036 4136
                     "type": "string"
4037 4137
                 },
4138
+                "oauth_type": {
4139
+                    "type": "string"
4140
+                },
4038 4141
                 "op": {
4039 4142
                     "type": "string"
4040 4143
                 },
@@ -4213,6 +4316,9 @@
4213 4316
                 "created_at": {
4214 4317
                     "type": "string"
4215 4318
                 },
4319
+                "email": {
4320
+                    "type": "string"
4321
+                },
4216 4322
                 "group_id": {
4217 4323
                     "type": "integer"
4218 4324
                 },
@@ -4262,6 +4368,12 @@
4262 4368
                 "created_at": {
4263 4369
                     "type": "string"
4264 4370
                 },
4371
+                "device_id": {
4372
+                    "type": "string"
4373
+                },
4374
+                "device_uuid": {
4375
+                    "type": "string"
4376
+                },
4265 4377
                 "expired_at": {
4266 4378
                     "type": "integer"
4267 4379
                 },

+ 74 - 4
docs/admin/admin_swagger.yaml

@@ -84,6 +84,10 @@ definitions:
84 84
     type: object
85 85
   admin.LoginPayload:
86 86
     properties:
87
+      avatar:
88
+        type: string
89
+      email:
90
+        type: string
87 91
       nickname:
88 92
         type: string
89 93
       route_names:
@@ -107,6 +111,8 @@ definitions:
107 111
         type: integer
108 112
       issuer:
109 113
         type: string
114
+      oauth_type:
115
+        type: string
110 116
       op:
111 117
         type: string
112 118
       redirect_url:
@@ -116,7 +122,7 @@ definitions:
116 122
     required:
117 123
     - client_id
118 124
     - client_secret
119
-    - op
125
+    - oauth_type
120 126
     - redirect_url
121 127
     type: object
122 128
   admin.PeerBatchDeleteForm:
@@ -188,6 +194,9 @@ definitions:
188 194
     properties:
189 195
       avatar:
190 196
         type: string
197
+      email:
198
+        description: validate:"required,email" email不强制
199
+        type: string
191 200
       group_id:
192 201
         type: integer
193 202
       id:
@@ -203,7 +212,7 @@ definitions:
203 212
         minimum: 0
204 213
       username:
205 214
         maxLength: 10
206
-        minLength: 4
215
+        minLength: 2
207 216
         type: string
208 217
     required:
209 218
     - group_id
@@ -212,10 +221,10 @@ definitions:
212 221
     type: object
213 222
   admin.UserOauthItem:
214 223
     properties:
224
+      op:
225
+        type: string
215 226
       status:
216 227
         type: integer
217
-      third_type:
218
-        type: string
219 228
     type: object
220 229
   admin.UserPasswordForm:
221 230
     properties:
@@ -462,6 +471,8 @@ definitions:
462 471
         type: string
463 472
       created_at:
464 473
         type: string
474
+      device_id:
475
+        type: string
465 476
       id:
466 477
         type: integer
467 478
       ip:
@@ -508,6 +519,8 @@ definitions:
508 519
         type: integer
509 520
       issuer:
510 521
         type: string
522
+      oauth_type:
523
+        type: string
511 524
       op:
512 525
         type: string
513 526
       redirect_url:
@@ -627,6 +640,8 @@ definitions:
627 640
         type: string
628 641
       created_at:
629 642
         type: string
643
+      email:
644
+        type: string
630 645
       group_id:
631 646
         type: integer
632 647
       id:
@@ -659,6 +674,10 @@ definitions:
659 674
     properties:
660 675
       created_at:
661 676
         type: string
677
+      device_id:
678
+        type: string
679
+      device_uuid:
680
+        type: string
662 681
       expired_at:
663 682
         type: integer
664 683
       id:
@@ -2519,6 +2538,57 @@ paths:
2519 2538
       summary: 我的授权
2520 2539
       tags:
2521 2540
       - 用户
2541
+  /admin/user/myPeer:
2542
+    get:
2543
+      consumes:
2544
+      - application/json
2545
+      description: 设备列表
2546
+      parameters:
2547
+      - description: 页码
2548
+        in: query
2549
+        name: page
2550
+        type: integer
2551
+      - description: 页大小
2552
+        in: query
2553
+        name: page_size
2554
+        type: integer
2555
+      - description: 时间
2556
+        in: query
2557
+        name: time_ago
2558
+        type: integer
2559
+      - description: ID
2560
+        in: query
2561
+        name: id
2562
+        type: string
2563
+      - description: 主机名
2564
+        in: query
2565
+        name: hostname
2566
+        type: string
2567
+      - description: uuids 用逗号分隔
2568
+        in: query
2569
+        name: uuids
2570
+        type: string
2571
+      produces:
2572
+      - application/json
2573
+      responses:
2574
+        "200":
2575
+          description: OK
2576
+          schema:
2577
+            allOf:
2578
+            - $ref: '#/definitions/response.Response'
2579
+            - properties:
2580
+                data:
2581
+                  $ref: '#/definitions/model.PeerList'
2582
+              type: object
2583
+        "500":
2584
+          description: Internal Server Error
2585
+          schema:
2586
+            $ref: '#/definitions/response.Response'
2587
+      security:
2588
+      - token: []
2589
+      summary: 设备列表
2590
+      tags:
2591
+      - 设备
2522 2592
   /admin/user/update:
2523 2593
     post:
2524 2594
       consumes:

+ 1 - 1
docs/api/api_docs.go

@@ -1365,7 +1365,7 @@ const docTemplateapi = `{
1365 1365
                 "username": {
1366 1366
                     "type": "string",
1367 1367
                     "maxLength": 10,
1368
-                    "minLength": 4
1368
+                    "minLength": 2
1369 1369
                 },
1370 1370
                 "uuid": {
1371 1371
                     "type": "string"

+ 1 - 1
docs/api/api_swagger.json

@@ -1358,7 +1358,7 @@
1358 1358
                 "username": {
1359 1359
                     "type": "string",
1360 1360
                     "maxLength": 10,
1361
-                    "minLength": 4
1361
+                    "minLength": 2
1362 1362
                 },
1363 1363
                 "uuid": {
1364 1364
                     "type": "string"

+ 1 - 1
docs/api/api_swagger.yaml

@@ -69,7 +69,7 @@ definitions:
69 69
         type: string
70 70
       username:
71 71
         maxLength: 10
72
-        minLength: 4
72
+        minLength: 2
73 73
         type: string
74 74
       uuid:
75 75
         type: string

+ 8 - 7
global/global.go

@@ -17,13 +17,14 @@ import (
17 17
 )
18 18
 
19 19
 var (
20
-	DB        *gorm.DB
21
-	Logger    *logrus.Logger
22
-	Config    config.Config
23
-	Viper     *viper.Viper
24
-	Redis     *redis.Client
25
-	Cache     cache.Handler
26
-	Validator struct {
20
+	DB         *gorm.DB
21
+	Logger     *logrus.Logger
22
+	ConfigPath string = ""
23
+	Config     config.Config
24
+	Viper      *viper.Viper
25
+	Redis      *redis.Client
26
+	Cache      cache.Handler
27
+	Validator  struct {
27 28
 		Validate    *validator.Validate
28 29
 		UT          *ut.UniversalTranslator
29 30
 		VTrans      ut.Translator

+ 2 - 1
go.mod

@@ -16,6 +16,7 @@ require (
16 16
 	github.com/google/uuid v1.1.2
17 17
 	github.com/nicksnyder/go-i18n/v2 v2.4.0
18 18
 	github.com/sirupsen/logrus v1.8.1
19
+	github.com/spf13/cobra v1.8.1
19 20
 	github.com/spf13/viper v1.9.0
20 21
 	github.com/swaggo/files v1.0.1
21 22
 	github.com/swaggo/gin-swagger v1.6.0
@@ -28,7 +29,6 @@ require (
28 29
 )
29 30
 
30 31
 require (
31
-	cloud.google.com/go/compute/metadata v0.5.1 // indirect
32 32
 	github.com/KyleBanks/depth v1.2.1 // indirect
33 33
 	github.com/PuerkitoBio/purell v1.1.1 // indirect
34 34
 	github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
@@ -44,6 +44,7 @@ require (
44 44
 	github.com/go-sql-driver/mysql v1.7.0 // indirect
45 45
 	github.com/goccy/go-json v0.10.0 // indirect
46 46
 	github.com/hashicorp/hcl v1.0.0 // indirect
47
+	github.com/inconshreveable/mousetrap v1.1.0 // indirect
47 48
 	github.com/jinzhu/inflection v1.0.0 // indirect
48 49
 	github.com/jinzhu/now v1.1.5 // indirect
49 50
 	github.com/josharian/intern v1.0.0 // indirect