Skip to content

Conversation

@yokeTH
Copy link
Owner

@yokeTH yokeTH commented Apr 11, 2025

This pull request introduces several changes to add file management capabilities, update dependencies, and improve code structure. The most significant changes include the addition of file-related functionalities, updates to the Docker setup, and the introduction of new dependencies.

File Management Enhancements:

  • Added File model to the database migration in cmd/migrate/main.go.
  • Updated cmd/server/main.go to include new file-related use cases, repositories, and handlers. [1] [2]
  • Grouped book and file routes in cmd/server/main.go.

Docker and Environment Configuration:

  • Updated .env.example to include new environment variables for private and public buckets.
  • Added MinIO storage service to docker-compose.yml.

Dependency Updates:

  • Replaced go-json with sonic in go.mod.
  • Added several new indirect dependencies in go.mod. [1] [2] [3]

Code Refactoring:

  • Refactored BookPresenter to bookDto and implemented BookDto interface in internal/adaptor/dto/book_presenter.go.

Documentation:

  • Removed autogenerated Swagger documentation files (docs/docs.go, docs/swagger.json, docs/swagger.yaml). [1] [2] [3]

yokeTH added 13 commits April 11, 2025 23:49
Added support for multiple storage buckets and simplified the storage package
by consolidating R2-specific code into a generic S3-compatible implementation.
Environment variables were standardized and unused fields removed.
The commit swaps out goccy/go-json for bytedance/sonic JSON library, makes env
vars required, and fixes storage URL paths.
The commit includes new domain model for files and interfaces for file
operations in the usecase layer.
Since this commit introduces file handling with both public and private S3 storage support, including handlers, repository, and use case implementations, a slightly longer description in the body is warranted to capture the key components added.

Add file upload functionality with S3 storage support

Implements complete file handling flow with:
- File upload handlers for public/private storage
- File repository for persistence
- File use case with S3 storage integration
- Support for file listing and info retrieval
@yokeTH yokeTH requested a review from Copilot April 11, 2025 21:30

This comment was marked as resolved.

yokeTH and others added 15 commits April 12, 2025 04:34
The changes appear to be a file relocation and build path updates. The main
server code was moved from cmd/server/main.go to the root directory, with
corresponding updates to build commands in Makefile and air.toml.
The build job now depends on successful swagger, lint and test jobs.
Swagger docs are generated first and shared between jobs using artifacts,
preventing redundant generation.
The workflow now includes proper caching, dependency cleanup and
installation steps. Added debugging output to help troubleshoot build
failures.
yokeTH added 11 commits April 12, 2025 05:18
Since the changes involve restructuring the CI workflow into discrete jobs with proper
dependencies and artifact sharing between jobs, I'm including a body to explain the
key changes.

The key changes include:
- Splitting monolithic job into separate test/lint/build jobs
- Adding artifact upload/download for swagger docs
- Establishing proper job dependencies
- Removing test from build job
@yokeTH yokeTH merged commit 41fe02c into main Apr 12, 2025
4 checks passed
@yokeTH yokeTH deleted the feat/local-bucket-development branch April 12, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant