style: Module name

This commit is contained in:
lejianwen
2025-02-12 19:46:39 +08:00
parent a2672c9489
commit 6aebf061a4
79 changed files with 262 additions and 263 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"errors"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"github.com/lejianwen/rustdesk-api/utils"
"github.com/lejianwen/rustdesk-api/v2/global"
"github.com/lejianwen/rustdesk-api/v2/model"
"github.com/lejianwen/rustdesk-api/v2/utils"
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
// "golang.org/x/oauth2/google"

View File

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

View File

@@ -2,8 +2,8 @@ package service
import (
"fmt"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"github.com/lejianwen/rustdesk-api/v2/global"
"github.com/lejianwen/rustdesk-api/v2/model"
"net"
"time"
)

View File

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

View File

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

View File

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

View File

@@ -2,9 +2,9 @@ package service
import (
"errors"
"github.com/lejianwen/rustdesk-api/global"
"github.com/lejianwen/rustdesk-api/model"
"github.com/lejianwen/rustdesk-api/utils"
"github.com/lejianwen/rustdesk-api/v2/global"
"github.com/lejianwen/rustdesk-api/v2/model"
"github.com/lejianwen/rustdesk-api/v2/utils"
"math/rand"
"strconv"
"strings"
@@ -52,7 +52,7 @@ func (us *UserService) InfoByUsernamePassword(username, password string) *model.
if err == nil {
return u
}
global.Logger.Error("LDAP authentication failed, %v", err)
global.Logger.Errorf("LDAP authentication failed, %v", err)
global.Logger.Warn("Fallback to local database")
}
u := &model.User{}