mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-11-29 08:33:21 +00:00
style: Module name
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"Gwen/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/lejianwen/rustdesk-api/global"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 后台权限验证中间件
|
||||
|
||||
@@ -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 ...
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"Gwen/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/lejianwen/rustdesk-api/global"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"Gwen/model"
|
||||
"encoding/json"
|
||||
"github.com/lejianwen/rustdesk-api/model"
|
||||
)
|
||||
|
||||
type AddressBookForm struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package admin
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
type GroupForm struct {
|
||||
Id uint `json:"id"`
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package admin
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
type PeerForm struct {
|
||||
RowId uint `json:"row_id" `
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package admin
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
type TagForm struct {
|
||||
Id uint `json:"id"`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"Gwen/model"
|
||||
"github.com/lejianwen/rustdesk-api/model"
|
||||
)
|
||||
|
||||
type UserForm struct {
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package api
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
type AddressBookFormData struct {
|
||||
Tags []string `json:"tags"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package admin
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
type LoginPayload struct {
|
||||
Username string `json:"username"`
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package api
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
/*
|
||||
GroupPeerPayload
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package api
|
||||
|
||||
import "Gwen/model"
|
||||
import "github.com/lejianwen/rustdesk-api/model"
|
||||
|
||||
/*
|
||||
pub enum UserStatus {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"Gwen/model"
|
||||
"github.com/lejianwen/rustdesk-api/model"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"Gwen/model/custom_types"
|
||||
"github.com/lejianwen/rustdesk-api/model/custom_types"
|
||||
)
|
||||
|
||||
type StatusCode int
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"Gwen/model"
|
||||
"github.com/lejianwen/rustdesk-api/model"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user