Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 2, 2023. It is now read-only.
/golangci-apiPublic archive

API of GolangCI

License

NotificationsYou must be signed in to change notification settings

golangci/golangci-api

 
 

CircleCIGolangCI

API

This repository contains code of API.

Development

Technologies

Go (golang), heroku, circleci, docker, redis, postgres.Web framework is a go kit wrapped with acode generation.

Preparation

Run:

docker-compose up -decho "create database api_prod;" | docker-compose exec -T pg psql -Upostgres

It runs postgres and redis needed for both api and worker.

How to run

make run_apimake run_worker

Configuration

Configurate via.env file. Dev.env may be like this:

WEB_ROOT="https://dev.golangci.com"API_URL="https://api.dev.golangci.com"GITHUB_CALLBACK_HOST=https://api.dev.golangci.comDATABASE_URL="postgresql://postgres:test@localhost:5432/api_prod?sslmode=disable"REDIS_URL="redis://127.0.0.1:6379"PORT=3000APP_NAME="GolangCI Dev"

Tests need.env.test file, overriding options from.env. There can be something like this:

DATABASE_URL="postgresql://postgres:test@localhost:5432/api_test?sslmode=disable"DATABASE_DEBUG=1

How to run tests

echo "CREATE DATABASE api_test;" | docker-compose exec -T pg psql -U postgresmake test

How to test with web

Run golangci-web, golangci-worker and golangci-api. Go tohttps://dev.golangci.com locally and it will work.

Subscriptions and Payment Gateway

Requirements

To use Subscriptions you will need to configure the env variables for the gateway of your choice.

  • Note: Currently only SecurionPay is supported and usesSECURIONPAY_SECRET andSECURIONPAY_PLANID.

Payment Gateway Callbacks

Runngrok http 3000 on your development machine, and usehttps://{ngrok_id}.ngrok.io/v1/payment/{gateway}/events as URL to receive events from the payment gateway.

  • {gateway} for SecurionPay issecurionpay.
  • {ngrok_id}'s are unique and you must update the callback URL when you restart Ngrok service.

Contributing

SeeCONTRIBUTING.

About

API of GolangCI

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors7

Languages


[8]ページ先頭

©2009-2025 Movatter.jp