This commit is contained in:
2025-10-24 21:44:15 +08:00
parent 2f56813874
commit 289812aac3
18 changed files with 576 additions and 100 deletions

View File

@@ -0,0 +1,31 @@
package logic
import (
"context"
"git.cialloo.com/CiallooWeb/Blog/app/internal/svc"
"git.cialloo.com/CiallooWeb/Blog/app/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type DownloadPresignedURLLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// Get presigned URL for file download
func NewDownloadPresignedURLLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DownloadPresignedURLLogic {
return &DownloadPresignedURLLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *DownloadPresignedURLLogic) DownloadPresignedURL(req *types.DownloadPresignedURLReq) (resp *types.DownloadPresignedURLResp, err error) {
// todo: add your logic here and delete this line
return
}

View File

@@ -0,0 +1,31 @@
package logic
import (
"context"
"git.cialloo.com/CiallooWeb/Blog/app/internal/svc"
"git.cialloo.com/CiallooWeb/Blog/app/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type PingLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// Ping the server to check if it's alive
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
return &PingLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *PingLogic) Ping(req *types.PingReq) (resp *types.PingResp, err error) {
// todo: add your logic here and delete this line
return
}

View File

@@ -0,0 +1,31 @@
package logic
import (
"context"
"git.cialloo.com/CiallooWeb/Blog/app/internal/svc"
"git.cialloo.com/CiallooWeb/Blog/app/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type UploadPresignedURLLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// Get presigned URL for file upload
func NewUploadPresignedURLLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UploadPresignedURLLogic {
return &UploadPresignedURLLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *UploadPresignedURLLogic) UploadPresignedURL(req *types.UploadPresignedURLReq) (resp *types.UploadPresignedURLResp, err error) {
// todo: add your logic here and delete this line
return
}