This project implements a distributed file storage system in Go. It allows users to store, retrieve, and manage files across multiple nodes in a network.
- Store files in a distributed manner
- Retrieve files using unique identifiers
- Delete files from the storage
- HTTP API for file operations
distributed-file-storage
├── cmd
│ └── main.go # Entry point of the application
├── internal
│ ├── storage
│ │ ├── storage.go # Storage mechanism for files
│ │ └── storage_test.go # Unit tests for storage functions
│ ├── server
│ │ ├── server.go # HTTP server and API endpoints
│ │ └── server_test.go # Unit tests for server API
├── pkg
│ └── utils
│ ├── utils.go # Utility functions
│ └── utils_test.go # Unit tests for utility functions
├── go.mod # Module dependencies
├── go.sum # Module dependency checksums
└── README.md # Project documentation
-
Clone the repository:
git clone https://github.com/yourusername/distributed-file-storage.git cd distributed-file-storage
-
Install dependencies:
go mod tidy
-
Run the application:
go run cmd/main.go
- Upload a file: Send a POST request to
/upload
with the file data. - Download a file: Send a GET request to
/download/{fileID}
. - Delete a file: Send a DELETE request to
/delete/{fileID}
.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.