Our great sponsors
-
For image processing, I will use the bimg library because in my opinion it has a very intuitive API and is easy to use, in addition to being very fast.
-
uuid
Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services. (by google)
Another library I'm going to use is google/uuid, because I'm going to want to rename the image that we uploaded, in order to ensure that its name is unique.
-
SonarQube
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
-
postman-app-support
Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
Now when we test our API using a tool similar to Postman you should get a result similar to this:
-
However, this article has only one prerequisite, which is the installation of libvips, otherwise it will not be possible to process the images. If you happen to have Homebrew installed on your computer, the process is simpler.
-
The framework I chose to create today's Api was Fiber, if you're used to working with Express, Koa or Fastify you'll feel at home.
-
However, this article has only one prerequisite, which is the installation of libvips, otherwise it will not be possible to process the images. If you happen to have Homebrew installed on your computer, the process is simpler.