https://github.com/ekovv/url-shortener
https://github.com/ekovv/url-shortener
algorithms golang postgresql
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ekovv/url-shortener
- Owner: ekovv
- Created: 2023-09-13T08:51:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T18:08:15.000Z (over 2 years ago)
- Last Synced: 2024-03-08T19:56:14.746Z (over 2 years ago)
- Topics: algorithms, golang, postgresql
- Language: Go
- Homepage:
- Size: 212 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-musthave-shortener-tpl

# 🎲 Service on Go(Gin) for shortening url using a special algorithm and storing in a database/file/memory 🎲
# 🎬 Description
Receives a link to a web resource from the client and, using a text reduction algorithm, shortens it and saves it in storage (your choice: memory, file, database) and sends it back. The new short link will automatically redirect all clients to the original (longer) link.
# 📞 Endpoints
```http
POST /
- Create link
GET /:id
- Get link
POST /api/shorten
- Create link from json
GET /ping
- Get Stats
POST /api/shorten/batch
- Batch create
GET /api/user/urls
- Get all
DELETE /api/user/urls
- Delete links
```
# 🏴☠️ Flags
```
a - ip for REST -a=host
b base url -b=base
f - path to the file to be used as a database -f=storage
d - connection string -d=connection string
```