go-link-shortener-backend, v1.5
Posted on

Back-end of the service for shorting links.
Formatting a counter as an integer number in the 62 base when generating link codes.
Change Log
- generating link codes:
- formatting a counter as an integer number in the 62 base.
Features
- RESTful API:
- link model:
- creating by an URL;
- getting by a code;
- representing in a JSON:
- payloads:
- of requests;
- of responses;
- errors;
- payloads:
- link model:
- generating link codes:
- using a version 4 UUID;
- using sequential counters:
- formatting:
- formatting a counter as an integer number in the 10 base;
- formatting a counter as an integer number in the 62 base;
- storing:
- storing in a database only counters chunks;
- storing counters themselves in memory;
- sharding:
- sharding counters chunks;
- selecting a shard of a counter chunk at random;
- formatting:
- server:
- additional routing:
- redirecting to the link URL by its code;
- serving static files;
- storing settings in environment variables;
- supporting graceful shutdown;
- logging:
- logging requests;
- logging errors;
- panics:
- recovering on panics;
- logging of panics;
- additional routing:
- databases:
- distributing:
- Docker image;
- Docker Compose configuration.
Repository
Link: https://github.com/thewizardplusplus/go-link-shortener-backend/tree/v1.5.
Content: code.
License: MIT.