diff --git a/cmd/apimain.go b/cmd/apimain.go index b5e93eb..924f044 100644 --- a/cmd/apimain.go +++ b/cmd/apimain.go @@ -1,19 +1,19 @@ package main import ( - "Gwen/config" - "Gwen/global" - "Gwen/http" - "Gwen/lib/cache" - "Gwen/lib/jwt" - "Gwen/lib/lock" - "Gwen/lib/logger" - "Gwen/lib/orm" - "Gwen/lib/upload" - "Gwen/model" - "Gwen/service" - "Gwen/utils" "github.com/go-redis/redis/v8" + "github.com/lejianwen/rustdesk-api/config" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http" + "github.com/lejianwen/rustdesk-api/lib/cache" + "github.com/lejianwen/rustdesk-api/lib/jwt" + "github.com/lejianwen/rustdesk-api/lib/lock" + "github.com/lejianwen/rustdesk-api/lib/logger" + "github.com/lejianwen/rustdesk-api/lib/orm" + "github.com/lejianwen/rustdesk-api/lib/upload" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" + "github.com/lejianwen/rustdesk-api/utils" "github.com/nicksnyder/go-i18n/v2/i18n" "github.com/spf13/cobra" "os" diff --git a/global/global.go b/global/global.go index ddbcbdc..c888fa5 100644 --- a/global/global.go +++ b/global/global.go @@ -1,15 +1,15 @@ package global import ( - "Gwen/config" - "Gwen/lib/cache" - "Gwen/lib/jwt" - "Gwen/lib/lock" - "Gwen/lib/upload" "github.com/gin-gonic/gin" ut "github.com/go-playground/universal-translator" "github.com/go-playground/validator/v10" "github.com/go-redis/redis/v8" + "github.com/lejianwen/rustdesk-api/config" + "github.com/lejianwen/rustdesk-api/lib/cache" + "github.com/lejianwen/rustdesk-api/lib/jwt" + "github.com/lejianwen/rustdesk-api/lib/lock" + "github.com/lejianwen/rustdesk-api/lib/upload" "github.com/nicksnyder/go-i18n/v2/i18n" "github.com/sirupsen/logrus" "github.com/spf13/viper" diff --git a/go.mod b/go.mod index 5746b6e..a13eb90 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module Gwen +module github.com/lejianwen/rustdesk-api go 1.22 diff --git a/http/controller/admin/addressBook.go b/http/controller/admin/addressBook.go index eefc4ee..5f650cd 100644 --- a/http/controller/admin/addressBook.go +++ b/http/controller/admin/addressBook.go @@ -1,13 +1,13 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "encoding/json" _ "encoding/json" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/addressBookCollection.go b/http/controller/admin/addressBookCollection.go index 7d6d55c..deb1468 100644 --- a/http/controller/admin/addressBookCollection.go +++ b/http/controller/admin/addressBookCollection.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/addressBookCollectionRule.go b/http/controller/admin/addressBookCollectionRule.go index 1f365b5..f02766a 100644 --- a/http/controller/admin/addressBookCollectionRule.go +++ b/http/controller/admin/addressBookCollectionRule.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/audit.go b/http/controller/admin/audit.go index c3d37e5..42a7a4d 100644 --- a/http/controller/admin/audit.go +++ b/http/controller/admin/audit.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/config.go b/http/controller/admin/config.go index cb67d98..3fad31e 100644 --- a/http/controller/admin/config.go +++ b/http/controller/admin/config.go @@ -1,10 +1,10 @@ package admin import ( - "Gwen/global" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "os" "strings" ) diff --git a/http/controller/admin/file.go b/http/controller/admin/file.go index 62564e8..f32ca12 100644 --- a/http/controller/admin/file.go +++ b/http/controller/admin/file.go @@ -1,11 +1,11 @@ package admin import ( - "Gwen/global" - "Gwen/http/response" - "Gwen/lib/upload" "fmt" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/lib/upload" "os" "time" ) diff --git a/http/controller/admin/group.go b/http/controller/admin/group.go index 0466f17..e41730c 100644 --- a/http/controller/admin/group.go +++ b/http/controller/admin/group.go @@ -1,11 +1,11 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "strconv" ) diff --git a/http/controller/admin/login.go b/http/controller/admin/login.go index 9c0bb8a..e3c4673 100644 --- a/http/controller/admin/login.go +++ b/http/controller/admin/login.go @@ -1,16 +1,16 @@ package admin import ( - "Gwen/global" - "Gwen/http/controller/api" - "Gwen/http/request/admin" - apiReq "Gwen/http/request/api" - "Gwen/http/response" - adResp "Gwen/http/response/admin" - "Gwen/model" - "Gwen/service" "fmt" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/controller/api" + "github.com/lejianwen/rustdesk-api/http/request/admin" + apiReq "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + adResp "github.com/lejianwen/rustdesk-api/http/response/admin" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "github.com/mojocn/base64Captcha" "sync" "time" diff --git a/http/controller/admin/loginLog.go b/http/controller/admin/loginLog.go index fc81f2f..27a5186 100644 --- a/http/controller/admin/loginLog.go +++ b/http/controller/admin/loginLog.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/my/addressBook.go b/http/controller/admin/my/addressBook.go index ab6ea64..c84b4ce 100644 --- a/http/controller/admin/my/addressBook.go +++ b/http/controller/admin/my/addressBook.go @@ -1,12 +1,12 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "encoding/json" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/my/addressBookCollection.go b/http/controller/admin/my/addressBookCollection.go index f77df36..e756805 100644 --- a/http/controller/admin/my/addressBookCollection.go +++ b/http/controller/admin/my/addressBookCollection.go @@ -1,12 +1,12 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/my/addressBookCollectionRule.go b/http/controller/admin/my/addressBookCollectionRule.go index 74b54b0..7c5ca79 100644 --- a/http/controller/admin/my/addressBookCollectionRule.go +++ b/http/controller/admin/my/addressBookCollectionRule.go @@ -1,12 +1,12 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/my/loginLog.go b/http/controller/admin/my/loginLog.go index 1cf9dcd..d3f2bb0 100644 --- a/http/controller/admin/my/loginLog.go +++ b/http/controller/admin/my/loginLog.go @@ -1,12 +1,12 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/my/peer.go b/http/controller/admin/my/peer.go index def0e0f..dedca7e 100644 --- a/http/controller/admin/my/peer.go +++ b/http/controller/admin/my/peer.go @@ -1,10 +1,10 @@ package my import ( - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "time" ) diff --git a/http/controller/admin/my/shareRecord.go b/http/controller/admin/my/shareRecord.go index 81749a9..6336569 100644 --- a/http/controller/admin/my/shareRecord.go +++ b/http/controller/admin/my/shareRecord.go @@ -1,11 +1,11 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/my/tag.go b/http/controller/admin/my/tag.go index 9a13385..657f6b5 100644 --- a/http/controller/admin/my/tag.go +++ b/http/controller/admin/my/tag.go @@ -1,11 +1,11 @@ package my import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/oauth.go b/http/controller/admin/oauth.go index ba03761..1bab22c 100644 --- a/http/controller/admin/oauth.go +++ b/http/controller/admin/oauth.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - adminReq "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + adminReq "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "strconv" ) diff --git a/http/controller/admin/peer.go b/http/controller/admin/peer.go index 8cdbd74..0d71456 100644 --- a/http/controller/admin/peer.go +++ b/http/controller/admin/peer.go @@ -1,11 +1,11 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" "time" diff --git a/http/controller/admin/rustdesk.go b/http/controller/admin/rustdesk.go index de3ed43..96dc9a8 100644 --- a/http/controller/admin/rustdesk.go +++ b/http/controller/admin/rustdesk.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" ) type Rustdesk struct { diff --git a/http/controller/admin/shareRecord.go b/http/controller/admin/shareRecord.go index 6585b83..293d83b 100644 --- a/http/controller/admin/shareRecord.go +++ b/http/controller/admin/shareRecord.go @@ -1,11 +1,11 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/admin/tag.go b/http/controller/admin/tag.go index 74d84e4..23cd0e9 100644 --- a/http/controller/admin/tag.go +++ b/http/controller/admin/tag.go @@ -1,11 +1,11 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/user.go b/http/controller/admin/user.go index ef8a566..ba1df48 100644 --- a/http/controller/admin/user.go +++ b/http/controller/admin/user.go @@ -1,13 +1,13 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - adResp "Gwen/http/response/admin" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + adResp "github.com/lejianwen/rustdesk-api/http/response/admin" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" "strconv" ) diff --git a/http/controller/admin/userToken.go b/http/controller/admin/userToken.go index 46e680a..4cbb5d5 100644 --- a/http/controller/admin/userToken.go +++ b/http/controller/admin/userToken.go @@ -1,12 +1,12 @@ package admin import ( - "Gwen/global" - "Gwen/http/request/admin" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/admin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "gorm.io/gorm" ) diff --git a/http/controller/api/ab.go b/http/controller/api/ab.go index eee3604..0329c6e 100644 --- a/http/controller/api/ab.go +++ b/http/controller/api/ab.go @@ -1,16 +1,16 @@ package api import ( - "Gwen/global" - requstform "Gwen/http/request/api" - "Gwen/http/response" - "Gwen/http/response/api" - "Gwen/model" - "Gwen/service" - "Gwen/utils" "encoding/json" "errors" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + requstform "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" + "github.com/lejianwen/rustdesk-api/utils" "net/http" "strconv" "strings" diff --git a/http/controller/api/audit.go b/http/controller/api/audit.go index 0a3c05c..1ffbbe5 100644 --- a/http/controller/api/audit.go +++ b/http/controller/api/audit.go @@ -1,12 +1,12 @@ package api import ( - request "Gwen/http/request/api" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" + request "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "time" ) diff --git a/http/controller/api/group.go b/http/controller/api/group.go index 10f352d..8cf6cf4 100644 --- a/http/controller/api/group.go +++ b/http/controller/api/group.go @@ -1,12 +1,12 @@ package api import ( - apiReq "Gwen/http/request/api" - "Gwen/http/response" - apiResp "Gwen/http/response/api" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + apiReq "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + apiResp "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "net/http" ) diff --git a/http/controller/api/index.go b/http/controller/api/index.go index 525ebf5..007f856 100644 --- a/http/controller/api/index.go +++ b/http/controller/api/index.go @@ -1,11 +1,11 @@ package api import ( - requstform "Gwen/http/request/api" - "Gwen/http/response" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + requstform "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "net/http" "os" "time" diff --git a/http/controller/api/login.go b/http/controller/api/login.go index c932caa..8b4c323 100644 --- a/http/controller/api/login.go +++ b/http/controller/api/login.go @@ -1,15 +1,15 @@ package api import ( - "Gwen/global" - "Gwen/http/request/api" - "Gwen/http/response" - apiResp "Gwen/http/response/api" - "Gwen/model" - "Gwen/service" "encoding/json" "fmt" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + apiResp "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "net/http" ) diff --git a/http/controller/api/ouath.go b/http/controller/api/ouath.go index 58624ab..6216e60 100644 --- a/http/controller/api/ouath.go +++ b/http/controller/api/ouath.go @@ -1,13 +1,13 @@ package api import ( - "Gwen/global" - "Gwen/http/request/api" - "Gwen/http/response" - apiResp "Gwen/http/response/api" - "Gwen/model" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + apiResp "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/service" "net/http" ) diff --git a/http/controller/api/peer.go b/http/controller/api/peer.go index 5b50946..e96ff66 100644 --- a/http/controller/api/peer.go +++ b/http/controller/api/peer.go @@ -1,11 +1,11 @@ package api import ( - requstform "Gwen/http/request/api" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" + requstform "github.com/lejianwen/rustdesk-api/http/request/api" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" "net/http" ) diff --git a/http/controller/api/user.go b/http/controller/api/user.go index 7572b1b..1611b06 100644 --- a/http/controller/api/user.go +++ b/http/controller/api/user.go @@ -1,9 +1,9 @@ package api import ( - apiResp "Gwen/http/response/api" - "Gwen/service" "github.com/gin-gonic/gin" + apiResp "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/service" "net/http" ) diff --git a/http/controller/api/webClient.go b/http/controller/api/webClient.go index 1949b38..9fa0fa1 100644 --- a/http/controller/api/webClient.go +++ b/http/controller/api/webClient.go @@ -1,11 +1,11 @@ package api import ( - "Gwen/global" - "Gwen/http/response" - "Gwen/http/response/api" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/http/response/api" + "github.com/lejianwen/rustdesk-api/service" "time" ) diff --git a/http/controller/web/index.go b/http/controller/web/index.go index af3b1b6..b06a27e 100644 --- a/http/controller/web/index.go +++ b/http/controller/web/index.go @@ -1,8 +1,8 @@ package web import ( - "Gwen/global" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" "strconv" ) diff --git a/http/http.go b/http/http.go index 6104805..c7a331f 100644 --- a/http/http.go +++ b/http/http.go @@ -1,10 +1,10 @@ package http import ( - "Gwen/global" - "Gwen/http/middleware" - "Gwen/http/router" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/middleware" + "github.com/lejianwen/rustdesk-api/http/router" "github.com/sirupsen/logrus" "net/http" "strings" diff --git a/http/middleware/admin.go b/http/middleware/admin.go index 15d49b0..26e91fb 100644 --- a/http/middleware/admin.go +++ b/http/middleware/admin.go @@ -1,9 +1,9 @@ package middleware import ( - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" ) // AdminAuth 后台权限验证中间件 diff --git a/http/middleware/admin_privilege.go b/http/middleware/admin_privilege.go index bd1267d..9531f36 100644 --- a/http/middleware/admin_privilege.go +++ b/http/middleware/admin_privilege.go @@ -1,9 +1,9 @@ package middleware import ( - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" ) // AdminPrivilege ... diff --git a/http/middleware/jwt.go b/http/middleware/jwt.go index b9b0599..2ad2a09 100644 --- a/http/middleware/jwt.go +++ b/http/middleware/jwt.go @@ -1,10 +1,10 @@ package middleware import ( - "Gwen/global" - "Gwen/http/response" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/response" + "github.com/lejianwen/rustdesk-api/service" ) func JwtAuth() gin.HandlerFunc { diff --git a/http/middleware/logger.go b/http/middleware/logger.go index 53af2e9..a32e28f 100644 --- a/http/middleware/logger.go +++ b/http/middleware/logger.go @@ -1,8 +1,8 @@ package middleware import ( - "Gwen/global" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" "github.com/sirupsen/logrus" ) diff --git a/http/middleware/rustauth.go b/http/middleware/rustauth.go index 0f8ae5a..99434f2 100644 --- a/http/middleware/rustauth.go +++ b/http/middleware/rustauth.go @@ -1,9 +1,9 @@ package middleware import ( - "Gwen/global" - "Gwen/service" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/service" ) func RustAuth() gin.HandlerFunc { diff --git a/http/request/admin/addressBook.go b/http/request/admin/addressBook.go index cf505ad..89992cf 100644 --- a/http/request/admin/addressBook.go +++ b/http/request/admin/addressBook.go @@ -1,8 +1,8 @@ package admin import ( - "Gwen/model" "encoding/json" + "github.com/lejianwen/rustdesk-api/model" ) type AddressBookForm struct { diff --git a/http/request/admin/group.go b/http/request/admin/group.go index 3f91b1a..931a93b 100644 --- a/http/request/admin/group.go +++ b/http/request/admin/group.go @@ -1,6 +1,6 @@ package admin -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type GroupForm struct { Id uint `json:"id"` diff --git a/http/request/admin/oauth.go b/http/request/admin/oauth.go index 57c96c4..a9d0645 100644 --- a/http/request/admin/oauth.go +++ b/http/request/admin/oauth.go @@ -1,7 +1,7 @@ package admin import ( - "Gwen/model" + "github.com/lejianwen/rustdesk-api/model" ) type BindOauthForm struct { @@ -15,21 +15,21 @@ type UnBindOauthForm struct { Op string `json:"op" binding:"required"` } type OauthForm struct { - Id uint `json:"id"` - Op string `json:"op" validate:"omitempty"` - OauthType string `json:"oauth_type" validate:"required"` - Issuer string `json:"issuer" validate:"omitempty,url"` - Scopes string `json:"scopes" validate:"omitempty"` - ClientId string `json:"client_id" validate:"required"` - ClientSecret string `json:"client_secret" validate:"required"` - RedirectUrl string `json:"redirect_url" validate:"required"` - AutoRegister *bool `json:"auto_register"` + Id uint `json:"id"` + Op string `json:"op" validate:"omitempty"` + OauthType string `json:"oauth_type" validate:"required"` + Issuer string `json:"issuer" validate:"omitempty,url"` + Scopes string `json:"scopes" validate:"omitempty"` + ClientId string `json:"client_id" validate:"required"` + ClientSecret string `json:"client_secret" validate:"required"` + RedirectUrl string `json:"redirect_url" validate:"required"` + AutoRegister *bool `json:"auto_register"` } func (of *OauthForm) ToOauth() *model.Oauth { oa := &model.Oauth{ Op: of.Op, - OauthType: of.OauthType, + OauthType: of.OauthType, ClientId: of.ClientId, ClientSecret: of.ClientSecret, RedirectUrl: of.RedirectUrl, diff --git a/http/request/admin/peer.go b/http/request/admin/peer.go index c021ce3..68de0ef 100644 --- a/http/request/admin/peer.go +++ b/http/request/admin/peer.go @@ -1,6 +1,6 @@ package admin -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type PeerForm struct { RowId uint `json:"row_id" ` diff --git a/http/request/admin/tag.go b/http/request/admin/tag.go index 7ecc2f5..abac3b2 100644 --- a/http/request/admin/tag.go +++ b/http/request/admin/tag.go @@ -1,6 +1,6 @@ package admin -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type TagForm struct { Id uint `json:"id"` diff --git a/http/request/admin/user.go b/http/request/admin/user.go index e35d5f4..604fc4e 100644 --- a/http/request/admin/user.go +++ b/http/request/admin/user.go @@ -1,7 +1,7 @@ package admin import ( - "Gwen/model" + "github.com/lejianwen/rustdesk-api/model" ) type UserForm struct { diff --git a/http/request/api/audit.go b/http/request/api/audit.go index 242a73e..a64a2bb 100644 --- a/http/request/api/audit.go +++ b/http/request/api/audit.go @@ -1,9 +1,9 @@ package api import ( - "Gwen/global" - "Gwen/model" "encoding/json" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "strconv" ) diff --git a/http/request/api/peer.go b/http/request/api/peer.go index ab97dfa..b7d2d05 100644 --- a/http/request/api/peer.go +++ b/http/request/api/peer.go @@ -1,6 +1,6 @@ package api -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type AddressBookFormData struct { Tags []string `json:"tags"` diff --git a/http/response/admin/user.go b/http/response/admin/user.go index a8e0d21..5bdfeff 100644 --- a/http/response/admin/user.go +++ b/http/response/admin/user.go @@ -1,6 +1,6 @@ package admin -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type LoginPayload struct { Username string `json:"username"` diff --git a/http/response/api/ab.go b/http/response/api/ab.go index 31db349..828b7f1 100644 --- a/http/response/api/ab.go +++ b/http/response/api/ab.go @@ -1,6 +1,6 @@ package api -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" type AbList struct { Peers []*model.AddressBook `json:"peers,omitempty"` diff --git a/http/response/api/peer.go b/http/response/api/peer.go index 875aacb..703f699 100644 --- a/http/response/api/peer.go +++ b/http/response/api/peer.go @@ -1,6 +1,6 @@ package api -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" /* GroupPeerPayload diff --git a/http/response/api/user.go b/http/response/api/user.go index dc97370..772a0af 100644 --- a/http/response/api/user.go +++ b/http/response/api/user.go @@ -1,6 +1,6 @@ package api -import "Gwen/model" +import "github.com/lejianwen/rustdesk-api/model" /* pub enum UserStatus { diff --git a/http/response/api/webClient.go b/http/response/api/webClient.go index 00ac214..8e85189 100644 --- a/http/response/api/webClient.go +++ b/http/response/api/webClient.go @@ -1,7 +1,7 @@ package api import ( - "Gwen/model" + "github.com/lejianwen/rustdesk-api/model" "time" ) diff --git a/http/response/response.go b/http/response/response.go index 2f8995a..a86d2a5 100644 --- a/http/response/response.go +++ b/http/response/response.go @@ -1,9 +1,9 @@ package response import ( - "Gwen/global" "fmt" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" "github.com/nicksnyder/go-i18n/v2/i18n" "net/http" ) diff --git a/http/router/admin.go b/http/router/admin.go index 7a49e05..36eb915 100644 --- a/http/router/admin.go +++ b/http/router/admin.go @@ -1,12 +1,12 @@ package router import ( - _ "Gwen/docs/admin" - "Gwen/global" - "Gwen/http/controller/admin" - "Gwen/http/controller/admin/my" - "Gwen/http/middleware" "github.com/gin-gonic/gin" + _ "github.com/lejianwen/rustdesk-api/docs/admin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/controller/admin" + "github.com/lejianwen/rustdesk-api/http/controller/admin/my" + "github.com/lejianwen/rustdesk-api/http/middleware" swaggerFiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" ) diff --git a/http/router/api.go b/http/router/api.go index deb086f..6bd8be3 100644 --- a/http/router/api.go +++ b/http/router/api.go @@ -1,11 +1,11 @@ package router import ( - _ "Gwen/docs/api" - "Gwen/global" - "Gwen/http/controller/api" - "Gwen/http/middleware" "github.com/gin-gonic/gin" + _ "github.com/lejianwen/rustdesk-api/docs/api" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/controller/api" + "github.com/lejianwen/rustdesk-api/http/middleware" swaggerFiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" "net/http" diff --git a/http/router/router.go b/http/router/router.go index 56733d1..ba6d0d3 100644 --- a/http/router/router.go +++ b/http/router/router.go @@ -1,9 +1,9 @@ package router import ( - "Gwen/global" - "Gwen/http/controller/web" "github.com/gin-gonic/gin" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/http/controller/web" "net/http" ) diff --git a/lib/orm/mysql.go b/lib/orm/mysql.go index 878a51a..33d843a 100644 --- a/lib/orm/mysql.go +++ b/lib/orm/mysql.go @@ -1,8 +1,8 @@ package orm import ( - "Gwen/global" "fmt" + "github.com/lejianwen/rustdesk-api/global" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" diff --git a/lib/orm/sqlite.go b/lib/orm/sqlite.go index 351922e..394e49b 100644 --- a/lib/orm/sqlite.go +++ b/lib/orm/sqlite.go @@ -1,8 +1,8 @@ package orm import ( - "Gwen/global" "fmt" + "github.com/lejianwen/rustdesk-api/global" "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/logger" diff --git a/model/addressBook.go b/model/addressBook.go index 8a26903..8017d3b 100644 --- a/model/addressBook.go +++ b/model/addressBook.go @@ -1,6 +1,6 @@ package model -import "Gwen/model/custom_types" +import "github.com/lejianwen/rustdesk-api/model/custom_types" // final String id; // String hash; // personal ab hash password diff --git a/model/model.go b/model/model.go index 8cc5615..e504d68 100644 --- a/model/model.go +++ b/model/model.go @@ -1,7 +1,7 @@ package model import ( - "Gwen/model/custom_types" + "github.com/lejianwen/rustdesk-api/model/custom_types" ) type StatusCode int diff --git a/service/addressBook.go b/service/addressBook.go index ac06359..aece31d 100644 --- a/service/addressBook.go +++ b/service/addressBook.go @@ -1,10 +1,10 @@ package service import ( - "Gwen/global" - "Gwen/model" "encoding/json" "github.com/google/uuid" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" "strings" ) diff --git a/service/audit.go b/service/audit.go index a29059f..6e005c4 100644 --- a/service/audit.go +++ b/service/audit.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/group.go b/service/group.go index 358e2cb..9810d47 100644 --- a/service/group.go +++ b/service/group.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/ldap.go b/service/ldap.go index ab328d0..5fb7f15 100644 --- a/service/ldap.go +++ b/service/ldap.go @@ -9,9 +9,9 @@ import ( "github.com/go-ldap/ldap/v3" - "Gwen/config" - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/config" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" ) var ( diff --git a/service/loginLog.go b/service/loginLog.go index 7a291d6..9eb3aa6 100644 --- a/service/loginLog.go +++ b/service/loginLog.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/oauth.go b/service/oauth.go index 0359c48..7e40b23 100644 --- a/service/oauth.go +++ b/service/oauth.go @@ -1,12 +1,12 @@ package service import ( - "Gwen/global" - "Gwen/model" - "Gwen/utils" "context" "encoding/json" "errors" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/utils" "golang.org/x/oauth2" "golang.org/x/oauth2/github" // "golang.org/x/oauth2/google" diff --git a/service/peer.go b/service/peer.go index ff94bf0..7c194a0 100644 --- a/service/peer.go +++ b/service/peer.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/serverCmd.go b/service/serverCmd.go index 9372661..77c4ed8 100644 --- a/service/serverCmd.go +++ b/service/serverCmd.go @@ -1,9 +1,9 @@ package service import ( - "Gwen/global" - "Gwen/model" "fmt" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "net" "time" ) diff --git a/service/service.go b/service/service.go index c1450fa..ab137ee 100644 --- a/service/service.go +++ b/service/service.go @@ -1,7 +1,7 @@ package service import ( - "Gwen/model" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/shareRecord.go b/service/shareRecord.go index 81036f4..8a02f6a 100644 --- a/service/shareRecord.go +++ b/service/shareRecord.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/tag.go b/service/tag.go index 355733e..fad947a 100644 --- a/service/tag.go +++ b/service/tag.go @@ -1,8 +1,8 @@ package service import ( - "Gwen/global" - "Gwen/model" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" "gorm.io/gorm" ) diff --git a/service/user.go b/service/user.go index 8850149..bcdc030 100644 --- a/service/user.go +++ b/service/user.go @@ -1,10 +1,10 @@ package service import ( - "Gwen/global" - "Gwen/model" - "Gwen/utils" "errors" + "github.com/lejianwen/rustdesk-api/global" + "github.com/lejianwen/rustdesk-api/model" + "github.com/lejianwen/rustdesk-api/utils" "math/rand" "strconv" "strings"