refactor(layout): relocate go.mod to backend/ and clean import paths to module root

- Relocated go.mod and go.sum into backend/ root directory
- Stripped redundant backend/ segments from all Go imports (github.com/Rain-kl/Wavelet/...)
- Unified Makefile, swagger, and build-test to execute in backend/ module context
- Ensured 100% build-test, code-check, format, and swagger pass
This commit is contained in:
ryan
2026-08-28 13:01:51 +08:00
parent 43dc97e48c
commit f2ab94501c
185 changed files with 557 additions and 557 deletions
@@ -7,7 +7,7 @@ import (
"net/http"
"strconv"
"github.com/Rain-kl/Wavelet/backend/pkg/response"
"github.com/Rain-kl/Wavelet/pkg/response"
"github.com/gin-gonic/gin"
)
@@ -11,8 +11,8 @@ import (
"sync"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
"github.com/tencent-connect/botgo"
"github.com/tencent-connect/botgo/dto"
"github.com/tencent-connect/botgo/event"
@@ -7,7 +7,7 @@ import (
"context"
"testing"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
)
func TestHandleEvent_DropsNonC2C(t *testing.T) {
@@ -12,7 +12,7 @@ import (
"strconv"
"strings"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
tele "gopkg.in/telebot.v4"
)
@@ -7,7 +7,7 @@ import (
"context"
"testing"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
tele "gopkg.in/telebot.v4"
)
@@ -7,7 +7,7 @@ import (
"context"
"time"
"github.com/Rain-kl/Wavelet/backend/core/contracts"
"github.com/Rain-kl/Wavelet/core/contracts"
)
// AdminLogin is the metadata definition for the admin login event.
@@ -8,9 +8,9 @@ import (
"net/http"
"strconv"
"github.com/Rain-kl/Wavelet/backend/core/contracts"
"github.com/Rain-kl/Wavelet/backend/pkg/response"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/response"
"github.com/Rain-kl/Wavelet/pkg/util"
"github.com/gin-gonic/gin"
)
@@ -8,8 +8,8 @@ import (
"testing"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/testhelper"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/pkg/testhelper"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
)
func TestUpsertPairingCode_ReusesUnexpired(t *testing.T) {
@@ -8,9 +8,9 @@ import (
"context"
"embed"
"github.com/Rain-kl/Wavelet/backend/core"
"github.com/Rain-kl/Wavelet/backend/core/contracts"
"github.com/Rain-kl/Wavelet/backend/core/extpoints"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/core/extpoints"
"github.com/gin-gonic/gin"
"github.com/hibiken/asynq"
)
@@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/Rain-kl/Wavelet/backend/core"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway"
)
func TestMessageGatewayPluginUnit(t *testing.T) {
@@ -13,7 +13,7 @@ import (
"net/http"
"strings"
"github.com/Rain-kl/Wavelet/backend/pkg/httppool"
"github.com/Rain-kl/Wavelet/pkg/httppool"
)
func init() {
@@ -11,7 +11,7 @@ import (
"net/smtp"
"strings"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/pkg/util"
)
func init() {
@@ -17,7 +17,7 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/httppool"
"github.com/Rain-kl/Wavelet/pkg/httppool"
)
func init() {
@@ -12,7 +12,7 @@ import (
"net/http"
"strings"
"github.com/Rain-kl/Wavelet/backend/pkg/httppool"
"github.com/Rain-kl/Wavelet/pkg/httppool"
)
func init() {
@@ -11,8 +11,8 @@ import (
"strings"
"sync"
"github.com/Rain-kl/Wavelet/backend/pkg/response"
pkgpush "github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/pkg/response"
pkgpush "github.com/Rain-kl/Wavelet/plugins/domain/message_gateway/push"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
)
@@ -9,11 +9,11 @@ import (
"errors"
"sync"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/pkg/logger"
pkgpush "github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway/push"
pkgpush "github.com/Rain-kl/Wavelet/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/pkg/util"
"gorm.io/gorm"
)
@@ -9,9 +9,9 @@ import (
"net/http"
"strconv"
pkgpush "github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway/push"
pkgpush "github.com/Rain-kl/Wavelet/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/backend/pkg/response"
"github.com/Rain-kl/Wavelet/pkg/response"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
)
@@ -11,10 +11,10 @@ import (
"strconv"
"strings"
"github.com/Rain-kl/Wavelet/backend/core/contracts"
pkgpush "github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
db "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
"github.com/Rain-kl/Wavelet/core/contracts"
pkgpush "github.com/Rain-kl/Wavelet/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"gorm.io/gorm"
)
@@ -9,8 +9,8 @@ import (
"strconv"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
)
// RegisterTaskListeners subscribes push notification handlers to task completion events.
@@ -9,8 +9,8 @@ import (
"errors"
"fmt"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/plugins/domain/message_gateway/push"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
)
const (
@@ -10,9 +10,9 @@ import (
"gorm.io/gorm"
"github.com/Rain-kl/Wavelet/backend/pkg/idgen"
cachepkg "github.com/Rain-kl/Wavelet/backend/plugins/infra/cache"
db "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
"github.com/Rain-kl/Wavelet/pkg/idgen"
cachepkg "github.com/Rain-kl/Wavelet/plugins/infra/cache"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
)
const (
@@ -7,7 +7,7 @@ import (
"context"
"sync"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/pkg/logger"
)
// Runner manages lifecycle for long-lived channel adapters (WebSocket, long-polling, etc.).
@@ -8,8 +8,8 @@ import (
"encoding/hex"
"encoding/json"
"github.com/Rain-kl/Wavelet/backend/pkg/config"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/pkg/config"
"github.com/Rain-kl/Wavelet/pkg/util"
)
// CredentialKey is AES-256 hex derived from the session secret.