Skip to content

Commit

Permalink
refactor(go-libs): Move to dedicated repository (#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord authored Sep 20, 2024
1 parent eec86ea commit 51dd4ba
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
1 change: 0 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ FROM core+base-image

sources:
WORKDIR src
DO stack+INCLUDE_GO_LIBS --LOCATION libs/go-libs
WORKDIR /src/ee/search
COPY go.* .
COPY --dir pkg cmd .
Expand Down
4 changes: 2 additions & 2 deletions cmd/init_mapping.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/formancehq/go-libs/aws/iam"
"github.com/formancehq/go-libs/service"
"github.com/formancehq/search/pkg/searchengine"
"github.com/formancehq/stack/libs/go-libs/aws/iam"
"github.com/formancehq/stack/libs/go-libs/service"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
_ "github.com/bombsimon/logrusr/v3"
"github.com/formancehq/stack/libs/go-libs/service"
"github.com/formancehq/go-libs/service"
"github.com/spf13/cobra"
)

Expand Down
25 changes: 13 additions & 12 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import (
"net/http"
"os"

"github.com/opensearch-project/opensearch-go"

"github.com/aws/aws-sdk-go-v2/config"

"github.com/formancehq/go-libs/api"
"github.com/formancehq/go-libs/auth"
"github.com/formancehq/go-libs/aws/iam"
"github.com/formancehq/go-libs/health"
"github.com/formancehq/go-libs/httpclient"
"github.com/formancehq/go-libs/httpserver"
"github.com/formancehq/go-libs/licence"
"github.com/formancehq/go-libs/logging"
"github.com/formancehq/go-libs/otlp"
"github.com/formancehq/go-libs/otlp/otlptraces"
"github.com/formancehq/go-libs/service"
"github.com/formancehq/search/pkg/searchengine"
"github.com/formancehq/search/pkg/searchhttp"
"github.com/formancehq/stack/libs/go-libs/api"
"github.com/formancehq/stack/libs/go-libs/auth"
"github.com/formancehq/stack/libs/go-libs/aws/iam"
"github.com/formancehq/stack/libs/go-libs/health"
"github.com/formancehq/stack/libs/go-libs/httpclient"
"github.com/formancehq/stack/libs/go-libs/httpserver"
"github.com/formancehq/stack/libs/go-libs/licence"
"github.com/formancehq/stack/libs/go-libs/logging"
"github.com/formancehq/stack/libs/go-libs/otlp"
"github.com/formancehq/stack/libs/go-libs/otlp/otlptraces"
"github.com/formancehq/stack/libs/go-libs/service"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/opensearch-project/opensearch-go"
"github.com/opensearch-project/opensearch-go/opensearchtransport"
requestsigner "github.com/opensearch-project/opensearch-go/v2/signer/awsv2"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions cmd/update_mapping.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/formancehq/go-libs/aws/iam"
"github.com/formancehq/go-libs/service"
"github.com/formancehq/search/pkg/searchengine"
"github.com/formancehq/stack/libs/go-libs/aws/iam"
"github.com/formancehq/stack/libs/go-libs/service"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.6
require (
github.com/aquasecurity/esquery v0.2.0
github.com/bombsimon/logrusr/v3 v3.1.0
github.com/formancehq/stack/libs/go-libs v0.0.0-20230221161632-e6dc6a89a85e
github.com/formancehq/go-libs v1.5.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/opensearch-project/opensearch-go v1.1.0
Expand Down Expand Up @@ -109,6 +109,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/formancehq/stack/libs/go-libs => ../../libs/go-libs

replace github.com/formancehq/ledger => ../../components/ledger
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/formancehq/go-libs v1.5.0 h1:jOVET378uquKvQBnSaS8ClLFbk7fB1Lhy4xM0+RK74o=
github.com/formancehq/go-libs v1.5.0/go.mod h1:rnvi4Au1DCNephaBEVzcv64BZEEksXiyKjwo/wHG51Y=
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down
2 changes: 1 addition & 1 deletion pkg/searchhttp/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/base64"
"encoding/json"

"github.com/formancehq/stack/libs/go-libs/bun/bunpaginate"
"github.com/formancehq/go-libs/bun/bunpaginate"

"github.com/formancehq/search/pkg/searchengine"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/searchhttp/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"strconv"
"strings"

"github.com/formancehq/stack/libs/go-libs/bun/bunpaginate"
"github.com/formancehq/go-libs/bun/bunpaginate"

"github.com/aquasecurity/esquery"
"github.com/formancehq/go-libs/api"
"github.com/formancehq/go-libs/logging"
"github.com/formancehq/search/pkg/searchengine"
"github.com/formancehq/stack/libs/go-libs/api"
"github.com/formancehq/stack/libs/go-libs/logging"
"github.com/pkg/errors"
"github.com/tidwall/gjson"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/searchhttp/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"testing"
"time"

"github.com/formancehq/stack/libs/go-libs/bun/bunpaginate"
"github.com/formancehq/go-libs/bun/bunpaginate"

"github.com/aquasecurity/esquery"
"github.com/formancehq/go-libs/api"
search "github.com/formancehq/search/pkg"
"github.com/formancehq/search/pkg/es"
"github.com/formancehq/search/pkg/searchengine"
"github.com/formancehq/stack/libs/go-libs/api"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit 51dd4ba

Please sign in to comment.