Skip to content

BenjaminFourmaux/quay-go-api

Repository files navigation

Quay Go API

An API designed to be deployed alongside the official Quay Registry API and to interface with Quay's database to provide features for automation.

Get stated 🚀

Local 💻

Requirements:

  • GO >= 1.24
  • Quay registry setup
    • Database PostgreSQL or MySQL are both supported
    • Quay API token (superuser)

Download dependancies

go mod download

Run the app

export DB_TYPE=postgres # Database type (postrges of mysql)
export DB_DSN="postgres://user:password@localhost:5432/quay" # ConnectionString to the database
export PORT=8080 # (optional) Port where the api is listening (default: 8080)
export LOG_LEVEL=DEBUG # (optional) Adjust the log verbosity. Can be "DEBUG", "INFO", "WARNING" or "ERROR" (default: "DEBUG")
go run main.go

Open the swagger, go to http://localhost:8080/swagger/index.html

Generate swagger docs

go install github.com/swaggo/swag/cmd/swag@latest
swag init

Docker image 🐳

Pull the Docker image from Docker Hub

docker pull benjaminfourmauxb/quay-go-api:latest

Run the container

docker run -d -e DB_TYPE=postgres -e DB_DSN=postgres://user:password@localhost:5432/quay -p 8080:8080 benjaminfourmauxb/quay-go-api:latest

Features ✨

  • Direct database connection — Connects directly to the Quay database, bypassing the Quay API layer.
  • Improved error handling — Structured and consistent error responses for easier debugging and integration.
  • Better REST compliance — Follows REST principles more closely with proper HTTP methods, status codes, and resource naming.

For more details, see the Wiki.

Version

  • [coming soon][v1] First API version with basic actions

Contributors 👪

Licence ⚖️

All files on this project is under Apache License v2. You can:

  • Reuse the code
  • Modified the code
  • Build the code

You must Mention the © Copyright if you use and modified code for your own profit. Thank you

© 2026 - Benjamin Fourmaux - All right reserved

About

A wrapper for Quay registry API written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors