Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: service name #1

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'main'

jobs:
converge:
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/actions_branch.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Builds the docs and deploys to GitHub pages
#
# https://github.com/actions/setup-node
# Using https://github.com/marketplace/actions/deploy-to-github-pages
name: Deploy to Github pages

on:
workflow_dispatch:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'

jobs:
converge:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ docker-compose.yaml
docs/node_modules
docs/web_deploy
vendor/
airdrop-svc
evm-airdrop-svc
.DS_Store
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ FROM golang:1.22-alpine as buildbase

RUN apk add git build-base

WORKDIR /go/src/github.com/rarimo/airdrop-svc
WORKDIR /go/src/github.com/rarimo/evm-airdrop-svc
COPY vendor .
COPY . .

RUN GOOS=linux go build -o /usr/local/bin/airdrop-svc /go/src/github.com/rarimo/airdrop-svc
RUN GOOS=linux go build -o /usr/local/bin/evm-airdrop-svc /go/src/github.com/rarimo/evm-airdrop-svc


FROM alpine:3.9

COPY --from=buildbase /usr/local/bin/airdrop-svc /usr/local/bin/airdrop-svc
COPY --from=buildbase /usr/local/bin/evm-airdrop-svc /usr/local/bin/evm-airdrop-svc
RUN apk add --no-cache ca-certificates

ENTRYPOINT ["airdrop-svc"]
ENTRYPOINT ["evm-airdrop-svc"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# airdrop-svc
# evm-airdrop-svc

## Description

Expand All @@ -7,8 +7,8 @@ Service to manage airdrops for passport ZK-proofs
## Install

```
git clone github.com/rarimo/airdrop-svc
cd airdrop-svc
git clone github.com/rarimo/evm-airdrop-svc
cd evm-airdrop-svc
go build main.go
export KV_VIPER_FILE=./config.yaml
./main migrate up
Expand All @@ -17,7 +17,7 @@ export KV_VIPER_FILE=./config.yaml

## API documentation

[Online docs](https://rarimo.github.io/airdrop-svc/) are available.
[Online docs](https://rarimo.github.io/evm-airdrop-svc/) are available.

All endpoints from docs MUST be publicly accessible.

Expand Down
2 changes: 1 addition & 1 deletion docs/.redoclyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

apiTitle: airdrop-svc
apiTitle: evm-airdrop-svc
splitSpec: true
codeSamples: false
swaggerUI: true
Expand Down
4 changes: 2 additions & 2 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "airdrop-svc",
"name": "evm-airdrop-svc",
"version": "1.0.0",
"dependencies": {
"@tokend/redoc-cli": "^0.9.9",
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
version: 1.0.0
title: airdrop-svc
title: evm-airdrop-svc
description: ''
servers:
- url: 'https://api.stage.rarime.com'
Expand Down
2 changes: 1 addition & 1 deletion docs/web/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="utf8" />
<title>airdrop-svc Service Documentation</title>
<title>evm-airdrop-svc Service Documentation</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
Expand Down
2 changes: 1 addition & 1 deletion docs/web/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>airdrop-svc | ReDoc</title>
<title>evm-airdrop-svc | ReDoc</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="favicon.png">
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/rarimo/airdrop-svc
module github.com/rarimo/evm-airdrop-svc

go 1.22

Expand Down
6 changes: 3 additions & 3 deletions internal/broadcaster/broadcaster.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package broadcaster provides the functionality to broadcast transactions to
// the blockchain. It is similar to https://github.com/rarimo/broadcaster-svc,
// but is integrated into airdrop-svc purposely. The mentioned broadcaster does
// but is integrated into evm-airdrop-svc purposely. The mentioned broadcaster does
// not allow you to track even successful transaction submission.
//
// The reason of broadcasting implementation is the same: account sequence
Expand All @@ -19,8 +19,8 @@ import (
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/rarimo/airdrop-svc/internal/config"
"github.com/rarimo/airdrop-svc/internal/data"
"github.com/rarimo/evm-airdrop-svc/internal/config"
"github.com/rarimo/evm-airdrop-svc/internal/data"
ethermint "github.com/rarimo/rarimo-core/ethermint/types"
"gitlab.com/distributed_lab/logan/v3"
"gitlab.com/distributed_lab/running"
Expand Down
8 changes: 4 additions & 4 deletions internal/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"syscall"

"github.com/alecthomas/kingpin"
"github.com/rarimo/airdrop-svc/internal/broadcaster"
"github.com/rarimo/airdrop-svc/internal/config"
"github.com/rarimo/airdrop-svc/internal/service"
"github.com/rarimo/evm-airdrop-svc/internal/broadcaster"
"github.com/rarimo/evm-airdrop-svc/internal/config"
"github.com/rarimo/evm-airdrop-svc/internal/service"
"gitlab.com/distributed_lab/kit/kv"
"gitlab.com/distributed_lab/logan/v3"
)
Expand All @@ -25,7 +25,7 @@ func Run(args []string) bool {
var (
cfg = config.New(kv.MustFromEnv())
log = cfg.Log()
app = kingpin.New("airdrop-svc", "")
app = kingpin.New("evm-airdrop-svc", "")
runCmd = app.Command("run", "run command")
serviceCmd = runCmd.Command("service", "run service")
migrateCmd = app.Command("migrate", "migrate command")
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/migrate.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cli

import (
"github.com/rarimo/airdrop-svc/internal/assets"
"github.com/rarimo/airdrop-svc/internal/config"
"github.com/rarimo/evm-airdrop-svc/internal/assets"
"github.com/rarimo/evm-airdrop-svc/internal/config"
migrate "github.com/rubenv/sql-migrate"
"gitlab.com/distributed_lab/logan/v3/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/service/handlers/create_airdrop.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"net/http"

"github.com/rarimo/airdrop-svc/internal/data"
"github.com/rarimo/airdrop-svc/internal/service/requests"
"github.com/rarimo/evm-airdrop-svc/internal/data"
"github.com/rarimo/evm-airdrop-svc/internal/service/requests"
zk "github.com/rarimo/zkverifier-kit"
"github.com/rarimo/zkverifier-kit/identity"
"gitlab.com/distributed_lab/ape"
Expand Down
4 changes: 2 additions & 2 deletions internal/service/handlers/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"net/http"

"github.com/rarimo/airdrop-svc/internal/config"
"github.com/rarimo/airdrop-svc/internal/data"
"github.com/rarimo/evm-airdrop-svc/internal/config"
"github.com/rarimo/evm-airdrop-svc/internal/data"
zk "github.com/rarimo/zkverifier-kit"
"gitlab.com/distributed_lab/logan/v3"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/service/handlers/get_airdrop.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package handlers
import (
"net/http"

data "github.com/rarimo/airdrop-svc/internal/data"
"github.com/rarimo/airdrop-svc/internal/service/requests"
"github.com/rarimo/airdrop-svc/resources"
data "github.com/rarimo/evm-airdrop-svc/internal/data"
"github.com/rarimo/evm-airdrop-svc/internal/service/requests"
"github.com/rarimo/evm-airdrop-svc/resources"
"gitlab.com/distributed_lab/ape"
"gitlab.com/distributed_lab/ape/problems"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/service/handlers/get_airdrop_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handlers
import (
"net/http"

"github.com/rarimo/airdrop-svc/resources"
"github.com/rarimo/evm-airdrop-svc/resources"
"gitlab.com/distributed_lab/ape"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/service/handlers/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net/http"

"github.com/rarimo/airdrop-svc/internal/data"
"github.com/rarimo/evm-airdrop-svc/internal/data"
"gitlab.com/distributed_lab/kit/pgdb"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/service/requests/create_airdrop.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

val "github.com/go-ozzo/ozzo-validation/v4"
"github.com/rarimo/airdrop-svc/resources"
"github.com/rarimo/evm-airdrop-svc/resources"
)

func NewCreateAirdrop(r *http.Request) (req resources.CreateAirdropRequest, err error) {
Expand Down
6 changes: 3 additions & 3 deletions internal/service/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/cosmos/cosmos-sdk/types"
"github.com/go-chi/chi"
"github.com/rarimo/airdrop-svc/internal/config"
"github.com/rarimo/airdrop-svc/internal/service/handlers"
"github.com/rarimo/evm-airdrop-svc/internal/config"
"github.com/rarimo/evm-airdrop-svc/internal/service/handlers"
"gitlab.com/distributed_lab/ape"
)

Expand All @@ -25,7 +25,7 @@ func Run(ctx context.Context, cfg *config.Config) {
),
handlers.DBCloneMiddleware(cfg.DB()),
)
r.Route("/integrations/airdrop-svc/airdrops", func(r chi.Router) {
r.Route("/integrations/evm-airdrop-svc/airdrops", func(r chi.Router) {
r.Post("/", handlers.CreateAirdrop)
r.Get("/{nullifier}", handlers.GetAirdrop)
r.Get("/params", handlers.GetAirdropParams)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/rarimo/airdrop-svc/internal/cli"
"github.com/rarimo/evm-airdrop-svc/internal/cli"
)

func main() {
Expand Down
20 changes: 10 additions & 10 deletions werf.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
configVersion: 1
project: "airdrop-svc"
project: "evm-airdrop-svc"
---
image: builder
from: golang:1.22-alpine
docker:
WORKDIR: /go/src/github.com/rarimo/airdrop-svc
WORKDIR: /go/src/github.com/rarimo/evm-airdrop-svc
git:
- add: /
to: /go/src/github.com/rarimo/airdrop-svc
to: /go/src/github.com/rarimo/evm-airdrop-svc
stageDependencies:
install:
- go.mod
Expand All @@ -20,30 +20,30 @@ shell:
- export CGO_ENABLED=1
- export GO111MODULE=on
- export GOOS=linux
- cd /go/src/github.com/rarimo/airdrop-svc
- cd /go/src/github.com/rarimo/evm-airdrop-svc
- go mod tidy
- go mod vendor
setup:
- export CGO_ENABLED=1
- export GO111MODULE=on
- export GOOS=linux
- cd /go/src/github.com/rarimo/airdrop-svc
- go build -o /usr/local/bin/airdrop-svc /go/src/github.com/rarimo/airdrop-svc
- cd /go/src/github.com/rarimo/evm-airdrop-svc
- go build -o /usr/local/bin/evm-airdrop-svc /go/src/github.com/rarimo/evm-airdrop-svc

---
image: service
from: alpine:3.9
docker:
ENTRYPOINT: airdrop-svc
ENTRYPOINT: evm-airdrop-svc
shell:
setup:
- apk add --no-cache ca-certificates
import:
- image: builder
add: /usr/local/bin/airdrop-svc
to: /usr/local/bin/airdrop-svc
add: /usr/local/bin/evm-airdrop-svc
to: /usr/local/bin/evm-airdrop-svc
after: setup
- image: builder
add: /go/src/github.com/rarimo/airdrop-svc/verification_key.json
add: /go/src/github.com/rarimo/evm-airdrop-svc/verification_key.json
to: /verification_key.json
after: setup
Loading