DEV Community

Ortiz de Arcanjo António David
Ortiz de Arcanjo António David

Posted on

1

Middleware usando Golang

Nas aplicações Web, os middlewares são usados para aplicar lógica global a todas as solicitações, antes que elas atinjam os controllers (ou handlers).

Essas tarefas podem incluir autenticação, autorização, manipulação de cookies, logging, compressão de resposta, entre outros.

Os middlewares têm a capacidade de interceptar uma solicitação antes que ela atinja a lógica do controller, processar ou modificar a solicitação e a resposta, e então passá-las adiante na cadeia de middlewares ou enviá-las para o controller correspondente.

Código fonte: https://github.com/ortizdavid/golang-fiber-webApp

Image description

Image description

Image description

Image description

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more