Discover Packages
github.com/shortlink-org/shortlink/internal/services/api-gateway
module
Version:
v0.0.0-...-8640b18
Opens a new window with list of versions in this module.
Published: Dec 8, 2023
License: MIT
Opens a new window with license information.
README
README
¶
API Gateway Service
[!NOTE]
This is the gateway service that serves as an interface for external clients,
leveraging multiple communication protocols and API designs.
ADR
ADR-0001 - Init project
ADR-0002 - Split API Gateway Service into Separate Services for Each Protocol
ADR-0003 - Adding WebSocket Protocol Support
HTTP API
Supported Protocols:
HTTP REST API: Implemented using 'chi' for optimal integration and high performance.
GraphQL API: An excellent alternative to REST APIs for handling complex, interrelated data structures.
WebSocket API: A protocol that enables two-way persistent communication channels over TCP connections.
gRPC-gateway: Provides a way to call gRPC methods over HTTP, making your gRPC service more accessible to more client types.
CloudEvents (Optional): An open-standard specification for defining event data in a common way, facilitating interoperability across services, platforms, and systems.
Architecture
We use the C4 model to describe architecture.
Context diagram
!include https://raw.githubusercontent.com/shortlink-org/shortlink/main/docs/c4/containers/preset/common.puml
!include https://raw.githubusercontent.com/shortlink-org/shortlink/main/docs/c4/containers/preset/c1.puml
!include actors/customer.puml
!include boundaries/gateway.puml
!include boundaries/auth.puml
!include boundaries/link.puml
customer --> gatewayBoundary : uses
gatewayBoundary --> authBoundary : check auth
gatewayBoundary --> linkBoundary : create link
Expand ▾
Collapse ▴
Directories
¶
gateways
Package v1 is a reverse proxy.
Click to show internal directories.
Click to hide internal directories.