This commit is contained in:
kaysar 2024-02-21 12:06:40 +07:00
parent e002bab12a
commit f1b7e28a14
19 changed files with 60 additions and 59 deletions

View File

@ -1,6 +1,6 @@
# CasaOS-UserService # CasaOS-UserService
[![Go Reference](https://pkg.go.dev/badge/github.com/IceWhaleTech/CasaOS-UserService.svg)](https://pkg.go.dev/github.com/IceWhaleTech/CasaOS-UserService) [![Go Report Card](https://goreportcard.com/badge/github.com/IceWhaleTech/CasaOS-UserService)](https://goreportcard.com/report/github.com/IceWhaleTech/CasaOS-UserService) [![goreleaser](https://github.com/IceWhaleTech/CasaOS-UserService/actions/workflows/release.yml/badge.svg)](https://github.com/IceWhaleTech/CasaOS-UserService/actions/workflows/release.yml) [![codecov](https://codecov.io/gh/IceWhaleTech/CasaOS-UserService/branch/main/graph/badge.svg?token=4GWJIF6FDD)](https://codecov.io/gh/IceWhaleTech/CasaOS-UserService) [![Go Reference](https://pkg.go.dev/badge/github.com/KaySar12/NextZen-UserService.svg)](https://pkg.go.dev/github.com/KaySar12/NextZen-UserService) [![Go Report Card](https://goreportcard.com/badge/github.com/KaySar12/NextZen-UserService)](https://goreportcard.com/report/github.com/KaySar12/NextZen-UserService) [![goreleaser](https://github.com/KaySar12/NextZen-UserService/actions/workflows/release.yml/badge.svg)](https://github.com/KaySar12/NextZen-UserService/actions/workflows/release.yml) [![codecov](https://codecov.io/gh/IceWhaleTech/CasaOS-UserService/branch/main/graph/badge.svg?token=4GWJIF6FDD)](https://codecov.io/gh/IceWhaleTech/CasaOS-UserService)
User Service provides user management functionalities to CasaOS. User Service provides user management functionalities to CasaOS.

View File

@ -6,9 +6,9 @@ import (
"fmt" "fmt"
"os" "os"
interfaces "github.com/IceWhaleTech/CasaOS-Common" interfaces "github.com/KaySar12/NextZen-Common"
"github.com/IceWhaleTech/CasaOS-Common/utils/systemctl" "github.com/KaySar12/NextZen-Common/utils/systemctl"
"github.com/IceWhaleTech/CasaOS-UserService/common" "github.com/KaySar12/NextZen-UserService/common"
) )
const ( const (

View File

@ -1,7 +1,7 @@
package main package main
import ( import (
interfaces "github.com/IceWhaleTech/CasaOS-Common" interfaces "github.com/KaySar12/NextZen-Common"
) )
type migrationTool struct{} type migrationTool struct{}

2
dist/metadata.json vendored
View File

@ -1 +1 @@
{"project_name":"casaos-user-service","tag":"v0.4.5","previous_tag":"v0.4.4-alpha7","version":"0.4.6","commit":"4d2b65e34c6d01800273009d60756205c08cb0c3","date":"2024-02-02T15:35:39.294862443+07:00","runtime":{"goos":"linux","goarch":"amd64"}} {"project_name":"casaos-user-service","tag":"v1.0.1","previous_tag":"","version":"1.0.2","commit":"e002bab12a5ce37a0636709986e161f0e84f2eeb","date":"2024-02-21T12:02:47.525580972+07:00","runtime":{"goos":"linux","goarch":"amd64"}}

5
go.sum
View File

@ -1,5 +1,5 @@
github.com/IceWhaleTech/CasaOS-Common v0.4.8-alpha3 h1:5E5LAqi2uXpOZqcPOgQ4m6d9MagYyfhKIFXnzd8s3W4= github.com/KaySar12/NextZen-Common v1.0.1 h1:w+QTKRmXJBmru3Ig4x142k6c7oD6ZTMF13Q0Fu19bGo=
github.com/IceWhaleTech/CasaOS-Common v0.4.8-alpha3/go.mod h1:2IuYyy5qW1BE6jqC6M+tOU+WtUec1K565rLATBJ9p/0= github.com/KaySar12/NextZen-Common v1.0.1/go.mod h1:7AnhDlcVN9Dusql3aFy7y7TcyoKO3Pb9n/r0krTAWsw=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
@ -240,6 +240,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/gorm v1.25.0 h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU= gorm.io/gorm v1.25.0 h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU=
gorm.io/gorm v1.25.0/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.0/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
modernc.org/libc v1.22.4 h1:wymSbZb0AlrjdAVX3cjreCHTPCpPARbQXNz6BHPzdwQ= modernc.org/libc v1.22.4 h1:wymSbZb0AlrjdAVX3cjreCHTPCpPARbQXNz6BHPzdwQ=
modernc.org/libc v1.22.4/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= modernc.org/libc v1.22.4/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=

24
main.go
View File

@ -13,18 +13,18 @@ import (
"strings" "strings"
"time" "time"
"github.com/IceWhaleTech/CasaOS-Common/external" "github.com/KaySar12/NextZen-Common/external"
"github.com/IceWhaleTech/CasaOS-Common/model" "github.com/KaySar12/NextZen-Common/model"
util_http "github.com/IceWhaleTech/CasaOS-Common/utils/http" util_http "github.com/KaySar12/NextZen-Common/utils/http"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/KaySar12/NextZen-Common/utils/jwt"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/KaySar12/NextZen-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS-UserService/common" "github.com/KaySar12/NextZen-UserService/common"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/config" "github.com/KaySar12/NextZen-UserService/pkg/config"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/sqlite" "github.com/KaySar12/NextZen-UserService/pkg/sqlite"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/utils/encryption" "github.com/KaySar12/NextZen-UserService/pkg/utils/encryption"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/utils/random" "github.com/KaySar12/NextZen-UserService/pkg/utils/random"
"github.com/IceWhaleTech/CasaOS-UserService/route" "github.com/KaySar12/NextZen-UserService/route"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"github.com/coreos/go-systemd/daemon" "github.com/coreos/go-systemd/daemon"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -9,7 +9,7 @@
"publish": "npm publish --access public", "publish": "npm publish --access public",
"start": "yarn generate:ts && yarn build" "start": "yarn generate:ts && yarn build"
}, },
"homepage": "https://github.com/IceWhaleTech/CasaOS-UserService#readme", "homepage": "https://github.com/KaySar12/NextZen-UserService#readme",
"description": "Casaos-Localstorage Typescript+Axios SDK", "description": "Casaos-Localstorage Typescript+Axios SDK",
"keywords": [ "keywords": [
"CasaOS-UserService", "CasaOS-UserService",

View File

@ -5,8 +5,8 @@ import (
"log" "log"
"os" "os"
"github.com/IceWhaleTech/CasaOS-Common/utils/constants" "github.com/KaySar12/NextZen-Common/utils/constants"
"github.com/IceWhaleTech/CasaOS-UserService/model" "github.com/KaySar12/NextZen-UserService/model"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
) )

View File

@ -12,10 +12,10 @@ package sqlite
import ( import (
"time" "time"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/KaySar12/NextZen-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS-UserService/model" "github.com/KaySar12/NextZen-UserService/model"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/utils/file" "github.com/KaySar12/NextZen-UserService/pkg/utils/file"
model2 "github.com/IceWhaleTech/CasaOS-UserService/service/model" model2 "github.com/KaySar12/NextZen-UserService/service/model"
"github.com/glebarez/sqlite" "github.com/glebarez/sqlite"
"go.uber.org/zap" "go.uber.org/zap"
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -7,12 +7,12 @@ import (
"strings" "strings"
"time" "time"
"github.com/IceWhaleTech/CasaOS-Common/external" "github.com/KaySar12/NextZen-Common/external"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/KaySar12/NextZen-Common/utils/logger"
message_bus "github.com/IceWhaleTech/CasaOS-UserService/codegen/message_bus" message_bus "github.com/KaySar12/NextZen-UserService/codegen/message_bus"
"github.com/IceWhaleTech/CasaOS-UserService/model" "github.com/KaySar12/NextZen-UserService/model"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/config" "github.com/KaySar12/NextZen-UserService/pkg/config"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"go.uber.org/zap" "go.uber.org/zap"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
) )

View File

@ -4,10 +4,10 @@ import (
"crypto/ecdsa" "crypto/ecdsa"
"os" "os"
"github.com/IceWhaleTech/CasaOS-Common/middleware" "github.com/KaySar12/NextZen-Common/middleware"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/KaySar12/NextZen-Common/utils/jwt"
v1 "github.com/IceWhaleTech/CasaOS-UserService/route/v1" v1 "github.com/KaySar12/NextZen-UserService/route/v1"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"github.com/gin-contrib/gzip" "github.com/gin-contrib/gzip"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -17,20 +17,20 @@ import (
"strings" "strings"
"time" "time"
"github.com/IceWhaleTech/CasaOS-Common/utils/common_err" "github.com/KaySar12/NextZen-Common/utils/common_err"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/KaySar12/NextZen-Common/utils/jwt"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/KaySar12/NextZen-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS-UserService/model" "github.com/KaySar12/NextZen-UserService/model"
"github.com/IceWhaleTech/CasaOS-UserService/model/system_model" "github.com/KaySar12/NextZen-UserService/model/system_model"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/config" "github.com/KaySar12/NextZen-UserService/pkg/config"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/utils/encryption" "github.com/KaySar12/NextZen-UserService/pkg/utils/encryption"
"github.com/IceWhaleTech/CasaOS-UserService/pkg/utils/file" "github.com/KaySar12/NextZen-UserService/pkg/utils/file"
model2 "github.com/IceWhaleTech/CasaOS-UserService/service/model" model2 "github.com/KaySar12/NextZen-UserService/service/model"
uuid "github.com/satori/go.uuid" uuid "github.com/satori/go.uuid"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -7,10 +7,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/KaySar12/NextZen-Common/utils/jwt"
codegen "github.com/IceWhaleTech/CasaOS-UserService/codegen/user_service" codegen "github.com/KaySar12/NextZen-UserService/codegen/user_service"
v2 "github.com/IceWhaleTech/CasaOS-UserService/route/v2" v2 "github.com/KaySar12/NextZen-UserService/route/v2"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"github.com/deepmap/oapi-codegen/pkg/middleware" "github.com/deepmap/oapi-codegen/pkg/middleware"
"github.com/getkin/kin-openapi/openapi3" "github.com/getkin/kin-openapi/openapi3"
"github.com/getkin/kin-openapi/openapi3filter" "github.com/getkin/kin-openapi/openapi3filter"

View File

@ -3,8 +3,8 @@ package v2
import ( import (
"net/http" "net/http"
codegen "github.com/IceWhaleTech/CasaOS-UserService/codegen/user_service" codegen "github.com/KaySar12/NextZen-UserService/codegen/user_service"
"github.com/IceWhaleTech/CasaOS-UserService/service" "github.com/KaySar12/NextZen-UserService/service"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
) )

View File

@ -1,6 +1,6 @@
package v2 package v2
import codegen "github.com/IceWhaleTech/CasaOS-UserService/codegen/user_service" import codegen "github.com/KaySar12/NextZen-UserService/codegen/user_service"
type UserService struct{} type UserService struct{}

View File

@ -3,7 +3,7 @@ package service
import ( import (
"encoding/json" "encoding/json"
"github.com/IceWhaleTech/CasaOS-UserService/model" "github.com/KaySar12/NextZen-UserService/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -1,7 +1,7 @@
package service package service
import ( import (
"github.com/IceWhaleTech/CasaOS-Common/external" "github.com/KaySar12/NextZen-Common/external"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -15,9 +15,9 @@ import (
"mime/multipart" "mime/multipart"
"os" "os"
"github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/KaySar12/NextZen-Common/utils/jwt"
"github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/KaySar12/NextZen-Common/utils/logger"
"github.com/IceWhaleTech/CasaOS-UserService/service/model" "github.com/KaySar12/NextZen-UserService/service/model"
"go.uber.org/zap" "go.uber.org/zap"
"gorm.io/gorm" "gorm.io/gorm"
) )