taronja-gateway

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2025 License: MIT Imports: 10 Imported by: 0

README

Taronja Gateway

Taronja Gateway is an API and application gateway.

It serves as an entry point for your API server and your frontend application, handling routing, authentication, sessions, and many more features, leaving your application code clean and focused on business logic.

Features

Features table, shows what is implemented and what is planned.

Feature Status
Gateway
Authentication
Authentication: Basic
Authentication: OAuth2
- OAuth2: GitHub
- OAuth2: Google
Authentication: JWT 🚧
Authorization using RBAC 🚧
Sessions
User management 🚧
Rate Limiting 🚧
Circuit breaker 🚧
Caching 🚧
Logging
Monitoring 🚧
Load Balancing 🚧
more... 🚧

Commands

The Taronja Gateway CLI provides the following commands:

  • Run the Gateway:

    ./tg run --config ./sample/config.yaml
    

    This command starts the Taronja API Gateway using the configuration file specified by the --config flag.

  • Add a new user:

    ./tg adduser <username> <email> <password>
    

    This command creates a new user in the database with the provided username, email, and password.

Building and Releasing

Development Builds
# Build the binary
make build

# Run tests
make test

# Generate test coverage report
make cover

# Run in development mode with automatic restart on file changes
make dev
Release Process

Taronja Gateway uses GoReleaser for building and publishing releases.

# Install GoReleaser
make setup-goreleaser

# Check GoReleaser configuration
make release-check

# Create a local snapshot release (for testing)
make release-local

# Build Docker image locally
make release-docker
GitHub Releases

When a new version is ready to be released:

  1. Tag the commit with a semantic version:

    git tag -a v1.0.0 -m "Release v1.0.0"
    git push origin v1.0.0
    
  2. Create a new release on GitHub, pointing to the created tag.

  3. The GitHub action will automatically:

    • Build binaries for multiple platforms
    • Create Docker images
    • Generate coverage reports
    • Publish all artifacts to the GitHub release

Installation

Quick Install (All Platforms)
curl -fsSL https://github.com/jmaister/taronja-gateway/raw/main/scripts/install.sh | bash

This script detects your OS and architecture, downloads the latest release, and installs it to your system path.

Windows Installation
powershell -Command "Invoke-WebRequest -Uri 'https://github.com/jmaister/taronja-gateway/raw/main/scripts/install.bat' -OutFile 'install.bat'" && install.bat

The Windows installer places the binary in %USERPROFILE%\bin. Add this directory to your PATH to use tg from anywhere.

Version Information

You can check the current version of your installation:

./tg version

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
filepath: c:\dev\workspace\taronja-gateway\db\mockdb.go
filepath: c:\dev\workspace\taronja-gateway\db\mockdb.go
filepath: c:\dev\workspace\taronja-gateway\middleware\logging.go
filepath: c:\dev\workspace\taronja-gateway\middleware\logging.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL