style: Module name

This commit is contained in:
lejianwen
2025-02-12 16:07:51 +08:00
parent 8622c78da0
commit 32a9eda8ca
75 changed files with 244 additions and 244 deletions

View File

@@ -1,19 +1,19 @@
package main package main
import ( 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/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/nicksnyder/go-i18n/v2/i18n"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"os" "os"

View File

@@ -1,15 +1,15 @@
package global package global
import ( import (
"Gwen/config"
"Gwen/lib/cache"
"Gwen/lib/jwt"
"Gwen/lib/lock"
"Gwen/lib/upload"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
ut "github.com/go-playground/universal-translator" ut "github.com/go-playground/universal-translator"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
"github.com/go-redis/redis/v8" "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/nicksnyder/go-i18n/v2/i18n"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/spf13/viper" "github.com/spf13/viper"

2
go.mod
View File

@@ -1,4 +1,4 @@
module Gwen module github.com/lejianwen/rustdesk-api
go 1.22 go 1.22

View File

@@ -1,13 +1,13 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"encoding/json" "encoding/json"
_ "encoding/json" _ "encoding/json"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "os"
"strings" "strings"
) )

View File

@@ -1,11 +1,11 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/response"
"Gwen/lib/upload"
"fmt" "fmt"
"github.com/gin-gonic/gin" "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" "os"
"time" "time"
) )

View File

@@ -1,11 +1,11 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "strconv"
) )

View File

@@ -1,16 +1,16 @@
package admin package admin
import ( 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" "fmt"
"github.com/gin-gonic/gin" "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" "github.com/mojocn/base64Captcha"
"sync" "sync"
"time" "time"

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,12 +1,12 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"encoding/json" "encoding/json"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package my package my
import ( import (
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"time" "time"
) )

View File

@@ -1,11 +1,11 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,11 +1,11 @@
package my package my
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
adminReq "Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "strconv"
) )

View File

@@ -1,11 +1,11 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
"time" "time"

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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 { type Rustdesk struct {

View File

@@ -1,11 +1,11 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,11 +1,11 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,13 +1,13 @@
package admin package admin
import ( 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/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" "gorm.io/gorm"
"strconv" "strconv"
) )

View File

@@ -1,12 +1,12 @@
package admin package admin
import ( import (
"Gwen/global"
"Gwen/http/request/admin"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "gorm.io/gorm"
) )

View File

@@ -1,16 +1,16 @@
package api package api
import ( import (
"Gwen/global"
requstform "Gwen/http/request/api"
"Gwen/http/response"
"Gwen/http/response/api"
"Gwen/model"
"Gwen/service"
"Gwen/utils"
"encoding/json" "encoding/json"
"errors" "errors"
"github.com/gin-gonic/gin" "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" "net/http"
"strconv" "strconv"
"strings" "strings"

View File

@@ -1,12 +1,12 @@
package api package api
import ( import (
request "Gwen/http/request/api"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding" "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" "time"
) )

View File

@@ -1,12 +1,12 @@
package api package api
import ( import (
apiReq "Gwen/http/request/api"
"Gwen/http/response"
apiResp "Gwen/http/response/api"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "net/http"
) )

View File

@@ -1,11 +1,11 @@
package api package api
import ( import (
requstform "Gwen/http/request/api"
"Gwen/http/response"
"Gwen/model"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "net/http"
"os" "os"
"time" "time"

View File

@@ -1,15 +1,15 @@
package api package api
import ( import (
"Gwen/global"
"Gwen/http/request/api"
"Gwen/http/response"
apiResp "Gwen/http/response/api"
"Gwen/model"
"Gwen/service"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/gin-gonic/gin" "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" "net/http"
) )

View File

@@ -1,13 +1,13 @@
package api package api
import ( 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/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" "net/http"
) )

View File

@@ -1,11 +1,11 @@
package api package api
import ( import (
requstform "Gwen/http/request/api"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding" "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" "net/http"
) )

View File

@@ -1,9 +1,9 @@
package api package api
import ( import (
apiResp "Gwen/http/response/api"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
apiResp "github.com/lejianwen/rustdesk-api/http/response/api"
"github.com/lejianwen/rustdesk-api/service"
"net/http" "net/http"
) )

View File

@@ -1,11 +1,11 @@
package api package api
import ( import (
"Gwen/global"
"Gwen/http/response"
"Gwen/http/response/api"
"Gwen/service"
"github.com/gin-gonic/gin" "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" "time"
) )

View File

@@ -1,8 +1,8 @@
package web package web
import ( import (
"Gwen/global"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/global"
"strconv" "strconv"
) )

View File

@@ -1,10 +1,10 @@
package http package http
import ( import (
"Gwen/global"
"Gwen/http/middleware"
"Gwen/http/router"
"github.com/gin-gonic/gin" "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" "github.com/sirupsen/logrus"
"net/http" "net/http"
"strings" "strings"

View File

@@ -1,9 +1,9 @@
package middleware package middleware
import ( import (
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/http/response"
"github.com/lejianwen/rustdesk-api/service"
) )
// AdminAuth 后台权限验证中间件 // AdminAuth 后台权限验证中间件

View File

@@ -1,9 +1,9 @@
package middleware package middleware
import ( import (
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/http/response"
"github.com/lejianwen/rustdesk-api/service"
) )
// AdminPrivilege ... // AdminPrivilege ...

View File

@@ -1,10 +1,10 @@
package middleware package middleware
import ( import (
"Gwen/global"
"Gwen/http/response"
"Gwen/service"
"github.com/gin-gonic/gin" "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 { func JwtAuth() gin.HandlerFunc {

View File

@@ -1,8 +1,8 @@
package middleware package middleware
import ( import (
"Gwen/global"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/global"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View File

@@ -1,9 +1,9 @@
package middleware package middleware
import ( import (
"Gwen/global"
"Gwen/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/service"
) )
func RustAuth() gin.HandlerFunc { func RustAuth() gin.HandlerFunc {

View File

@@ -1,8 +1,8 @@
package admin package admin
import ( import (
"Gwen/model"
"encoding/json" "encoding/json"
"github.com/lejianwen/rustdesk-api/model"
) )
type AddressBookForm struct { type AddressBookForm struct {

View File

@@ -1,6 +1,6 @@
package admin package admin
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type GroupForm struct { type GroupForm struct {
Id uint `json:"id"` Id uint `json:"id"`

View File

@@ -1,7 +1,7 @@
package admin package admin
import ( import (
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
) )
type BindOauthForm struct { type BindOauthForm struct {

View File

@@ -1,6 +1,6 @@
package admin package admin
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type PeerForm struct { type PeerForm struct {
RowId uint `json:"row_id" ` RowId uint `json:"row_id" `

View File

@@ -1,6 +1,6 @@
package admin package admin
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type TagForm struct { type TagForm struct {
Id uint `json:"id"` Id uint `json:"id"`

View File

@@ -1,7 +1,7 @@
package admin package admin
import ( import (
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
) )
type UserForm struct { type UserForm struct {

View File

@@ -1,9 +1,9 @@
package api package api
import ( import (
"Gwen/global"
"Gwen/model"
"encoding/json" "encoding/json"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"strconv" "strconv"
) )

View File

@@ -1,6 +1,6 @@
package api package api
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type AddressBookFormData struct { type AddressBookFormData struct {
Tags []string `json:"tags"` Tags []string `json:"tags"`

View File

@@ -1,6 +1,6 @@
package admin package admin
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type LoginPayload struct { type LoginPayload struct {
Username string `json:"username"` Username string `json:"username"`

View File

@@ -1,6 +1,6 @@
package api package api
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
type AbList struct { type AbList struct {
Peers []*model.AddressBook `json:"peers,omitempty"` Peers []*model.AddressBook `json:"peers,omitempty"`

View File

@@ -1,6 +1,6 @@
package api package api
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
/* /*
GroupPeerPayload GroupPeerPayload

View File

@@ -1,6 +1,6 @@
package api package api
import "Gwen/model" import "github.com/lejianwen/rustdesk-api/model"
/* /*
pub enum UserStatus { pub enum UserStatus {

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"time" "time"
) )

View File

@@ -1,9 +1,9 @@
package response package response
import ( import (
"Gwen/global"
"fmt" "fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/global"
"github.com/nicksnyder/go-i18n/v2/i18n" "github.com/nicksnyder/go-i18n/v2/i18n"
"net/http" "net/http"
) )

View File

@@ -1,12 +1,12 @@
package router package router
import ( 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/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" swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger" ginSwagger "github.com/swaggo/gin-swagger"
) )

View File

@@ -1,11 +1,11 @@
package router package router
import ( import (
_ "Gwen/docs/api"
"Gwen/global"
"Gwen/http/controller/api"
"Gwen/http/middleware"
"github.com/gin-gonic/gin" "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" swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger" ginSwagger "github.com/swaggo/gin-swagger"
"net/http" "net/http"

View File

@@ -1,9 +1,9 @@
package router package router
import ( import (
"Gwen/global"
"Gwen/http/controller/web"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/http/controller/web"
"net/http" "net/http"
) )

View File

@@ -1,8 +1,8 @@
package orm package orm
import ( import (
"Gwen/global"
"fmt" "fmt"
"github.com/lejianwen/rustdesk-api/global"
"gorm.io/driver/mysql" "gorm.io/driver/mysql"
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"

View File

@@ -1,8 +1,8 @@
package orm package orm
import ( import (
"Gwen/global"
"fmt" "fmt"
"github.com/lejianwen/rustdesk-api/global"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"

View File

@@ -1,6 +1,6 @@
package model package model
import "Gwen/model/custom_types" import "github.com/lejianwen/rustdesk-api/model/custom_types"
// final String id; // final String id;
// String hash; // personal ab hash password // String hash; // personal ab hash password

View File

@@ -1,7 +1,7 @@
package model package model
import ( import (
"Gwen/model/custom_types" "github.com/lejianwen/rustdesk-api/model/custom_types"
) )
type StatusCode int type StatusCode int

View File

@@ -1,10 +1,10 @@
package service package service
import ( import (
"Gwen/global"
"Gwen/model"
"encoding/json" "encoding/json"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
"strings" "strings"
) )

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -9,9 +9,9 @@ import (
"github.com/go-ldap/ldap/v3" "github.com/go-ldap/ldap/v3"
"Gwen/config" "github.com/lejianwen/rustdesk-api/config"
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
) )
var ( var (

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package service package service
import ( import (
"Gwen/global"
"Gwen/model"
"Gwen/utils"
"context" "context"
"encoding/json" "encoding/json"
"errors" "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"
"golang.org/x/oauth2/github" "golang.org/x/oauth2/github"
// "golang.org/x/oauth2/google" // "golang.org/x/oauth2/google"

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,9 +1,9 @@
package service package service
import ( import (
"Gwen/global"
"Gwen/model"
"fmt" "fmt"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"net" "net"
"time" "time"
) )

View File

@@ -1,7 +1,7 @@
package service package service
import ( import (
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package service package service
import ( import (
"Gwen/global" "github.com/lejianwen/rustdesk-api/global"
"Gwen/model" "github.com/lejianwen/rustdesk-api/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package service package service
import ( import (
"Gwen/global"
"Gwen/model"
"Gwen/utils"
"errors" "errors"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"github.com/lejianwen/rustdesk-api/utils"
"math/rand" "math/rand"
"strconv" "strconv"
"strings" "strings"