afifurrohman-id / tempsy

Temporary Files sharing RESTful API
https://tempsy.afifurrohman.my.id
MIT License
0 stars 0 forks source link
filesharing golang restful-api

Tempsy API

GitHub go.mod Go version GitHub Actions Workflow Status Swagger Validator Go Report Card

Simple Temporary Files sharing RESTful API with oauth2

API Documentation

OpenAPI Specification

:warning: This API is not stable yet, maybe have some breaking changes in the future.

Usage

Requirements

Installation

git clone https://github.com/afifurrohman-id/tempsy.git
cd tempsy
cat <<EOENV > configs/.env

# Server
GOOGLE_CLOUD_STORAGE_BUCKET=example-google-cloud-storage-bucket
APP_ENV=testing
PORT=3210
SERVER_URL=https://example.com

# Credentials
GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT=BASE64_ENCODED_JSON_GCP_SERVICE_ACCOUNT_CREDENTIAL
JWT_SECRET_KEY=example-jwt-secret-key

# Emulator
GOOGLE_CLOUD_STORAGE_EMULATOR_ENDPOINT=https://example.com/emulators/storage/v1

# testing
GOOGLE_OAUTH2_REFRESH_TOKEN_TEST=example-oauth2-refresh-token
GOOGLE_OAUTH2_CLIENT_ID_TEST=example-google-oauth2-client-id
GOOGLE_OAUTH2_CLIENT_SECRET_TEST=example-google-oauth2-client-secret

EOENV
go mod tidy

Run

make compose-up
make run
make
make build-image
make test