This is a breaking change that renames the entire project from "Carrot BBS" to "WithYou".
All checks were successful
Build Backend / build (push) Successful in 5m10s
Build Backend / build-docker (push) Successful in 2m22s

The Go module name has been changed from `carrot_bbs` to `with_you`, which requires
all import paths to be updated throughout the codebase and by external consumers.

BREAKING CHANGE: Module name changed from carrot_bbs to with_you. All imports
and dependencies must be updated from carrot_bbs/* to with_you/*.
This commit is contained in:
lafay
2026-04-22 16:01:59 +08:00
parent 38d628c696
commit 2f584c1f2c
149 changed files with 551 additions and 551 deletions

View File

@@ -1,4 +1,4 @@
name: Deploy name: Deploy
on: on:
pull_request: pull_request:
@@ -25,9 +25,9 @@ on:
env: env:
REGISTRY: code.littlelan.cn REGISTRY: code.littlelan.cn
IMAGE_NAME: carrot_bbs/backend IMAGE_NAME: carrot_bbs/backend
SERVER_HOST: 111.170.19.33 SERVER_HOST: 124.222.83.58
SERVER_USER: root SERVER_USER: root
CONTAINER_NAME: carrot_bbs CONTAINER_NAME: with_you
CONTAINER_NETWORK: 1panel-network CONTAINER_NETWORK: 1panel-network
jobs: jobs:
@@ -65,21 +65,21 @@ jobs:
-p 8080:8080 \ -p 8080:8080 \
-p 50051:50051 \ -p 50051:50051 \
-e APP_DATABASE_TYPE=postgres \ -e APP_DATABASE_TYPE=postgres \
-e APP_DATABASE_POSTGRES_HOST=1Panel-postgresql-t0g7 \ -e APP_DATABASE_POSTGRES_HOST=1Panel-postgresql-Mjd1 \
-e APP_DATABASE_POSTGRES_PORT=5432 \ -e APP_DATABASE_POSTGRES_PORT=5432 \
-e APP_DATABASE_POSTGRES_USER=carrot_bbs \ -e APP_DATABASE_POSTGRES_USER=with_you \
-e "APP_DATABASE_POSTGRES_PASSWORD=${{ secrets.DB_PASSWORD }}" \ -e "APP_DATABASE_POSTGRES_PASSWORD=${{ secrets.DB_PASSWORD }}" \
-e APP_DATABASE_POSTGRES_DBNAME=carrot_bbs \ -e APP_DATABASE_POSTGRES_DBNAME=with_you \
-e APP_REDIS_TYPE=redis \ -e APP_REDIS_TYPE=redis \
-e APP_REDIS_REDIS_HOST=1Panel-redis-dfmM \ -e APP_REDIS_REDIS_HOST=1Panel-redis-fq2g \
-e APP_REDIS_REDIS_PORT=6379 \ -e APP_REDIS_REDIS_PORT=6379 \
-e "APP_REDIS_REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }}" \ -e "APP_REDIS_REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }}" \
-e APP_REDIS_REDIS_DB=0 \ -e APP_REDIS_REDIS_DB=0 \
-e APP_S3_ENDPOINT=files.littlelan.cn \ -e APP_S3_ENDPOINT=storage.littlelan.cn \
-e "APP_S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }}" \ -e "APP_S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }}" \
-e "APP_S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}" \ -e "APP_S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}" \
-e APP_S3_BUCKET=test \ -e APP_S3_BUCKET=withyou \
-e APP_S3_DOMAIN=files.littlelan.cn \ -e APP_S3_DOMAIN=storage.littlelan.cn \
-e APP_S3_USE_SSL=true \ -e APP_S3_USE_SSL=true \
-e "APP_JWT_SECRET=${{ secrets.JWT_SECRET }}" \ -e "APP_JWT_SECRET=${{ secrets.JWT_SECRET }}" \
-e APP_ENCRYPTION_ENABLED=true \ -e APP_ENCRYPTION_ENABLED=true \
@@ -104,7 +104,7 @@ jobs:
-e APP_EMAIL_USERNAME=no-reply@qczlit.cn \ -e APP_EMAIL_USERNAME=no-reply@qczlit.cn \
-e "APP_EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}" \ -e "APP_EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}" \
-e APP_EMAIL_FROM_ADDRESS=no-reply@qczlit.cn \ -e APP_EMAIL_FROM_ADDRESS=no-reply@qczlit.cn \
-e APP_EMAIL_FROM_NAME=Carrot_BBS \ -e APP_EMAIL_FROM_NAME=WithYou \
-e APP_EMAIL_USE_TLS=true \ -e APP_EMAIL_USE_TLS=true \
-e APP_EMAIL_TIMEOUT=15 \ -e APP_EMAIL_TIMEOUT=15 \
-e APP_GRPC_ENABLED=true \ -e APP_GRPC_ENABLED=true \

View File

@@ -1,14 +1,14 @@
package main package main
import ( import (
"context" "context"
"fmt" "fmt"
"net/http" "net/http"
"carrot_bbs/internal/config" "with_you/internal/config"
"carrot_bbs/internal/grpc/runner" "with_you/internal/grpc/runner"
"carrot_bbs/internal/router" "with_you/internal/router"
"carrot_bbs/internal/service" "with_you/internal/service"
"go.uber.org/zap" "go.uber.org/zap"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,14 +1,14 @@
//go:build wireinject //go:build wireinject
// +build wireinject // +build wireinject
package main package main
import ( import (
"carrot_bbs/internal/handler" "with_you/internal/handler"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"carrot_bbs/internal/router" "with_you/internal/router"
"carrot_bbs/internal/service" "with_you/internal/service"
appwire "carrot_bbs/internal/wire" appwire "with_you/internal/wire"
"github.com/google/wire" "github.com/google/wire"
) )

View File

@@ -1,4 +1,4 @@
// Code generated by Wire. DO NOT EDIT. // Code generated by Wire. DO NOT EDIT.
//go:generate go run -mod=mod github.com/google/wire/cmd/wire //go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject //go:build !wireinject
@@ -7,11 +7,11 @@
package main package main
import ( import (
"carrot_bbs/internal/handler" "with_you/internal/handler"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"carrot_bbs/internal/router" "with_you/internal/router"
"carrot_bbs/internal/service" "with_you/internal/service"
"carrot_bbs/internal/wire" "with_you/internal/wire"
) )
// Injectors from wire.go: // Injectors from wire.go:

View File

@@ -1,4 +1,4 @@
# 服务器配置 # 服务器配置
# 环境变量: APP_SERVER_HOST, APP_SERVER_PORT, APP_SERVER_MODE # 环境变量: APP_SERVER_HOST, APP_SERVER_PORT, APP_SERVER_MODE
server: server:
host: 0.0.0.0 host: 0.0.0.0
@@ -13,13 +13,13 @@ server:
database: database:
type: sqlite # sqlite 或 postgres type: sqlite # sqlite 或 postgres
sqlite: sqlite:
path: ./data/carrot_bbs.db path: ./data/with_you.db
postgres: postgres:
host: localhost host: localhost
port: 5432 port: 5432
user: postgres user: postgres
password: postgres password: postgres
dbname: carrot_bbs dbname: with_you
sslmode: disable sslmode: disable
max_idle_conns: 10 max_idle_conns: 10
max_open_conns: 100 max_open_conns: 100
@@ -202,7 +202,7 @@ email:
username: "no-reply@qczlit.cn" username: "no-reply@qczlit.cn"
password: "HbvwwVjRyiWg9gsK" password: "HbvwwVjRyiWg9gsK"
from_address: "no-reply@qczlit.cn" from_address: "no-reply@qczlit.cn"
from_name: "Carrot BBS" from_name: "WithYou"
use_tls: true use_tls: true
insecure_skip_verify: false insecure_skip_verify: false
timeout: 15 timeout: 15

2
go.mod
View File

@@ -1,4 +1,4 @@
module carrot_bbs module with_you
go 1.26 go 1.26

View File

@@ -1,4 +1,4 @@
package cache package cache
import ( import (
"context" "context"
@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@@ -1,4 +1,4 @@
package cache package cache
import ( import (
"context" "context"
@@ -10,7 +10,7 @@ import (
redislib "github.com/redis/go-redis/v9" redislib "github.com/redis/go-redis/v9"
"go.uber.org/zap" "go.uber.org/zap"
redisPkg "carrot_bbs/internal/pkg/redis" redisPkg "with_you/internal/pkg/redis"
) )
type LayeredCache struct { type LayeredCache struct {

View File

@@ -1,4 +1,4 @@
package cache package cache
import ( import (
"context" "context"
@@ -8,7 +8,7 @@ import (
redislib "github.com/redis/go-redis/v9" redislib "github.com/redis/go-redis/v9"
"go.uber.org/zap" "go.uber.org/zap"
redisPkg "carrot_bbs/internal/pkg/redis" redisPkg "with_you/internal/pkg/redis"
) )
// RedisCache Redis缓存实现 // RedisCache Redis缓存实现

View File

@@ -1,8 +1,8 @@
package cache package cache
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/repository" "with_you/internal/repository"
) )
// ConversationRepositoryAdapter 适配 MessageRepository 到 ConversationRepository 接口 // ConversationRepositoryAdapter 适配 MessageRepository 到 ConversationRepository 接口

View File

@@ -51,7 +51,7 @@ func Load(configPath string) (*Config, error) {
viper.SetDefault("server.mode", "debug") viper.SetDefault("server.mode", "debug")
viper.SetDefault("server.host", "0.0.0.0") viper.SetDefault("server.host", "0.0.0.0")
viper.SetDefault("database.type", "sqlite") viper.SetDefault("database.type", "sqlite")
viper.SetDefault("database.sqlite.path", "./data/carrot_bbs.db") viper.SetDefault("database.sqlite.path", "./data/with_you.db")
viper.SetDefault("database.max_idle_conns", 10) viper.SetDefault("database.max_idle_conns", 10)
viper.SetDefault("database.max_open_conns", 100) viper.SetDefault("database.max_open_conns", 100)
viper.SetDefault("database.log_level", "warn") viper.SetDefault("database.log_level", "warn")
@@ -124,7 +124,7 @@ func Load(configPath string) (*Config, error) {
viper.SetDefault("email.username", "") viper.SetDefault("email.username", "")
viper.SetDefault("email.password", "") viper.SetDefault("email.password", "")
viper.SetDefault("email.from_address", "") viper.SetDefault("email.from_address", "")
viper.SetDefault("email.from_name", "Carrot BBS") viper.SetDefault("email.from_name", "WithYou")
viper.SetDefault("email.use_tls", true) viper.SetDefault("email.use_tls", true)
viper.SetDefault("email.insecure_skip_verify", false) viper.SetDefault("email.insecure_skip_verify", false)
viper.SetDefault("email.timeout", 15) viper.SetDefault("email.timeout", 15)

View File

@@ -1,9 +1,9 @@
package dto package dto
import ( import (
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
) )
// ==================== Call Request DTOs ==================== // ==================== Call Request DTOs ====================

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"time" "time"
) )

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
) )
// ==================== Group 转换 ==================== // ==================== Group 转换 ====================

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
) )
// ==================== Message 转换 ==================== // ==================== Message 转换 ====================

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"strconv" "strconv"
) )

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"context" "context"
"encoding/json" "encoding/json"
) )

View File

@@ -1,7 +1,7 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
) )
// ==================== 举报 DTOs ==================== // ==================== 举报 DTOs ====================

View File

@@ -1,9 +1,9 @@
package dto package dto
import ( import (
"encoding/json" "encoding/json"
"carrot_bbs/internal/model" "with_you/internal/model"
) )
func ConvertScheduleCourseToResponse(course *model.ScheduleCourse, weeks []int) *ScheduleCourseResponse { func ConvertScheduleCourseToResponse(course *model.ScheduleCourse, weeks []int) *ScheduleCourseResponse {

View File

@@ -1,11 +1,11 @@
package dto package dto
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"slices" "slices"
"carrot_bbs/internal/model" "with_you/internal/model"
) )
// ParseSegmentData 解析Segment数据到目标结构体 // ParseSegmentData 解析Segment数据到目标结构体

View File

@@ -1,8 +1,8 @@
package dto package dto
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// ==================== User 转换 ==================== // ==================== User 转换 ====================

View File

@@ -1,4 +1,4 @@
package runner package runner
import ( import (
"context" "context"
@@ -6,7 +6,7 @@ import (
"sync" "sync"
"time" "time"
"carrot_bbs/proto/runner" "with_you/proto/runner"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@@ -1,4 +1,4 @@
package runner package runner
import ( import (
"context" "context"
@@ -6,8 +6,8 @@ import (
"net" "net"
"time" "time"
"carrot_bbs/internal/config" "with_you/internal/config"
"carrot_bbs/proto/runner" "with_you/proto/runner"
"go.uber.org/zap" "go.uber.org/zap"
"google.golang.org/grpc" "google.golang.org/grpc"

View File

@@ -1,4 +1,4 @@
package runner package runner
import ( import (
"context" "context"
@@ -7,7 +7,7 @@ import (
"sync" "sync"
"time" "time"
"carrot_bbs/proto/runner" "with_you/proto/runner"
"github.com/google/uuid" "github.com/google/uuid"
"go.uber.org/zap" "go.uber.org/zap"

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,10 +1,10 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,11 +1,11 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"time" "time"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,11 +1,11 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,9 +1,9 @@
package handler package handler
import ( import (
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,13 +1,13 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// CallHandler 通话记录处理器 // CallHandler 通话记录处理器

View File

@@ -1,9 +1,9 @@
package handler package handler
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"encoding/json" "encoding/json"
@@ -6,10 +6,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// CommentHandler 评论处理器 // CommentHandler 评论处理器

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"errors" "errors"
@@ -7,11 +7,11 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.uber.org/zap" "go.uber.org/zap"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// GroupHandler 群组处理器 // GroupHandler 群组处理器

View File

@@ -1,13 +1,13 @@
package handler package handler
import ( import (
"errors" "errors"
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"context" "context"
@@ -6,12 +6,12 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/pkg/ws" "with_you/internal/pkg/ws"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// MessageHandler 消息处理器 // MessageHandler 消息处理器

View File

@@ -1,14 +1,14 @@
package handler package handler
import ( import (
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// NotificationHandler 通知处理器 // NotificationHandler 通知处理器

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"errors" "errors"
@@ -8,11 +8,11 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// PostHandler 帖子处理器 // PostHandler 帖子处理器

View File

@@ -1,10 +1,10 @@
package handler package handler
import ( import (
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"fmt" "fmt"
@@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/pkg/ws" "with_you/internal/pkg/ws"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// QRCodeHandler 二维码登录处理器 // QRCodeHandler 二维码登录处理器

View File

@@ -1,9 +1,9 @@
package handler package handler
import ( import (
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.uber.org/zap" "go.uber.org/zap"

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"errors" "errors"
"net/http" "net/http"
apperrors "carrot_bbs/internal/errors" apperrors "with_you/internal/errors"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
type ScheduleHandler struct { type ScheduleHandler struct {

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"errors" "errors"
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// StickerHandler 自定义表情处理器 // StickerHandler 自定义表情处理器

View File

@@ -1,13 +1,13 @@
package handler package handler
import ( import (
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// SystemMessageHandler 系统消息处理器 // SystemMessageHandler 系统消息处理器

View File

@@ -1,10 +1,10 @@
package handler package handler
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// UploadHandler 上传处理器 // UploadHandler 上传处理器

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"cmp" "cmp"
@@ -9,10 +9,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
const ( const (

View File

@@ -1,12 +1,12 @@
package handler package handler
import ( import (
"strconv" "strconv"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"errors" "errors"
@@ -6,9 +6,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// VoteHandler 投票处理器 // VoteHandler 投票处理器

View File

@@ -1,4 +1,4 @@
package handler package handler
import ( import (
"context" "context"
@@ -15,13 +15,13 @@ import (
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"go.uber.org/zap" "go.uber.org/zap"
"carrot_bbs/internal/dto" "with_you/internal/dto"
apperrors "carrot_bbs/internal/errors" apperrors "with_you/internal/errors"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/pkg/ws" "with_you/internal/pkg/ws"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
var upgrader = websocket.Upgrader{ var upgrader = websocket.Upgrader{

View File

@@ -1,4 +1,4 @@
package middleware package middleware
import ( import (
"bytes" "bytes"
@@ -6,8 +6,8 @@ import (
"strings" "strings"
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/sanitizer" "with_you/internal/pkg/sanitizer"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,12 +1,12 @@
package middleware package middleware
import ( import (
"strings" "strings"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/service" "with_you/internal/service"
) )
// Auth 认证中间件 // Auth 认证中间件

View File

@@ -1,10 +1,10 @@
package middleware package middleware
import ( import (
"slices" "slices"
"strings" "strings"
"carrot_bbs/internal/service" "with_you/internal/service"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,11 +1,11 @@
package middleware package middleware
import ( import (
"net/http" "net/http"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/response" "with_you/internal/pkg/response"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,4 +1,4 @@
package model package model
import ( import (
"strconv" "strconv"
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// CallType 通话类型 // CallType 通话类型

View File

@@ -1,4 +1,4 @@
package model package model
import ( import (
"strconv" "strconv"
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// ConversationType 会话类型 // ConversationType 会话类型

View File

@@ -1,11 +1,11 @@
package model package model
import ( import (
"time" "time"
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// DeviceType 设备类型 // DeviceType 设备类型

View File

@@ -1,10 +1,10 @@
package model package model
import ( import (
"strconv" "strconv"
"time" "time"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package model package model
import ( import (
"strconv" "strconv"
"time" "time"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package model package model
import ( import (
"strconv" "strconv"
"time" "time"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,10 +1,10 @@
package model package model
import ( import (
"strconv" "strconv"
"time" "time"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,4 +1,4 @@
package model package model
import ( import (
"fmt" "fmt"
@@ -12,7 +12,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"
"carrot_bbs/internal/config" "with_you/internal/config"
) )
// NewDB 创建数据库连接(用于 Wire 依赖注入) // NewDB 创建数据库连接(用于 Wire 依赖注入)

View File

@@ -1,4 +1,4 @@
package model package model
import ( import (
"database/sql/driver" "database/sql/driver"
@@ -10,8 +10,8 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/crypto" "with_you/internal/pkg/crypto"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// 系统消息相关常量 // 系统消息相关常量

View File

@@ -1,11 +1,11 @@
package model package model
import ( import (
"time" "time"
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// PushChannel 推送通道类型 // PushChannel 推送通道类型

View File

@@ -1,4 +1,4 @@
package model package model
import ( import (
"database/sql/driver" "database/sql/driver"
@@ -8,7 +8,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"carrot_bbs/internal/pkg/utils" "with_you/internal/pkg/utils"
) )
// SystemNotificationType 系统通知类型 // SystemNotificationType 系统通知类型

View File

@@ -1,6 +1,6 @@
package email package email
import "carrot_bbs/internal/config" import "with_you/internal/config"
// Config SMTP 邮件配置(由应用配置转换) // Config SMTP 邮件配置(由应用配置转换)
type Config struct { type Config struct {

View File

@@ -1,11 +1,11 @@
package hook package hook
import ( import (
"context" "context"
"strings" "strings"
"time" "time"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@@ -1,10 +1,10 @@
package hook package hook
import ( import (
"strings" "strings"
"time" "time"
"carrot_bbs/internal/repository" "with_you/internal/repository"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@@ -1,6 +1,6 @@
package openai package openai
import "carrot_bbs/internal/config" import "with_you/internal/config"
// Config OpenAI 兼容接口配置 // Config OpenAI 兼容接口配置
type Config struct { type Config struct {

View File

@@ -1,4 +1,4 @@
package redis package redis
import ( import (
"context" "context"
@@ -8,7 +8,7 @@ import (
"github.com/alicebob/miniredis/v2" "github.com/alicebob/miniredis/v2"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"carrot_bbs/internal/config" "with_you/internal/config"
) )
// Client Redis客户端 // Client Redis客户端

View File

@@ -1,11 +1,11 @@
package response package response
import ( import (
"net/http" "net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
apperrors "carrot_bbs/internal/errors" apperrors "with_you/internal/errors"
) )
// Response 统一响应结构 // Response 统一响应结构

View File

@@ -1,4 +1,4 @@
package s3 package s3
import ( import (
"bytes" "bytes"
@@ -9,7 +9,7 @@ import (
"github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials" "github.com/minio/minio-go/v7/pkg/credentials"
"carrot_bbs/internal/config" "with_you/internal/config"
) )
// Client S3客户端 // Client S3客户端

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"context" "context"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,10 +1,10 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"context" "context"
"errors" "errors"

View File

@@ -1,11 +1,11 @@
package repository package repository
import ( import (
"context" "context"
"time" "time"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"context" "context"
"errors" "errors"
"fmt" "fmt"

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"context" "context"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,10 +1,10 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,12 +1,12 @@
package repository package repository
import ( import (
"context" "context"
"strings" "strings"
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,8 +1,8 @@
package repository package repository
import ( import (
"carrot_bbs/internal/dto" "with_you/internal/dto"
"carrot_bbs/internal/model" "with_you/internal/model"
"context" "context"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,9 +1,9 @@
package repository package repository
import ( import (
"context" "context"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"strings" "strings"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,11 +1,11 @@
package repository package repository
import ( import (
"context" "context"
"strconv" "strconv"
"carrot_bbs/internal/model" "with_you/internal/model"
"carrot_bbs/internal/pkg/cursor" "with_you/internal/pkg/cursor"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,11 +1,11 @@
package repository package repository
import ( import (
"context" "context"
"fmt" "fmt"
"time" "time"
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"strings" "strings"
"time" "time"

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -1,7 +1,7 @@
package repository package repository
import ( import (
"carrot_bbs/internal/model" "with_you/internal/model"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"

Some files were not shown because too many files have changed in this diff Show More