Skip to content

Commit

Permalink
fix: werf & module path
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Oct 31, 2023
1 parent d766631 commit aa8444f
Show file tree
Hide file tree
Showing 34 changed files with 106 additions and 97 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ FROM golang:1.19-alpine as buildbase

RUN apk add git build-base

WORKDIR /go/src/gitlab.com/rarimo/identity/kyc-service
WORKDIR /go/src/github.com/rarimo/kyc-service
COPY vendor .
COPY . .

RUN GOOS=linux go build -o /usr/local/bin/kyc-service /go/src/gitlab.com/rarimo/identity/kyc-service
RUN GOOS=linux go build -o /usr/local/bin/kyc-service /go/src/github.com/rarimo/kyc-service


FROM alpine:3.9
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Integrated identity provider:
## Install

```
git clone gitlab.com/rarimo/identity/kyc-service
git clone github.com/rarimo/kyc-service
cd kyc-service
go build main.go
export KV_VIPER_FILE=./config.yaml
Expand Down Expand Up @@ -47,8 +47,8 @@ Make sure that docker installed.
use `docker run ` with `-p 8080:80` to expose port 80 to 8080

```
docker build -t gitlab.com/rarimo/identity/kyc-service .
docker run -e KV_VIPER_FILE=/config.yaml gitlab.com/rarimo/identity/kyc-service
docker build -t github.com/rarimo/kyc-service .
docker run -e KV_VIPER_FILE=/config.yaml github.com/rarimo/kyc-service
```

## Running from Source
Expand Down
4 changes: 2 additions & 2 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
GENERATOR_IMAGE=registry.gitlab.com/tokend/openapi-go-generator:69f004b58152c83f007b593cc13e94b81d7200da


GENERATED="${GOPATH}/src/gitlab.com/rarimo/identity/kyc-service/resources"
OPENAPI_DIR="${GOPATH}/src/gitlab.com/rarimo/identity/kyc-service/docs/web_deploy"
GENERATED="${GOPATH}/src/github.com/rarimo/kyc-service/resources"
OPENAPI_DIR="${GOPATH}/src/github.com/rarimo/kyc-service/docs/web_deploy"
PACKAGE_NAME=resources

function printHelp {
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 gitlab.com/rarimo/identity/kyc-service
module github.com/rarimo/kyc-service

go 1.19

Expand Down
7 changes: 4 additions & 3 deletions internal/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package cli

import (
"context"
nonceCleaner "gitlab.com/rarimo/identity/kyc-service/internal/service/nonce_cleaner"
"os"
"os/signal"
"sync"
"syscall"

nonceCleaner "github.com/rarimo/kyc-service/internal/service/nonce_cleaner"

"github.com/alecthomas/kingpin"
"gitlab.com/distributed_lab/kit/kv"
"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/service/api"
)

func Run(args []string) bool {
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
migrate "github.com/rubenv/sql-migrate"
"gitlab.com/distributed_lab/logan/v3/errors"

"gitlab.com/rarimo/identity/kyc-service/internal/assets"
"gitlab.com/rarimo/identity/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/assets"
"github.com/rarimo/kyc-service/internal/config"
)

var migrations = &migrate.EmbedFileSystemMigrationSource{
Expand Down
3 changes: 2 additions & 1 deletion internal/cli/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package cli

import (
"context"
"gitlab.com/rarimo/identity/kyc-service/internal/config"

"github.com/rarimo/kyc-service/internal/config"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion internal/data/pg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pg
import (
"gitlab.com/distributed_lab/kit/pgdb"

"gitlab.com/rarimo/identity/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/data"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/data/pg/nonces.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"gitlab.com/rarimo/identity/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/data"

sq "github.com/Masterminds/squirrel"
"github.com/fatih/structs"
Expand Down
2 changes: 1 addition & 1 deletion internal/data/pg/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"

"gitlab.com/rarimo/identity/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/data"
)

type usersQ struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/api/handlers/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/service/core"
"github.com/rarimo/kyc-service/internal/service/core"
)

type ctxKey int
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/handlers/nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"gitlab.com/distributed_lab/ape"
"gitlab.com/distributed_lab/ape/problems"

"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/responses"
"github.com/rarimo/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/internal/service/api/responses"
)

func GetNonce(w http.ResponseWriter, r *http.Request) {
Expand Down
16 changes: 8 additions & 8 deletions internal/service/api/handlers/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import (
"gitlab.com/distributed_lab/ape"
"gitlab.com/distributed_lab/ape/problems"

providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/civic"
gcpsp "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/gitcoin_passport"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/worldcoin"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/identity_providers/civic"
gcpsp "github.com/rarimo/kyc-service/internal/service/core/identity_providers/gitcoin_passport"
"github.com/rarimo/kyc-service/internal/service/core/identity_providers/worldcoin"

"gitlab.com/rarimo/identity/kyc-service/internal/data"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/responses"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core"
"github.com/rarimo/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/internal/service/api/responses"
"github.com/rarimo/kyc-service/internal/service/core"
)

func Verify(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions internal/service/api/handlers/verify_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/gorilla/websocket"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/responses"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core"
"github.com/rarimo/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/internal/service/api/responses"
"github.com/rarimo/kyc-service/internal/service/core"
)

var TickerDuration = time.Second
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"gitlab.com/distributed_lab/logan/v3"
"gitlab.com/distributed_lab/logan/v3/errors"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/service/core"
)

type service struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/api/requests/nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
validation "github.com/go-ozzo/ozzo-validation/v4"
"github.com/pkg/errors"

"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/resources"
)

type NonceRequest struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/requests/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
iden3core "github.com/iden3/go-iden3-core"
"github.com/pkg/errors"

providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/resources"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/resources"
)

type VerifyRequest struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/responses/nonce.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package responses

import (
"gitlab.com/rarimo/identity/kyc-service/internal/crypto"
"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/internal/crypto"
"github.com/rarimo/kyc-service/resources"
)

func NewNonce(nonce string) resources.NewNonceResponse {
Expand Down
15 changes: 8 additions & 7 deletions internal/service/api/responses/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ package responses

import (
"fmt"
"net/http"

"github.com/google/jsonapi"
"github.com/google/uuid"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core"
providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/civic"
gcpsp "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/gitcoin_passport"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/worldcoin"
"net/http"
"github.com/rarimo/kyc-service/internal/service/core"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/identity_providers/civic"
gcpsp "github.com/rarimo/kyc-service/internal/service/core/identity_providers/gitcoin_passport"
"github.com/rarimo/kyc-service/internal/service/core/identity_providers/worldcoin"

"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/resources"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/responses/verify_status.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package responses

import (
"gitlab.com/rarimo/identity/kyc-service/internal/data"
"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/internal/data"
"github.com/rarimo/kyc-service/resources"
)

func NewVerifyStatus(user *data.User) resources.VerifyStatusRequest {
Expand Down
4 changes: 2 additions & 2 deletions internal/service/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/go-chi/chi"
"gitlab.com/distributed_lab/ape"

"gitlab.com/rarimo/identity/kyc-service/internal/service/api/handlers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/internal/service/api/handlers"
"github.com/rarimo/kyc-service/internal/service/api/requests"
)

func (s *service) router() chi.Router {
Expand Down
8 changes: 4 additions & 4 deletions internal/service/core/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
core "github.com/iden3/go-iden3-core"
"github.com/pkg/errors"

"gitlab.com/rarimo/identity/kyc-service/internal/crypto"
"gitlab.com/rarimo/identity/kyc-service/internal/data"
"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/crypto"
"github.com/rarimo/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/internal/service/core/issuer"
)

func (k *kycService) NewVerifyRequest(req *requests.VerifyRequest) (*data.User, error) {
Expand Down
12 changes: 6 additions & 6 deletions internal/service/core/identity_providers/civic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"github.com/pkg/errors"
"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/crypto"
"gitlab.com/rarimo/identity/kyc-service/internal/data"
providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers/civic/contracts"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/crypto"
"github.com/rarimo/kyc-service/internal/data"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/identity_providers/civic/contracts"
"github.com/rarimo/kyc-service/internal/service/core/issuer"
)

type Civic struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"github.com/pkg/errors"
"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/crypto"
"gitlab.com/rarimo/identity/kyc-service/internal/data"
providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/crypto"
"github.com/rarimo/kyc-service/internal/data"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/issuer"
)

// GitcoinPassport is an identity provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
validation "github.com/go-ozzo/ozzo-validation/v4"
"gitlab.com/distributed_lab/logan/v3/errors"

"gitlab.com/rarimo/identity/kyc-service/internal/service/api/requests"
"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/internal/service/api/requests"
"github.com/rarimo/kyc-service/resources"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/service/core/identity_providers/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package identityproviders

import (
"gitlab.com/rarimo/identity/kyc-service/internal/data"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/service/core/issuer"
)

type IdentityProvider interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import (

cryptoPkg "github.com/ethereum/go-ethereum/crypto"

"gitlab.com/rarimo/identity/kyc-service/internal/crypto"
providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/crypto"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/issuer"

"github.com/ethereum/go-ethereum/common"
"github.com/imroc/req/v3"
"github.com/pkg/errors"
"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/data"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/data"
)

type UnstoppableDomains struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/service/core/identity_providers/worldcoin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/pkg/errors"
"gitlab.com/distributed_lab/logan/v3"

"gitlab.com/rarimo/identity/kyc-service/internal/config"
"gitlab.com/rarimo/identity/kyc-service/internal/data"
providers "gitlab.com/rarimo/identity/kyc-service/internal/service/core/identity_providers"
"gitlab.com/rarimo/identity/kyc-service/internal/service/core/issuer"
"github.com/rarimo/kyc-service/internal/config"
"github.com/rarimo/kyc-service/internal/data"
providers "github.com/rarimo/kyc-service/internal/service/core/identity_providers"
"github.com/rarimo/kyc-service/internal/service/core/issuer"
)

// Worldcoin is a struct that implements the identityproviders.IdentityProvider interface
Expand Down
3 changes: 2 additions & 1 deletion internal/service/core/identity_providers/worldcoin/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package worldcoin

import (
"fmt"

validation "github.com/go-ozzo/ozzo-validation/v4"

"github.com/pkg/errors"

"gitlab.com/rarimo/identity/kyc-service/resources"
"github.com/rarimo/kyc-service/resources"
)

const (
Expand Down
Loading

0 comments on commit aa8444f

Please sign in to comment.