Skip to content

Commit

Permalink
chore: Refactor the module paths to improve build (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeMahhouk authored Oct 2, 2024
1 parent f7dba36 commit e1c0350
Show file tree
Hide file tree
Showing 174 changed files with 480 additions and 480 deletions.
6 changes: 3 additions & 3 deletions cmd/proxy-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"os"

"cvm-reverse-proxy/common"
"cvm-reverse-proxy/internal/atls"
"cvm-reverse-proxy/proxy"
"github.com/flashbots/cvm-reverse-proxy/common"
"github.com/flashbots/cvm-reverse-proxy/internal/atls"
"github.com/flashbots/cvm-reverse-proxy/proxy"

"github.com/urfave/cli/v2" // imports as package "cli"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/proxy-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"syscall"
"time"

"cvm-reverse-proxy/common"
"cvm-reverse-proxy/internal/atls"
"cvm-reverse-proxy/proxy"
"github.com/flashbots/cvm-reverse-proxy/common"
"github.com/flashbots/cvm-reverse-proxy/internal/atls"
"github.com/flashbots/cvm-reverse-proxy/proxy"

"github.com/urfave/cli/v2" // imports as package "cli"
)
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 cvm-reverse-proxy
module github.com/flashbots/cvm-reverse-proxy

go 1.22.4

Expand Down
10 changes: 5 additions & 5 deletions internal/api/attestationconfigapi/cli/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ import (
"path"
"strings"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
apiclient "cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/sigstore"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"
apiclient "github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/sigstore"

"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go/aws"

"cvm-reverse-proxy/internal/staticupload"
"github.com/flashbots/cvm-reverse-proxy/internal/staticupload"
)

// VersionFormat is the format of the version name in the S3 bucket.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package client
import (
"testing"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"

"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/api/attestationconfigapi/cli/client/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"strings"
"time"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
"cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"
"github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
)

// cachedVersionsSubDir is the subdirectory in the bucket where the cached versions are stored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package client
import (
"testing"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"

"github.com/stretchr/testify/assert"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/api/attestationconfigapi/cli/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"os"
"slices"

"cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/file"
"cvm-reverse-proxy/internal/verify"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/file"
"github.com/flashbots/cvm-reverse-proxy/internal/verify"

"github.com/google/go-tdx-guest/proto/tdx"
"github.com/spf13/afero"
Expand Down
10 changes: 5 additions & 5 deletions internal/api/attestationconfigapi/cli/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"log/slog"
"path"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
"cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/logger"
"cvm-reverse-proxy/internal/staticupload"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"
"github.com/flashbots/cvm-reverse-proxy/internal/staticupload"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/attestationconfigapi/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package main
import (
"os"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/spf13/cobra"
)
Expand Down
16 changes: 8 additions & 8 deletions internal/api/attestationconfigapi/cli/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (
"os"
"time"

"cvm-reverse-proxy/internal/api/attestationconfigapi"
"cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"cvm-reverse-proxy/internal/api/fetcher"
"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/file"
"cvm-reverse-proxy/internal/logger"
"cvm-reverse-proxy/internal/staticupload"
"cvm-reverse-proxy/internal/verify"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi"
"github.com/flashbots/cvm-reverse-proxy/internal/api/attestationconfigapi/cli/client"
"github.com/flashbots/cvm-reverse-proxy/internal/api/fetcher"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/file"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"
"github.com/flashbots/cvm-reverse-proxy/internal/staticupload"
"github.com/flashbots/cvm-reverse-proxy/internal/verify"

"github.com/google/go-tdx-guest/proto/tdx"
"github.com/spf13/afero"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/attestationconfigapi/cli/validargs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"fmt"
"strings"

"cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"

"github.com/spf13/cobra"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/api/attestationconfigapi/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"context"
"fmt"

apifetcher "cvm-reverse-proxy/internal/api/fetcher"
"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/constants"
"cvm-reverse-proxy/internal/sigstore"
apifetcher "github.com/flashbots/cvm-reverse-proxy/internal/api/fetcher"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/sigstore"
)

const cosignPublicKey = constants.CosignPublicKeyReleases
Expand Down
4 changes: 2 additions & 2 deletions internal/api/attestationconfigapi/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"testing"
"time"

"cvm-reverse-proxy/internal/attestation/variant"
"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/attestationconfigapi/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sort"
"strings"

"cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"
)

// AttestationURLPath is the URL path to the attestation versions.
Expand Down
2 changes: 1 addition & 1 deletion internal/api/attestationconfigapi/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package attestationconfigapi
import (
"testing"

"cvm-reverse-proxy/internal/attestation/variant"
"github.com/flashbots/cvm-reverse-proxy/internal/attestation/variant"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions internal/api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (
"strings"
"time"

"cvm-reverse-proxy/internal/sigstore"
"cvm-reverse-proxy/internal/staticupload"
"github.com/flashbots/cvm-reverse-proxy/internal/sigstore"
"github.com/flashbots/cvm-reverse-proxy/internal/staticupload"

s3manager "github.com/aws/aws-sdk-go-v2/feature/s3/manager"
"github.com/aws/aws-sdk-go-v2/service/s3"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"net/http"
"net/url"

"cvm-reverse-proxy/internal/sigstore"
"github.com/flashbots/cvm-reverse-proxy/internal/sigstore"
)

// NewHTTPClient returns a new http client.
Expand Down
6 changes: 3 additions & 3 deletions internal/api/versionsapi/cli/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"fmt"
"log/slog"

apiclient "cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/api/versionsapi"
"cvm-reverse-proxy/internal/logger"
apiclient "github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/api/versionsapi"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"

"github.com/spf13/cobra"
"golang.org/x/mod/semver"
Expand Down
4 changes: 2 additions & 2 deletions internal/api/versionsapi/cli/latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"fmt"
"log/slog"

"cvm-reverse-proxy/internal/api/versionsapi"
"cvm-reverse-proxy/internal/logger"
"github.com/flashbots/cvm-reverse-proxy/internal/api/versionsapi"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"

"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/api/versionsapi/cli/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/spf13/cobra"
"golang.org/x/mod/semver"

apiclient "cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/api/versionsapi"
"cvm-reverse-proxy/internal/logger"
apiclient "github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/api/versionsapi"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"
)

func newListCmd() *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"os/signal"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/api/versionsapi/cli/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"strings"
"time"

apiclient "cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/api/versionsapi"
"cvm-reverse-proxy/internal/logger"
apiclient "github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/api/versionsapi"
"github.com/flashbots/cvm-reverse-proxy/internal/logger"

compute "cloud.google.com/go/compute/apiv1"
"cloud.google.com/go/compute/apiv1/computepb"
Expand Down
4 changes: 2 additions & 2 deletions internal/api/versionsapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (

"golang.org/x/mod/semver"

apiclient "cvm-reverse-proxy/internal/api/client"
"cvm-reverse-proxy/internal/constants"
apiclient "github.com/flashbots/cvm-reverse-proxy/internal/api/client"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"
)

// Client is a client for the versions API.
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/cliinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/url"
"path"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"golang.org/x/mod/semver"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/cliinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package versionsapi
import (
"testing"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/api/versionsapi/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package versionsapi
import (
"context"

"cvm-reverse-proxy/internal/api/fetcher"
"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/api/fetcher"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"
)

// Fetcher fetches version API resources without authentication.
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"net/http"
"testing"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/imageinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"path"
"sort"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"golang.org/x/mod/semver"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/imageinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package versionsapi
import (
"testing"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/url"
"path"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"golang.org/x/mod/semver"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/latest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package versionsapi
import (
"testing"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/url"
"path"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"golang.org/x/mod/semver"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package versionsapi
import (
"testing"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/versionsapi/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"golang.org/x/mod/semver"

"cvm-reverse-proxy/internal/constants"
"github.com/flashbots/cvm-reverse-proxy/internal/constants"
)

// ReleaseRef is the ref used for release versions.
Expand Down
Loading

0 comments on commit e1c0350

Please sign in to comment.