- Restructure handlers into file_commands/file_queries/file_handlers - Add gRPC auth client, JWT middleware, rate limiting, request ID - Add common utilities: logger, sanitizer, s3_errors - Add unit tests for config, mediator, auth, request_id, sanitize - Add proto definitions and generated code - Remove old web UI pages - Add .dockerignore and .env.example
45 lines
668 B
Go
45 lines
668 B
Go
package handlers
|
|
|
|
import (
|
|
"io"
|
|
|
|
"rag/file-system/internal/common"
|
|
)
|
|
|
|
type UploadFileCommand struct {
|
|
BucketName string
|
|
FileName string
|
|
Data io.Reader
|
|
}
|
|
|
|
type DeleteFileCommand struct {
|
|
BucketName string
|
|
ObjectKey string
|
|
}
|
|
|
|
type InitMultipartCommand struct {
|
|
BucketName string
|
|
ObjectKey string
|
|
}
|
|
|
|
type UploadPartCommand struct {
|
|
BucketName string
|
|
ObjectKey string
|
|
UploadId string
|
|
PartNumber int32
|
|
Data io.Reader
|
|
}
|
|
|
|
type CompleteMultipartCommand struct {
|
|
BucketName string
|
|
ObjectKey string
|
|
UploadId string
|
|
Parts []common.Part
|
|
}
|
|
|
|
type AbortMultipartCommand struct {
|
|
BucketName string
|
|
ObjectKey string
|
|
UploadId string
|
|
}
|