feat: add image management functionality

- Implemented image folder repository with CRUD operations.
- Added image reference repository for managing image references to articles.
- Created image repository for handling image assets, including listing, inserting, updating, and deleting images.
- Introduced image usage repository to track storage usage and quotas for tenants.
- Added SQL queries for image assets, folders, references, and usage.
- Developed image handler for HTTP endpoints to manage images and folders.
- Created database migration scripts for image-related tables and structures.
This commit is contained in:
2026-04-16 20:40:41 +08:00
parent 0a3558fc51
commit 27389164b0
57 changed files with 8063 additions and 153 deletions
+5 -3
View File
@@ -5,6 +5,7 @@ go 1.22.2
require (
github.com/alicebob/miniredis/v2 v2.37.0
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/chai2010/webp v1.4.0
github.com/extrame/xls v0.0.1
github.com/gin-gonic/gin v1.9.1
github.com/golang-jwt/jwt/v5 v5.2.1
@@ -15,6 +16,7 @@ require (
github.com/qdrant/go-client v1.13.0
github.com/rabbitmq/amqp091-go v1.10.0
github.com/redis/go-redis/v9 v9.5.1
github.com/robfig/cron/v3 v3.0.1
github.com/sergi/go-diff v1.4.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
@@ -22,7 +24,10 @@ require (
github.com/xuri/excelize/v2 v2.8.1
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.31.0
golang.org/x/image v0.14.0
golang.org/x/net v0.33.0
golang.org/x/sync v0.10.0
gopkg.in/yaml.v3 v3.0.1
)
require (
@@ -61,7 +66,6 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.3 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@@ -79,7 +83,6 @@ require (
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.5.0 // indirect
@@ -88,5 +91,4 @@ require (
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)