全局重命名:kefu_sys / kefu-sys 改为 kefu_cloud / kefu-cloud

- Go module 与全部 import 路径
- 数据库默认库名、Docker 服务/卷命名与部署文档
This commit is contained in:
yml2213
2026-07-15 15:23:10 +08:00
parent 8860b640ca
commit d4ba9e7a56
34 changed files with 104 additions and 104 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
# 客服云(kefu_sys # 客服云(kefu_cloud
多租户在线客服 SaaS:租户坐席工作台 + 访客 Widget + 平台超管后台。 多租户在线客服 SaaS:租户坐席工作台 + 访客 Widget + 平台超管后台。
@@ -81,11 +81,11 @@
## 目录结构 ## 目录结构
``` ```
kefu_sys/ kefu_cloud/ # 仓库目录名(本地可能仍为旧名,以模块名为准)
├── docker-compose.dev.yml # Postgres + MinIO ├── docker-compose.dev.yml # Postgres + MinIO
├── Makefile ├── Makefile
├── docs/ # 产品原型 / 需求 HTML ├── docs/ # 产品原型 / 需求 HTML
├── server/ ├── server/ # Go module: kefu-cloud/server
│ ├── cmd/main.go # 服务入口 │ ├── cmd/main.go # 服务入口
│ ├── cmd/seed/ # 演示数据 │ ├── cmd/seed/ # 演示数据
│ └── internal/ │ └── internal/
@@ -205,7 +205,7 @@ make db-up
| `SERVER_PORT` | `8080` | HTTP 端口 | | `SERVER_PORT` | `8080` | HTTP 端口 |
| `GIN_MODE` | `debug` | Gin 模式 | | `GIN_MODE` | `debug` | Gin 模式 |
| `DB_HOST` / `DB_PORT` | `localhost` / `5433` | 数据库 | | `DB_HOST` / `DB_PORT` | `localhost` / `5433` | 数据库 |
| `DB_USER` / `DB_PASSWORD` / `DB_NAME` | `postgres` / `postgres` / `kefu_sys` | | | `DB_USER` / `DB_PASSWORD` / `DB_NAME` | `postgres` / `postgres` / `kefu_cloud` | |
| `JWT_SECRET` | 内置开发密钥 | **生产务必修改** | | `JWT_SECRET` | 内置开发密钥 | **生产务必修改** |
| `STORAGE_ENDPOINT` | `localhost:9100` | MinIO/S3 | | `STORAGE_ENDPOINT` | `localhost:9100` | MinIO/S3 |
| `STORAGE_ACCESS_KEY` / `STORAGE_SECRET_KEY` | `minioadmin` | | | `STORAGE_ACCESS_KEY` / `STORAGE_SECRET_KEY` | `minioadmin` | |
+1 -1
View File
@@ -15,7 +15,7 @@ STORAGE_PUBLIC_BASE_URL=http://你的公网IP或域名/files
# ========== 数据库 ========== # ========== 数据库 ==========
DB_USER=kefu DB_USER=kefu
DB_PASSWORD=请改成强密码 DB_PASSWORD=请改成强密码
DB_NAME=kefu_sys DB_NAME=kefu_cloud
DB_SSLMODE=disable DB_SSLMODE=disable
# ========== JWTdeploy.sh 可自动生成)========== # ========== JWTdeploy.sh 可自动生成)==========
+2 -2
View File
@@ -29,8 +29,8 @@ docker compose version
4. 上传代码到服务器,例如: 4. 上传代码到服务器,例如:
```bash ```bash
git clone <你的仓库地址> kefu_sys git clone <你的仓库地址> kefu_cloud
cd kefu_sys cd kefu_cloud
``` ```
## 一键部署 ## 一键部署
+2 -2
View File
@@ -23,10 +23,10 @@ set +a
mkdir -p "$OUT_DIR" mkdir -p "$OUT_DIR"
STAMP="$(date +%Y%m%d_%H%M%S)" STAMP="$(date +%Y%m%d_%H%M%S)"
FILE="${OUT_DIR}/kefu_pg_${STAMP}.sql.gz" FILE="${OUT_DIR}/kefu_cloud_pg_${STAMP}.sql.gz"
echo "备份到 $FILE" echo "备份到 $FILE"
docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T postgres \ docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T postgres \
pg_dump -U "${DB_USER:-kefu}" "${DB_NAME:-kefu_sys}" | gzip > "$FILE" pg_dump -U "${DB_USER:-kefu}" "${DB_NAME:-kefu_cloud}" | gzip > "$FILE"
echo "完成: $FILE ($(du -h "$FILE" | awk '{print $1}'))" echo "完成: $FILE ($(du -h "$FILE" | awk '{print $1}'))"
+1 -1
View File
@@ -196,7 +196,7 @@ cmd_down() {
ensure_env ensure_env
log "停止容器(保留数据卷)…" log "停止容器(保留数据卷)…"
compose down compose down
log "已停止。删除数据卷请手动: docker volume rm kefu-prod_kefu_pgdata kefu-prod_kefu_miniodata" log "已停止。删除数据卷请手动: docker volume rm kefu-cloud_kefu_cloud_pgdata kefu-cloud_kefu_cloud_miniodata"
} }
cmd_status() { cmd_status() {
+4 -4
View File
@@ -1,11 +1,11 @@
services: services:
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
container_name: kefu-db container_name: kefu-cloud-db
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: kefu_sys POSTGRES_DB: kefu_cloud
ports: ports:
- "5433:5432" - "5433:5432"
volumes: volumes:
@@ -13,7 +13,7 @@ services:
minio: minio:
image: minio/minio:latest image: minio/minio:latest
container_name: kefu-minio container_name: kefu-cloud-minio
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
environment: environment:
MINIO_ROOT_USER: minioadmin MINIO_ROOT_USER: minioadmin
@@ -29,7 +29,7 @@ services:
# 注意:容器网络内仍访问 minio:9000(服务端口),宿主机映射为 9100 # 注意:容器网络内仍访问 minio:9000(服务端口),宿主机映射为 9100
minio-init: minio-init:
image: minio/mc:latest image: minio/mc:latest
container_name: kefu-minio-init container_name: kefu-cloud-minio-init
depends_on: depends_on:
- minio - minio
restart: "no" restart: "no"
+25 -25
View File
@@ -2,23 +2,23 @@
# 使用:./deploy/scripts/deploy.sh # 使用:./deploy/scripts/deploy.sh
# 或:docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod up -d --build # 或:docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod up -d --build
name: kefu-prod name: kefu-cloud
services: services:
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
container_name: kefu-prod-db container_name: kefu-cloud-db
restart: unless-stopped restart: unless-stopped
environment: environment:
POSTGRES_USER: ${DB_USER:-kefu} POSTGRES_USER: ${DB_USER:-kefu}
POSTGRES_PASSWORD: ${DB_PASSWORD:?请在 deploy/.env.prod 设置 DB_PASSWORD} POSTGRES_PASSWORD: ${DB_PASSWORD:?请在 deploy/.env.prod 设置 DB_PASSWORD}
POSTGRES_DB: ${DB_NAME:-kefu_sys} POSTGRES_DB: ${DB_NAME:-kefu_cloud}
volumes: volumes:
- kefu_pgdata:/var/lib/postgresql/data - kefu_cloud_pgdata:/var/lib/postgresql/data
networks: networks:
- kefu_net - kefu_cloud_net
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-kefu} -d ${DB_NAME:-kefu_sys}"] test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-kefu} -d ${DB_NAME:-kefu_cloud}"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 10 retries: 10
@@ -26,27 +26,27 @@ services:
minio: minio:
image: minio/minio:latest image: minio/minio:latest
container_name: kefu-prod-minio container_name: kefu-cloud-minio
restart: unless-stopped restart: unless-stopped
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
environment: environment:
MINIO_ROOT_USER: ${STORAGE_ACCESS_KEY:?请设置 STORAGE_ACCESS_KEY} MINIO_ROOT_USER: ${STORAGE_ACCESS_KEY:?请设置 STORAGE_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${STORAGE_SECRET_KEY:?请设置 STORAGE_SECRET_KEY} MINIO_ROOT_PASSWORD: ${STORAGE_SECRET_KEY:?请设置 STORAGE_SECRET_KEY}
volumes: volumes:
- kefu_miniodata:/data - kefu_cloud_miniodata:/data
networks: networks:
- kefu_net - kefu_cloud_net
# 官方镜像极简,无 curl/bash;由 minio-init 重试建桶保证就绪 # 官方镜像极简,无 curl/bash;由 minio-init 重试建桶保证就绪
minio-init: minio-init:
image: minio/mc:latest image: minio/mc:latest
container_name: kefu-prod-minio-init container_name: kefu-cloud-minio-init
depends_on: depends_on:
minio: minio:
condition: service_started condition: service_started
restart: "no" restart: "no"
networks: networks:
- kefu_net - kefu_cloud_net
entrypoint: > entrypoint: >
/bin/sh -c " /bin/sh -c "
set -e; set -e;
@@ -70,8 +70,8 @@ services:
build: build:
context: . context: .
dockerfile: deploy/docker/Dockerfile.api dockerfile: deploy/docker/Dockerfile.api
image: kefu-api:${IMAGE_TAG:-latest} image: kefu-cloud-api:${IMAGE_TAG:-latest}
container_name: kefu-prod-api container_name: kefu-cloud-api
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
postgres: postgres:
@@ -85,7 +85,7 @@ services:
DB_PORT: "5432" DB_PORT: "5432"
DB_USER: ${DB_USER:-kefu} DB_USER: ${DB_USER:-kefu}
DB_PASSWORD: ${DB_PASSWORD} DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME:-kefu_sys} DB_NAME: ${DB_NAME:-kefu_cloud}
DB_SSLMODE: ${DB_SSLMODE:-disable} DB_SSLMODE: ${DB_SSLMODE:-disable}
JWT_SECRET: ${JWT_SECRET:?请设置 JWT_SECRET} JWT_SECRET: ${JWT_SECRET:?请设置 JWT_SECRET}
STORAGE_ENDPOINT: minio:9000 STORAGE_ENDPOINT: minio:9000
@@ -100,15 +100,15 @@ services:
STORAGE_MAX_IMAGE_EDGE: ${STORAGE_MAX_IMAGE_EDGE:-1920} STORAGE_MAX_IMAGE_EDGE: ${STORAGE_MAX_IMAGE_EDGE:-1920}
STORAGE_WEBP_QUALITY: ${STORAGE_WEBP_QUALITY:-80} STORAGE_WEBP_QUALITY: ${STORAGE_WEBP_QUALITY:-80}
networks: networks:
- kefu_net - kefu_cloud_net
# 不对外暴露 8080,统一走 nginx # 不对外暴露 8080,统一走 nginx
web: web:
build: build:
context: . context: .
dockerfile: deploy/docker/Dockerfile.web dockerfile: deploy/docker/Dockerfile.web
image: kefu-web:${IMAGE_TAG:-latest} image: kefu-cloud-web:${IMAGE_TAG:-latest}
container_name: kefu-prod-web container_name: kefu-cloud-web
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
api: api:
@@ -118,13 +118,13 @@ services:
ports: ports:
- "${HTTP_PORT:-80}:80" - "${HTTP_PORT:-80}:80"
networks: networks:
- kefu_net - kefu_cloud_net
# 可选:导入演示数据(profile seed # 可选:导入演示数据(profile seed
# docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod --profile seed run --rm seed # docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod --profile seed run --rm seed
seed: seed:
image: kefu-api:${IMAGE_TAG:-latest} image: kefu-cloud-api:${IMAGE_TAG:-latest}
container_name: kefu-prod-seed container_name: kefu-cloud-seed
profiles: ["seed"] profiles: ["seed"]
depends_on: depends_on:
api: api:
@@ -134,7 +134,7 @@ services:
DB_PORT: "5432" DB_PORT: "5432"
DB_USER: ${DB_USER:-kefu} DB_USER: ${DB_USER:-kefu}
DB_PASSWORD: ${DB_PASSWORD} DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME:-kefu_sys} DB_NAME: ${DB_NAME:-kefu_cloud}
DB_SSLMODE: ${DB_SSLMODE:-disable} DB_SSLMODE: ${DB_SSLMODE:-disable}
JWT_SECRET: ${JWT_SECRET} JWT_SECRET: ${JWT_SECRET}
STORAGE_ENDPOINT: minio:9000 STORAGE_ENDPOINT: minio:9000
@@ -145,13 +145,13 @@ services:
STORAGE_PUBLIC_BASE_URL: ${STORAGE_PUBLIC_BASE_URL} STORAGE_PUBLIC_BASE_URL: ${STORAGE_PUBLIC_BASE_URL}
entrypoint: ["/app/seed"] entrypoint: ["/app/seed"]
networks: networks:
- kefu_net - kefu_cloud_net
restart: "no" restart: "no"
networks: networks:
kefu_net: kefu_cloud_net:
driver: bridge driver: bridge
volumes: volumes:
kefu_pgdata: kefu_cloud_pgdata:
kefu_miniodata: kefu_cloud_miniodata:
+2 -2
View File
@@ -5,7 +5,7 @@ DB_HOST=localhost
DB_PORT=5433 DB_PORT=5433
DB_USER=postgres DB_USER=postgres
DB_PASSWORD=postgres DB_PASSWORD=postgres
DB_NAME=kefu_sys DB_NAME=kefu_cloud
DB_SSLMODE=disable DB_SSLMODE=disable
JWT_SECRET=kefu-sys-dev-secret-key JWT_SECRET=kefu-cloud-dev-secret-key
+7 -7
View File
@@ -6,13 +6,13 @@ import (
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
"kefu-sys/server/internal/handler" "kefu-cloud/server/internal/handler"
"kefu-sys/server/internal/metrics" "kefu-cloud/server/internal/metrics"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
func main() { func main() {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
func main() { func main() {
+1 -1
View File
@@ -1,4 +1,4 @@
module kefu-sys/server module kefu-cloud/server
go 1.26.3 go 1.26.3
+2 -2
View File
@@ -57,11 +57,11 @@ func Load() *Config {
Port: getEnv("DB_PORT", "5433"), Port: getEnv("DB_PORT", "5433"),
User: getEnv("DB_USER", "postgres"), User: getEnv("DB_USER", "postgres"),
Password: getEnv("DB_PASSWORD", "postgres"), Password: getEnv("DB_PASSWORD", "postgres"),
Name: getEnv("DB_NAME", "kefu_sys"), Name: getEnv("DB_NAME", "kefu_cloud"),
SSLMode: getEnv("DB_SSLMODE", "disable"), SSLMode: getEnv("DB_SSLMODE", "disable"),
}, },
JWT: JWTConfig{ JWT: JWTConfig{
Secret: getEnv("JWT_SECRET", "kefu-sys-secret-key"), Secret: getEnv("JWT_SECRET", "kefu-cloud-secret-key"),
ExpireTime: 24 * time.Hour, ExpireTime: 24 * time.Hour,
}, },
Storage: StorageConfig{ Storage: StorageConfig{
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
) )
type AdminHandler struct { type AdminHandler struct {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
const ( const (
+1 -1
View File
@@ -3,7 +3,7 @@ package handler
import ( import (
"testing" "testing"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
func TestPickLeastLoadedPrefersFewerSessions(t *testing.T) { func TestPickLeastLoadedPrefersFewerSessions(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type AuthHandler struct{} type AuthHandler struct{}
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"strings" "strings"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type ChannelHandler struct{} type ChannelHandler struct{}
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type CustomerHandler struct{} type CustomerHandler struct{}
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
// Export 导出客户列表 CSV(沿用列表筛选与坐席可见范围)。 // Export 导出客户列表 CSV(沿用列表筛选与坐席可见范围)。
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"unicode/utf8" "unicode/utf8"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type KnowledgeHandler struct{} type KnowledgeHandler struct{}
@@ -5,7 +5,7 @@ import (
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
) )
const ( const (
+5 -5
View File
@@ -10,11 +10,11 @@ import (
"github.com/shirou/gopsutil/v4/cpu" "github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/disk" "github.com/shirou/gopsutil/v4/disk"
"github.com/shirou/gopsutil/v4/mem" "github.com/shirou/gopsutil/v4/mem"
"kefu-sys/server/internal/metrics" "kefu-cloud/server/internal/metrics"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
// OpsMetrics 平台运维实时指标(当前 API 实例视角)。 // OpsMetrics 平台运维实时指标(当前 API 实例视角)。
+3 -3
View File
@@ -2,9 +2,9 @@ package handler
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
) )
func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.StorageConfig) { func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.StorageConfig) {
@@ -15,11 +15,11 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm" "gorm.io/gorm"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
"kefu-sys/server/internal/handler" "kefu-cloud/server/internal/handler"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
) )
func setupRouter(t *testing.T) *gin.Engine { func setupRouter(t *testing.T) *gin.Engine {
+3 -3
View File
@@ -9,9 +9,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
type SessionHandler struct{} type SessionHandler struct{}
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type SettingsHandler struct{} type SettingsHandler struct{}
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type StaffHandler struct{} type StaffHandler struct{}
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
type StatisticsHandler struct{} type StatisticsHandler struct{}
+4 -4
View File
@@ -9,10 +9,10 @@ import (
"strings" "strings"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
"kefu-sys/server/internal/media" "kefu-cloud/server/internal/media"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/storage" "kefu-cloud/server/internal/storage"
) )
type UploadHandler struct { type UploadHandler struct {
+3 -3
View File
@@ -10,9 +10,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
type WidgetHandler struct{} type WidgetHandler struct{}
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"kefu-sys/server/internal/middleware" "kefu-cloud/server/internal/middleware"
"kefu-sys/server/internal/ws" "kefu-cloud/server/internal/ws"
) )
type WsHandler struct{} type WsHandler struct{}
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
var jwtSecret []byte var jwtSecret []byte
+1 -1
View File
@@ -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"
"kefu-sys/server/internal/config" "kefu-cloud/server/internal/config"
) )
// S3Storage 基于 minio-go 的 S3 兼容实现(MinIO / OSS / COS / AWS S3 // S3Storage 基于 minio-go 的 S3 兼容实现(MinIO / OSS / COS / AWS S3
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"time" "time"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"kefu-sys/server/internal/model" "kefu-cloud/server/internal/model"
) )
var upgrader = websocket.Upgrader{ var upgrader = websocket.Upgrader{