Skip to content

Commit

Permalink
fix!: change name to 'dgate-io/dgate-api'
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbajoe committed Nov 27, 2024
1 parent eee44cb commit 7695778
Show file tree
Hide file tree
Showing 125 changed files with 303 additions and 303 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: dgate-io/dgate
slug: dgate-io/dgate-api

- name: Benchmark
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
- name: Install dgate-cli and dgate-server
run: |
go install github.com/dgate-io/dgate/cmd/dgate-cli
go install github.com/dgate-io/dgate-api/cmd/dgate-cli
dgate-cli --version
go install github.com/dgate-io/dgate/cmd/dgate-server
go install github.com/dgate-io/dgate-api/cmd/dgate-server
dgate-server --version
- name: Install jq
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# DGate - Distributed API Gateway

[![Go Report Card](https://goreportcard.com/badge/github.com/dgate-io/dgate)](https://goreportcard.com/report/github.com/dgate-io/dgate)
[![Go Reference](https://pkg.go.dev/badge/github.com/dgate-io/dgate.svg)](https://pkg.go.dev/github.com/dgate-io/dgate)
[![CI](https://github.com/dgate-io/dgate/actions/workflows/ci.yml/badge.svg)](https://github.com/dgate-io/dgate/actions/workflows/ci.yml)
[![E2E](https://github.com/dgate-io/dgate/actions/workflows/e2e.yml/badge.svg)](https://github.com/dgate-io/dgate/actions/workflows/e2e.yml)
[![codecov](https://codecov.io/gh/dgate-io/dgate/graph/badge.svg?token=KIDT82HSO9)](https://codecov.io/gh/dgate-io/dgate)
[![Go Report Card](https://goreportcard.com/badge/github.com/dgate-io/dgate-api)](https://goreportcard.com/report/github.com/dgate-io/dgate-api)
[![Go Reference](https://pkg.go.dev/badge/github.com/dgate-io/dgate-api.svg)](https://pkg.go.dev/github.com/dgate-io/dgate-api)
[![CI](https://github.com/dgate-io/dgate-api/actions/workflows/ci.yml/badge.svg)](https://github.com/dgate-io/dgate-api/actions/workflows/ci.yml)
[![E2E](https://github.com/dgate-io/dgate-api/actions/workflows/e2e.yml/badge.svg)](https://github.com/dgate-io/dgate-api/actions/workflows/e2e.yml)
[![codecov](https://codecov.io/gh/dgate-io/dgate-api/graph/badge.svg?token=KIDT82HSO9)](https://codecov.io/gh/dgate-io/dgate-api)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![GitHub Release](https://img.shields.io/github/v/release/dgate-io/dgate)
![GitHub Release](https://img.shields.io/github/v/release/dgate-io/dgate-api)


DGate is a distributed API Gateway built for developers. DGate allows you to use JavaScript/TypeScript to modify request/response data(L7). Inspired by [k6](https://github.com/grafana/k6) and [kong](https://github.com/Kong/kong).
Expand All @@ -21,7 +21,7 @@ http://dgate.io/docs/getting-started

```bash
# requires go 1.22+
go install github.com/dgate-io/dgate/cmd/dgate-server@latest
go install github.com/dgate-io/dgate-api/cmd/dgate-server@latest
```

## Application Architecture
Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/collection_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/document_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/domain_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/module_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/namespace_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/route_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dgate-cli/commands/run_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"runtime/debug"
"strings"

"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/urfave/cli/v2"
"golang.org/x/term"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/run_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/secret_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/commands/service_cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dgate-cli/commands/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"strings"

"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate-api/internal/config"
ms "github.com/mitchellh/mapstructure"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/dgate-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/dgate-io/dgate/cmd/dgate-cli/commands"
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate-api/cmd/dgate-cli/commands"
"github.com/dgate-io/dgate-api/pkg/dgclient"
)

var version string = "dev"
Expand Down
8 changes: 4 additions & 4 deletions cmd/dgate-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

"runtime/debug"

"github.com/dgate-io/dgate/internal/admin"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/internal/proxy"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/internal/proxy"
"github.com/dgate-io/dgate-api/pkg/util"
"github.com/spf13/pflag"
)

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/dgate-io/dgate
module github.com/dgate-io/dgate-api

go 1.22.0

Expand Down
6 changes: 3 additions & 3 deletions internal/admin/admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/dgate-io/chi-router"
"github.com/dgate-io/chi-router/middleware"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/util"
"go.uber.org/zap"

"golang.org/x/net/http2"
Expand Down
4 changes: 2 additions & 2 deletions internal/admin/admin_fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"io"

"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/hashicorp/raft"
"go.uber.org/zap"
)
Expand Down
14 changes: 7 additions & 7 deletions internal/admin/admin_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"time"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/raftadmin"
"github.com/dgate-io/dgate/pkg/rafthttp"
"github.com/dgate-io/dgate/pkg/storage"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate/pkg/util/logadapter"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/raftadmin"
"github.com/dgate-io/dgate-api/pkg/rafthttp"
"github.com/dgate-io/dgate-api/pkg/storage"
"github.com/dgate-io/dgate-api/pkg/util"
"github.com/dgate-io/dgate-api/pkg/util/logadapter"
"github.com/hashicorp/raft"
boltdb "github.com/hashicorp/raft-boltdb/v2"
"go.uber.org/zap"
Expand Down
10 changes: 5 additions & 5 deletions internal/admin/admin_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strings"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/admin/routes"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate/pkg/util/iplist"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/admin/routes"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/util"
"github.com/dgate-io/dgate-api/pkg/util/iplist"
"github.com/hashicorp/raft"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/otel"
Expand Down
6 changes: 3 additions & 3 deletions internal/admin/admin_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate/testutil"
"github.com/dgate-io/dgate/internal/config/configtest"
"github.com/dgate-io/dgate/pkg/resources"
"github.com/dgate-io/dgate-api/internal/admin/changestate/testutil"
"github.com/dgate-io/dgate-api/internal/config/configtest"
"github.com/dgate-io/dgate-api/pkg/resources"
"go.uber.org/zap"
)

Expand Down
8 changes: 4 additions & 4 deletions internal/admin/changestate/change_state.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package changestate

import (
"github.com/dgate-io/dgate/internal/proxy"
"github.com/dgate-io/dgate/pkg/raftadmin"
"github.com/dgate-io/dgate/pkg/resources"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/internal/proxy"
"github.com/dgate-io/dgate-api/pkg/raftadmin"
"github.com/dgate-io/dgate-api/pkg/resources"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/hashicorp/raft"
)

Expand Down
8 changes: 4 additions & 4 deletions internal/admin/changestate/testutil/change_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"io"
"log/slog"

"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/pkg/resources"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate/pkg/raftadmin"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/pkg/resources"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/raftadmin"
"github.com/hashicorp/raft"
"github.com/stretchr/testify/mock"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/admin/routes/collection_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/util"
"github.com/santhosh-tekuri/jsonschema/v5"
"go.uber.org/zap"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/admin/routes/domain_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/util"
"go.uber.org/zap"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/admin/routes/misc_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/util"
)

func ConfigureChangeLogAPI(server chi.Router, cs changestate.ChangeState, appConfig *config.DGateConfig) {
Expand Down
8 changes: 4 additions & 4 deletions internal/admin/routes/module_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/util"
"go.uber.org/zap"
)

Expand Down
14 changes: 7 additions & 7 deletions internal/admin/routes/module_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"testing"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate/testutil"
"github.com/dgate-io/dgate/internal/admin/routes"
"github.com/dgate-io/dgate/internal/config/configtest"
"github.com/dgate-io/dgate/internal/proxy"
"github.com/dgate-io/dgate/pkg/dgclient"
"github.com/dgate-io/dgate/pkg/resources"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate-api/internal/admin/changestate/testutil"
"github.com/dgate-io/dgate-api/internal/admin/routes"
"github.com/dgate-io/dgate-api/internal/config/configtest"
"github.com/dgate-io/dgate-api/internal/proxy"
"github.com/dgate-io/dgate-api/pkg/dgclient"
"github.com/dgate-io/dgate-api/pkg/resources"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
Expand Down
8 changes: 4 additions & 4 deletions internal/admin/routes/namespace_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http"

"github.com/dgate-io/chi-router"
"github.com/dgate-io/dgate/internal/admin/changestate"
"github.com/dgate-io/dgate/internal/config"
"github.com/dgate-io/dgate/pkg/spec"
"github.com/dgate-io/dgate/pkg/util"
"github.com/dgate-io/dgate-api/internal/admin/changestate"
"github.com/dgate-io/dgate-api/internal/config"
"github.com/dgate-io/dgate-api/pkg/spec"
"github.com/dgate-io/dgate-api/pkg/util"
"go.uber.org/zap"
)

Expand Down
Loading

0 comments on commit 7695778

Please sign in to comment.