A simple file server built with Gin framework, featuring file uploads, downloads, and tracking of upload history in MySQL using GORM, as well as event notification using Kafka-go and logging with Zap.
Development Plan
Use the Gin module to write an HTTP server with two endpoints. Use a POST request to upload a file to the server, and a GET request to download a specific file from the server.
Use the GORM module to log the history of all file uploads to MySQL, and add an endpoint to query these records from the database.
Use the Segmentio/kafka-go module to push file upload events to Kafka.
Use the Zap module to log server running messages for easy troubleshooting and issue resolution.
Build a simple CLI interface for user interaction, such as accepting user input and performing corresponding actions, displaying results, and other operations. Use the Go standard library or other third-party libraries to implement features such as menu selectors and input prompts.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.