package-api

module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0

README

OpenGApps Package API CircleCI Go Report Card

This is the implementation of the opengapps.org backend.

This project adheres to the Golang project-layout structure.

Purpose

Since the website has transitioned to the SourceForge storage from Github releases, we've lost Github API support.

So, to compensate for that, this service was created.

Installation

The service uses Go modules for vendoring.

To install it, starting with Go 1.12 you can just use go get:

go get github.com/opengapps/package-api/cmd/package-api

Also you can clone this repo and use the build/install/run targets from Makefile.

Configuration

You can use any config file format supported by Viper library (currently our preferred format is TOML).

In case you don't want to use local config, it will rely on ENV variables with prefix PACKAGE_API_ (can be changed in Makefile).

Example config can be found at config_example.toml.

Usage

This API only exposes two endpoints: /list and /download.

Request format
Method Endpoint Parameters
GET /list None
GET /download arch={ARCHITECTURE}&api={API}&variant={VARIANT}&date={DATE}
Response codes
  • 200: successful response;
  • 404: on bad request format or improper parameters;
  • 500: mostly on external call failures.

Directories

Path Synopsis
cmd
package-api
package-api enables user to interact with Open GApps packages.
package-api enables user to interact with Open GApps packages.
internal
app
pkg
gapps Module

Jump to

Keyboard shortcuts

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