diff --git a/.goreleaser.yml b/.goreleaser.yml index 5d4b398edf..6d8af96c41 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,9 +10,9 @@ builds: - binary: ledger id: ledger ldflags: - - -X github.com/formancehq/ledger/cmd.BuildDate={{ .Date }} - - -X github.com/formancehq/ledger/cmd.Version=v{{ .Version }} - - -X github.com/formancehq/ledger/cmd.Commit={{ .ShortCommit }} + - -X github.com/formancehq/ledger/v2/cmd.BuildDate={{ .Date }} + - -X github.com/formancehq/ledger/v2/cmd.Version=v{{ .Version }} + - -X github.com/formancehq/ledger/v2/cmd.Commit={{ .ShortCommit }} - -extldflags "-static" env: - CGO_ENABLED=0 diff --git a/cmd/buckets.go b/cmd/buckets.go index d9ec9107a4..3a6725f424 100644 --- a/cmd/buckets.go +++ b/cmd/buckets.go @@ -4,7 +4,7 @@ import ( "github.com/formancehq/go-libs/bun/bunconnect" "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/service" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" "github.com/spf13/cobra" ) diff --git a/cmd/container.go b/cmd/container.go index 7482b704ee..9e912959f2 100644 --- a/cmd/container.go +++ b/cmd/container.go @@ -6,8 +6,8 @@ import ( "github.com/formancehq/go-libs/otlp/otlptraces" "github.com/formancehq/go-libs/publish" "github.com/formancehq/go-libs/service" - "github.com/formancehq/ledger/internal/engine" - driver "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/engine" + driver "github.com/formancehq/ledger/v2/internal/storage/driver" "github.com/spf13/cobra" "go.uber.org/fx" ) diff --git a/cmd/root.go b/cmd/root.go index 43103a632c..c11792aad4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( "github.com/formancehq/go-libs/otlp/otlpmetrics" "github.com/formancehq/go-libs/otlp/otlptraces" "github.com/formancehq/go-libs/publish" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" "github.com/spf13/cobra" ) diff --git a/cmd/serve.go b/cmd/serve.go index 39f0210b9c..bf48e1d5da 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -7,9 +7,9 @@ import ( "github.com/formancehq/go-libs/time" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" - "github.com/formancehq/ledger/internal/api" + "github.com/formancehq/ledger/v2/internal/api" "github.com/formancehq/go-libs/ballast" "github.com/formancehq/go-libs/httpserver" diff --git a/go.mod b/go.mod index eb84228d61..b234d36edc 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/formancehq/ledger +module github.com/formancehq/ledger/v2 go 1.22.0 diff --git a/internal/api/backend/backend.go b/internal/api/backend/backend.go index ba8b2b0ee9..187d1961a2 100644 --- a/internal/api/backend/backend.go +++ b/internal/api/backend/backend.go @@ -8,12 +8,12 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/migrations" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/ledgerstore" - "github.com/formancehq/ledger/internal/storage/systemstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" ) //go:generate mockgen -source backend.go -destination backend_generated.go -package backend . Ledger diff --git a/internal/api/backend/backend_generated.go b/internal/api/backend/backend_generated.go index b0135f68b0..9f6505a256 100644 --- a/internal/api/backend/backend_generated.go +++ b/internal/api/backend/backend_generated.go @@ -14,15 +14,15 @@ import ( big "math/big" reflect "reflect" - ledger "github.com/formancehq/ledger/internal" - engine "github.com/formancehq/ledger/internal/engine" - command "github.com/formancehq/ledger/internal/engine/command" - driver "github.com/formancehq/ledger/internal/storage/driver" - ledgerstore "github.com/formancehq/ledger/internal/storage/ledgerstore" - systemstore "github.com/formancehq/ledger/internal/storage/systemstore" bunpaginate "github.com/formancehq/go-libs/bun/bunpaginate" metadata "github.com/formancehq/go-libs/metadata" migrations "github.com/formancehq/go-libs/migrations" + ledger "github.com/formancehq/ledger/v2/internal" + engine "github.com/formancehq/ledger/v2/internal/engine" + command "github.com/formancehq/ledger/v2/internal/engine/command" + driver "github.com/formancehq/ledger/v2/internal/storage/driver" + ledgerstore "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" + systemstore "github.com/formancehq/ledger/v2/internal/storage/systemstore" gomock "go.uber.org/mock/gomock" ) diff --git a/internal/api/backend/resolver.go b/internal/api/backend/resolver.go index 132bbb74ff..dfb2b2541c 100644 --- a/internal/api/backend/resolver.go +++ b/internal/api/backend/resolver.go @@ -9,14 +9,14 @@ import ( "github.com/go-chi/chi/v5" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" sharedapi "github.com/formancehq/go-libs/api" "github.com/pkg/errors" "github.com/formancehq/go-libs/logging" - "github.com/formancehq/ledger/internal/opentelemetry/tracer" + "github.com/formancehq/ledger/v2/internal/opentelemetry/tracer" ) var ( diff --git a/internal/api/module.go b/internal/api/module.go index f0226ac596..0b4bbcc347 100644 --- a/internal/api/module.go +++ b/internal/api/module.go @@ -7,10 +7,10 @@ import ( "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/health" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/driver" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/noop" "go.uber.org/fx" diff --git a/internal/api/router.go b/internal/api/router.go index aad48ee77e..2b7fb5ec0b 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -7,10 +7,10 @@ import ( "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/health" - "github.com/formancehq/ledger/internal/api/backend" - v1 "github.com/formancehq/ledger/internal/api/v1" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/api/backend" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" ) func NewRouter( diff --git a/internal/api/v1/api_utils_test.go b/internal/api/v1/api_utils_test.go index f6358295e6..e33ff33516 100644 --- a/internal/api/v1/api_utils_test.go +++ b/internal/api/v1/api_utils_test.go @@ -3,9 +3,9 @@ package v1_test import ( "testing" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/controllers_accounts.go b/internal/api/v1/controllers_accounts.go index 1a0514a308..9e7d4f01c0 100644 --- a/internal/api/v1/controllers_accounts.go +++ b/internal/api/v1/controllers_accounts.go @@ -9,23 +9,23 @@ import ( "strconv" "strings" - "github.com/formancehq/ledger/pkg/core/accounts" + "github.com/formancehq/ledger/v2/pkg/core/accounts" "github.com/go-chi/chi/v5" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" "github.com/pkg/errors" sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) type accountWithVolumesAndBalances ledger.ExpandedAccount diff --git a/internal/api/v1/controllers_accounts_test.go b/internal/api/v1/controllers_accounts_test.go index 1b391c3905..a4c84ba982 100644 --- a/internal/api/v1/controllers_accounts_test.go +++ b/internal/api/v1/controllers_accounts_test.go @@ -12,11 +12,11 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v1 "github.com/formancehq/ledger/internal/api/v1" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/controllers_balances.go b/internal/api/v1/controllers_balances.go index 23025a7d11..b5daecb073 100644 --- a/internal/api/v1/controllers_balances.go +++ b/internal/api/v1/controllers_balances.go @@ -10,8 +10,8 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/query" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func buildAggregatedBalancesQuery(r *http.Request) (query.Builder, error) { diff --git a/internal/api/v1/controllers_balances_test.go b/internal/api/v1/controllers_balances_test.go index 8482dc97cc..534c2be1b7 100644 --- a/internal/api/v1/controllers_balances_test.go +++ b/internal/api/v1/controllers_balances_test.go @@ -12,10 +12,10 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v1 "github.com/formancehq/ledger/internal/api/v1" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/controllers_config.go b/internal/api/v1/controllers_config.go index ede2286ae3..71fc15e64a 100644 --- a/internal/api/v1/controllers_config.go +++ b/internal/api/v1/controllers_config.go @@ -8,10 +8,10 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" "github.com/formancehq/go-libs/collectionutils" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) type ConfigInfo struct { diff --git a/internal/api/v1/controllers_config_test.go b/internal/api/v1/controllers_config_test.go index 4871a015a8..cd16b8be64 100644 --- a/internal/api/v1/controllers_config_test.go +++ b/internal/api/v1/controllers_config_test.go @@ -9,11 +9,11 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" - v1 "github.com/formancehq/ledger/internal/api/v1" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/controllers_info.go b/internal/api/v1/controllers_info.go index c8ec8538fe..429bbe383b 100644 --- a/internal/api/v1/controllers_info.go +++ b/internal/api/v1/controllers_info.go @@ -6,14 +6,14 @@ import ( "github.com/go-chi/chi/v5" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine" "github.com/pkg/errors" sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/migrations" "github.com/formancehq/go-libs/query" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) type Info struct { diff --git a/internal/api/v1/controllers_info_test.go b/internal/api/v1/controllers_info_test.go index fa83e8c0ac..bf9180dfad 100644 --- a/internal/api/v1/controllers_info_test.go +++ b/internal/api/v1/controllers_info_test.go @@ -16,11 +16,11 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/migrations" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v1 "github.com/formancehq/ledger/internal/api/v1" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/controllers_transactions.go b/internal/api/v1/controllers_transactions.go index d92cd96881..1d72483534 100644 --- a/internal/api/v1/controllers_transactions.go +++ b/internal/api/v1/controllers_transactions.go @@ -15,19 +15,19 @@ import ( "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/machine" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/machine" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/pkg/errors" sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func mapTransactionToV1(tx ledger.Transaction) any { diff --git a/internal/api/v1/controllers_transactions_test.go b/internal/api/v1/controllers_transactions_test.go index 62a0b4b7a6..145e2713ff 100644 --- a/internal/api/v1/controllers_transactions_test.go +++ b/internal/api/v1/controllers_transactions_test.go @@ -16,11 +16,11 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v1 "github.com/formancehq/ledger/internal/api/v1" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v1 "github.com/formancehq/ledger/v2/internal/api/v1" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v1/middleware_auto_create_ledger.go b/internal/api/v1/middleware_auto_create_ledger.go index dbc812a716..8efcd93228 100644 --- a/internal/api/v1/middleware_auto_create_ledger.go +++ b/internal/api/v1/middleware_auto_create_ledger.go @@ -6,9 +6,9 @@ import ( "github.com/go-chi/chi/v5" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" ) func autoCreateMiddleware(backend backend.Backend) func(handler http.Handler) http.Handler { diff --git a/internal/api/v1/middlewares_metrics.go b/internal/api/v1/middlewares_metrics.go index dac79cb4ad..18d122847d 100644 --- a/internal/api/v1/middlewares_metrics.go +++ b/internal/api/v1/middlewares_metrics.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/time" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" ) diff --git a/internal/api/v1/routes.go b/internal/api/v1/routes.go index 0bfdf6abab..a5c9fbbeda 100644 --- a/internal/api/v1/routes.go +++ b/internal/api/v1/routes.go @@ -9,8 +9,8 @@ import ( "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/health" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/cors" ) diff --git a/internal/api/v1/utils.go b/internal/api/v1/utils.go index b141142466..70fe1994ee 100644 --- a/internal/api/v1/utils.go +++ b/internal/api/v1/utils.go @@ -11,8 +11,8 @@ import ( "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/query" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func getPITFilter(r *http.Request) (*ledgerstore.PITFilter, error) { diff --git a/internal/api/v2/api_utils_test.go b/internal/api/v2/api_utils_test.go index ecc4aa0fc3..241a8020f7 100644 --- a/internal/api/v2/api_utils_test.go +++ b/internal/api/v2/api_utils_test.go @@ -5,7 +5,7 @@ import ( "go.uber.org/mock/gomock" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) func newTestingBackend(t *testing.T, expectedSchemaCheck bool) (*backend.MockBackend, *backend.MockLedger) { diff --git a/internal/api/v2/bulk.go b/internal/api/v2/bulk.go index c7c6370609..4ac75f4dff 100644 --- a/internal/api/v2/bulk.go +++ b/internal/api/v2/bulk.go @@ -6,17 +6,17 @@ import ( "fmt" "math/big" - "github.com/formancehq/ledger/internal/opentelemetry/tracer" + "github.com/formancehq/ledger/v2/internal/opentelemetry/tracer" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine/command" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine/command" ) const ( diff --git a/internal/api/v2/controller_export_logs.go b/internal/api/v2/controller_export_logs.go index 3c00e62e05..4d97eeb70f 100644 --- a/internal/api/v2/controller_export_logs.go +++ b/internal/api/v2/controller_export_logs.go @@ -6,9 +6,9 @@ import ( "net/http" "github.com/formancehq/go-libs/api" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine" ) func exportLogs(w http.ResponseWriter, r *http.Request) { diff --git a/internal/api/v2/controller_import_logs.go b/internal/api/v2/controller_import_logs.go index 32b50f8ed4..273beffcdc 100644 --- a/internal/api/v2/controller_import_logs.go +++ b/internal/api/v2/controller_import_logs.go @@ -5,11 +5,11 @@ import ( "io" "net/http" - "github.com/formancehq/ledger/internal/engine" + "github.com/formancehq/ledger/v2/internal/engine" "github.com/formancehq/go-libs/api" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/api/backend" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/api/backend" "github.com/pkg/errors" ) diff --git a/internal/api/v2/controllers_accounts.go b/internal/api/v2/controllers_accounts.go index 0a363d6b4d..3b365eb6b6 100644 --- a/internal/api/v2/controllers_accounts.go +++ b/internal/api/v2/controllers_accounts.go @@ -6,11 +6,11 @@ import ( "net/http" "net/url" - "github.com/formancehq/ledger/pkg/core/accounts" + "github.com/formancehq/ledger/v2/pkg/core/accounts" "github.com/go-chi/chi/v5" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/pointer" @@ -18,9 +18,9 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/pkg/errors" ) diff --git a/internal/api/v2/controllers_accounts_test.go b/internal/api/v2/controllers_accounts_test.go index 5b40539905..54f6bfc707 100644 --- a/internal/api/v2/controllers_accounts_test.go +++ b/internal/api/v2/controllers_accounts_test.go @@ -15,11 +15,11 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v2/controllers_balances.go b/internal/api/v2/controllers_balances.go index 3b16c0d087..8f5b123f3f 100644 --- a/internal/api/v2/controllers_balances.go +++ b/internal/api/v2/controllers_balances.go @@ -4,8 +4,8 @@ import ( "net/http" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func getBalancesAggregated(w http.ResponseWriter, r *http.Request) { diff --git a/internal/api/v2/controllers_balances_test.go b/internal/api/v2/controllers_balances_test.go index 1d018e702d..62be40bd03 100644 --- a/internal/api/v2/controllers_balances_test.go +++ b/internal/api/v2/controllers_balances_test.go @@ -13,10 +13,10 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v2/controllers_bulk.go b/internal/api/v2/controllers_bulk.go index f7afc3eeca..118d8240aa 100644 --- a/internal/api/v2/controllers_bulk.go +++ b/internal/api/v2/controllers_bulk.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/contextutil" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) func bulkHandler(w http.ResponseWriter, r *http.Request) { diff --git a/internal/api/v2/controllers_bulk_test.go b/internal/api/v2/controllers_bulk_test.go index 4a3e5692d9..c4036f2ef9 100644 --- a/internal/api/v2/controllers_bulk_test.go +++ b/internal/api/v2/controllers_bulk_test.go @@ -14,11 +14,11 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/api/backend" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/api/backend" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/pkg/errors" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/internal/api/v2/controllers_config.go b/internal/api/v2/controllers_config.go index a9b610e17f..b16bd8b975 100644 --- a/internal/api/v2/controllers_config.go +++ b/internal/api/v2/controllers_config.go @@ -5,7 +5,7 @@ import ( "net/http" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) type ConfigInfo struct { diff --git a/internal/api/v2/controllers_config_test.go b/internal/api/v2/controllers_config_test.go index 5c10297e23..d74ff9603b 100644 --- a/internal/api/v2/controllers_config_test.go +++ b/internal/api/v2/controllers_config_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/formancehq/go-libs/auth" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/stretchr/testify/require" ) diff --git a/internal/api/v2/controllers_create_ledger.go b/internal/api/v2/controllers_create_ledger.go index 84a05af6e3..8fb51e9962 100644 --- a/internal/api/v2/controllers_create_ledger.go +++ b/internal/api/v2/controllers_create_ledger.go @@ -7,10 +7,10 @@ import ( "github.com/go-chi/chi/v5" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" "github.com/pkg/errors" ) diff --git a/internal/api/v2/controllers_create_ledger_test.go b/internal/api/v2/controllers_create_ledger_test.go index 286143dd36..1a27249a38 100644 --- a/internal/api/v2/controllers_create_ledger_test.go +++ b/internal/api/v2/controllers_create_ledger_test.go @@ -7,13 +7,13 @@ import ( "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/google/uuid" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" ) func TestConfigureLedger(t *testing.T) { diff --git a/internal/api/v2/controllers_get_ledger.go b/internal/api/v2/controllers_get_ledger.go index 23c01fe326..4529b833cf 100644 --- a/internal/api/v2/controllers_get_ledger.go +++ b/internal/api/v2/controllers_get_ledger.go @@ -8,9 +8,9 @@ import ( "github.com/go-chi/chi/v5" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/pkg/errors" ) diff --git a/internal/api/v2/controllers_get_ledger_test.go b/internal/api/v2/controllers_get_ledger_test.go index f0d998cbfb..e8543721c8 100644 --- a/internal/api/v2/controllers_get_ledger_test.go +++ b/internal/api/v2/controllers_get_ledger_test.go @@ -9,10 +9,10 @@ import ( "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/google/uuid" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/internal/api/v2/controllers_get_logs.go b/internal/api/v2/controllers_get_logs.go index 3ba86b32b4..6e24a18018 100644 --- a/internal/api/v2/controllers_get_logs.go +++ b/internal/api/v2/controllers_get_logs.go @@ -6,8 +6,8 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func getLogs(w http.ResponseWriter, r *http.Request) { diff --git a/internal/api/v2/controllers_info.go b/internal/api/v2/controllers_info.go index 74bf4f779f..1e345e0f77 100644 --- a/internal/api/v2/controllers_info.go +++ b/internal/api/v2/controllers_info.go @@ -7,7 +7,7 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/migrations" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) type Info struct { diff --git a/internal/api/v2/controllers_info_test.go b/internal/api/v2/controllers_info_test.go index 075f266449..58f220eb61 100644 --- a/internal/api/v2/controllers_info_test.go +++ b/internal/api/v2/controllers_info_test.go @@ -18,11 +18,11 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/migrations" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v2/controllers_ledgers.go b/internal/api/v2/controllers_ledgers.go index 67e7d0212e..dd3b6a896b 100644 --- a/internal/api/v2/controllers_ledgers.go +++ b/internal/api/v2/controllers_ledgers.go @@ -14,9 +14,9 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" ) func listLedgers(b backend.Backend) http.HandlerFunc { diff --git a/internal/api/v2/controllers_ledgers_test.go b/internal/api/v2/controllers_ledgers_test.go index 8dfedef4d4..e4b63d0c3e 100644 --- a/internal/api/v2/controllers_ledgers_test.go +++ b/internal/api/v2/controllers_ledgers_test.go @@ -8,8 +8,8 @@ import ( sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/logging" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/google/uuid" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/internal/api/v2/controllers_transactions.go b/internal/api/v2/controllers_transactions.go index c33dc5f59d..202e47f6ad 100644 --- a/internal/api/v2/controllers_transactions.go +++ b/internal/api/v2/controllers_transactions.go @@ -12,18 +12,18 @@ import ( "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/engine" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/machine" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/engine" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/machine" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/pkg/errors" sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func countTransactions(w http.ResponseWriter, r *http.Request) { diff --git a/internal/api/v2/controllers_transactions_test.go b/internal/api/v2/controllers_transactions_test.go index cbc1469945..dbfd8b570a 100644 --- a/internal/api/v2/controllers_transactions_test.go +++ b/internal/api/v2/controllers_transactions_test.go @@ -14,21 +14,21 @@ import ( "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/api/backend" "github.com/pkg/errors" - "github.com/formancehq/ledger/internal/engine" + "github.com/formancehq/ledger/v2/internal/engine" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" sharedapi "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/internal/api/v2/controllers_volumes.go b/internal/api/v2/controllers_volumes.go index 4316c44917..f00c2b1f7d 100644 --- a/internal/api/v2/controllers_volumes.go +++ b/internal/api/v2/controllers_volumes.go @@ -4,8 +4,8 @@ import ( "net/http" sharedapi "github.com/formancehq/go-libs/api" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/formancehq/go-libs/pointer" diff --git a/internal/api/v2/controllers_volumes_test.go b/internal/api/v2/controllers_volumes_test.go index 8ff837c5e9..3639ffb218 100644 --- a/internal/api/v2/controllers_volumes_test.go +++ b/internal/api/v2/controllers_volumes_test.go @@ -14,10 +14,10 @@ import ( "github.com/formancehq/go-libs/time" sharedapi "github.com/formancehq/go-libs/api" - ledger "github.com/formancehq/ledger/internal" - v2 "github.com/formancehq/ledger/internal/api/v2" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + v2 "github.com/formancehq/ledger/v2/internal/api/v2" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/formancehq/go-libs/query" "github.com/stretchr/testify/require" diff --git a/internal/api/v2/middlewares_metrics.go b/internal/api/v2/middlewares_metrics.go index 23cfa6ac44..45c1bdc5a3 100644 --- a/internal/api/v2/middlewares_metrics.go +++ b/internal/api/v2/middlewares_metrics.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/time" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" ) diff --git a/internal/api/v2/query.go b/internal/api/v2/query.go index addd057624..688ae1885f 100644 --- a/internal/api/v2/query.go +++ b/internal/api/v2/query.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/api" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/engine/command" "github.com/pkg/errors" ) diff --git a/internal/api/v2/routes.go b/internal/api/v2/routes.go index 5c13204c93..815221959b 100644 --- a/internal/api/v2/routes.go +++ b/internal/api/v2/routes.go @@ -12,8 +12,8 @@ import ( "github.com/formancehq/go-libs/auth" "github.com/formancehq/go-libs/health" - "github.com/formancehq/ledger/internal/api/backend" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/api/backend" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/cors" ) diff --git a/internal/api/v2/utils.go b/internal/api/v2/utils.go index 22facac1a2..17632ec921 100644 --- a/internal/api/v2/utils.go +++ b/internal/api/v2/utils.go @@ -12,7 +12,7 @@ import ( "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/query" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) func getPITOOTFilter(r *http.Request) (*ledgerstore.PITFilter, error) { diff --git a/internal/bus/message.go b/internal/bus/message.go index b76bfb7aa9..263e408d1b 100644 --- a/internal/bus/message.go +++ b/internal/bus/message.go @@ -4,8 +4,8 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/publish" "github.com/formancehq/go-libs/time" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/pkg/events" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/pkg/events" ) type CommittedTransactions struct { diff --git a/internal/bus/monitor.go b/internal/bus/monitor.go index 7d3d4545f4..8f61d47257 100644 --- a/internal/bus/monitor.go +++ b/internal/bus/monitor.go @@ -7,8 +7,8 @@ import ( "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/publish" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/pkg/events" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/pkg/events" ) type Monitor interface { diff --git a/internal/bus/monitor_test.go b/internal/bus/monitor_test.go index 6749cab987..9f88ca57bc 100644 --- a/internal/bus/monitor_test.go +++ b/internal/bus/monitor_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/ThreeDotsLabs/watermill" "github.com/ThreeDotsLabs/watermill/pubsub/gochannel" diff --git a/internal/engine/chain/chain.go b/internal/engine/chain/chain.go index 9f0aaabd4d..7192e876ea 100644 --- a/internal/engine/chain/chain.go +++ b/internal/engine/chain/chain.go @@ -5,8 +5,8 @@ import ( "math/big" "sync" - ledger "github.com/formancehq/ledger/internal" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + ledger "github.com/formancehq/ledger/v2/internal" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" ) type Chain struct { diff --git a/internal/engine/chain/store.go b/internal/engine/chain/store.go index 9e5771b8fe..d8803cb889 100644 --- a/internal/engine/chain/store.go +++ b/internal/engine/chain/store.go @@ -3,7 +3,7 @@ package chain import ( "context" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" ) type Store interface { diff --git a/internal/engine/command/commander.go b/internal/engine/command/commander.go index 4fdd0d86f2..414c84e2ad 100644 --- a/internal/engine/command/commander.go +++ b/internal/engine/command/commander.go @@ -6,18 +6,18 @@ import ( "math/big" "sync" - "github.com/formancehq/ledger/internal/machine/vm/program" - "github.com/formancehq/ledger/internal/opentelemetry/tracer" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/opentelemetry/tracer" "github.com/formancehq/go-libs/time" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/bus" - "github.com/formancehq/ledger/internal/engine/utils/batching" - "github.com/formancehq/ledger/internal/machine/vm" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/bus" + "github.com/formancehq/ledger/v2/internal/engine/utils/batching" + "github.com/formancehq/ledger/v2/internal/machine/vm" "github.com/pkg/errors" ) diff --git a/internal/engine/command/commander_test.go b/internal/engine/command/commander_test.go index a3fac0682e..afbf3979be 100644 --- a/internal/engine/command/commander_test.go +++ b/internal/engine/command/commander_test.go @@ -11,23 +11,23 @@ import ( "github.com/formancehq/go-libs/bun/bundebug" "github.com/uptrace/bun" - "github.com/formancehq/ledger/internal/engine/chain" + "github.com/formancehq/ledger/v2/internal/engine/chain" "github.com/formancehq/go-libs/time" "github.com/formancehq/go-libs/bun/bunconnect" "github.com/formancehq/go-libs/testing/platform/pgtesting" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/google/uuid" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/bus" - storageerrors "github.com/formancehq/ledger/internal/storage" - internaltesting "github.com/formancehq/ledger/internal/testing" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/bus" + storageerrors "github.com/formancehq/ledger/v2/internal/storage" + internaltesting "github.com/formancehq/ledger/v2/internal/testing" "github.com/pkg/errors" "github.com/stretchr/testify/require" ) diff --git a/internal/engine/command/compiler.go b/internal/engine/command/compiler.go index df609eea12..ec28309c2e 100644 --- a/internal/engine/command/compiler.go +++ b/internal/engine/command/compiler.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "github.com/bluele/gcache" - "github.com/formancehq/ledger/internal/machine/script/compiler" - "github.com/formancehq/ledger/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/machine/script/compiler" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" ) type Compiler struct { diff --git a/internal/engine/command/context.go b/internal/engine/command/context.go index e2f93c5ae7..6c88f3d2b2 100644 --- a/internal/engine/command/context.go +++ b/internal/engine/command/context.go @@ -3,11 +3,11 @@ package command import ( "context" - "github.com/formancehq/ledger/internal/opentelemetry/tracer" + "github.com/formancehq/ledger/v2/internal/opentelemetry/tracer" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" ) type executionContext struct { diff --git a/internal/engine/command/store.go b/internal/engine/command/store.go index 25569e56f5..f212e9ac35 100644 --- a/internal/engine/command/store.go +++ b/internal/engine/command/store.go @@ -4,8 +4,8 @@ import ( "context" "math/big" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/machine/vm" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/machine/vm" ) type Store interface { diff --git a/internal/engine/export.go b/internal/engine/export.go index 07f04a1af2..532602417d 100644 --- a/internal/engine/export.go +++ b/internal/engine/export.go @@ -4,8 +4,8 @@ import ( "context" "github.com/formancehq/go-libs/bun/bunpaginate" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) type ExportWriter interface { diff --git a/internal/engine/import.go b/internal/engine/import.go index e62722264b..7c80d028d3 100644 --- a/internal/engine/import.go +++ b/internal/engine/import.go @@ -7,7 +7,7 @@ import ( "math/big" "reflect" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/pkg/errors" ) diff --git a/internal/engine/ledger.go b/internal/engine/ledger.go index 0b5271fef4..b39d8c0586 100644 --- a/internal/engine/ledger.go +++ b/internal/engine/ledger.go @@ -6,17 +6,17 @@ import ( "sync" "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/engine/chain" - "github.com/formancehq/ledger/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/engine/chain" + "github.com/formancehq/ledger/v2/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" "github.com/ThreeDotsLabs/watermill/message" "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/bus" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/bus" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" ) type Ledger struct { diff --git a/internal/engine/module.go b/internal/engine/module.go index 608d9422ea..ccaa082b56 100644 --- a/internal/engine/module.go +++ b/internal/engine/module.go @@ -5,10 +5,10 @@ import ( "github.com/ThreeDotsLabs/watermill/message" "github.com/formancehq/go-libs/logging" - "github.com/formancehq/ledger/internal/bus" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/bus" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/driver" "go.uber.org/fx" ) diff --git a/internal/engine/resolver.go b/internal/engine/resolver.go index 738b01d1fb..26d5d97bf8 100644 --- a/internal/engine/resolver.go +++ b/internal/engine/resolver.go @@ -4,16 +4,16 @@ import ( "context" "sync" - "github.com/formancehq/ledger/internal/storage/ledgerstore" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" "github.com/pkg/errors" "github.com/ThreeDotsLabs/watermill/message" "github.com/formancehq/go-libs/logging" - "github.com/formancehq/ledger/internal/engine/command" - "github.com/formancehq/ledger/internal/opentelemetry/metrics" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/engine/command" + "github.com/formancehq/ledger/v2/internal/opentelemetry/metrics" + "github.com/formancehq/ledger/v2/internal/storage/driver" "github.com/sirupsen/logrus" ) diff --git a/internal/engine/stats.go b/internal/engine/stats.go index 34a0cdb380..30cb4e2207 100644 --- a/internal/engine/stats.go +++ b/internal/engine/stats.go @@ -3,7 +3,7 @@ package engine import ( "context" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" "github.com/pkg/errors" ) diff --git a/internal/engine/utils/batching/batcher.go b/internal/engine/utils/batching/batcher.go index c41a853012..ee23447811 100644 --- a/internal/engine/utils/batching/batcher.go +++ b/internal/engine/utils/batching/batcher.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/formancehq/go-libs/collectionutils" - "github.com/formancehq/ledger/internal/engine/utils/job" + "github.com/formancehq/ledger/v2/internal/engine/utils/job" ) type OnBatchProcessed[T any] func(...T) diff --git a/internal/machine/account.go b/internal/machine/account.go index bf98e74b3c..acee753c0a 100644 --- a/internal/machine/account.go +++ b/internal/machine/account.go @@ -3,7 +3,7 @@ package machine import ( "fmt" - "github.com/formancehq/ledger/pkg/core/accounts" + "github.com/formancehq/ledger/v2/pkg/core/accounts" ) type AccountAddress string diff --git a/internal/machine/asset.go b/internal/machine/asset.go index ceb03ac659..b018712c21 100644 --- a/internal/machine/asset.go +++ b/internal/machine/asset.go @@ -3,7 +3,7 @@ package machine import ( "fmt" - "github.com/formancehq/ledger/pkg/core/assets" + "github.com/formancehq/ledger/v2/pkg/core/assets" ) type Asset string diff --git a/internal/machine/examples/basic.go b/internal/machine/examples/basic.go index ba87e3b190..eecc4a8af5 100644 --- a/internal/machine/examples/basic.go +++ b/internal/machine/examples/basic.go @@ -6,9 +6,9 @@ import ( "math/big" "github.com/formancehq/go-libs/metadata" - "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/machine/script/compiler" - vm2 "github.com/formancehq/ledger/internal/machine/vm" + "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/machine/script/compiler" + vm2 "github.com/formancehq/ledger/v2/internal/machine/vm" ) func main() { diff --git a/internal/machine/script/compiler/allotment.go b/internal/machine/script/compiler/allotment.go index 40bb0b6d6c..9b5869584c 100644 --- a/internal/machine/script/compiler/allotment.go +++ b/internal/machine/script/compiler/allotment.go @@ -5,11 +5,11 @@ import ( "fmt" "math/big" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/formancehq/ledger/internal/machine/script/parser" - program2 "github.com/formancehq/ledger/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/machine/script/parser" + program2 "github.com/formancehq/ledger/v2/internal/machine/vm/program" ) func (p *parseVisitor) VisitAllotment(c antlr.ParserRuleContext, portions []parser.IAllotmentPortionContext) *CompileError { diff --git a/internal/machine/script/compiler/compiler.go b/internal/machine/script/compiler/compiler.go index 7507963233..d9014fe8ba 100644 --- a/internal/machine/script/compiler/compiler.go +++ b/internal/machine/script/compiler/compiler.go @@ -6,11 +6,11 @@ import ( "strconv" "strings" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/antlr/antlr4/runtime/Go/antlr" - parser "github.com/formancehq/ledger/internal/machine/script/parser" - program "github.com/formancehq/ledger/internal/machine/vm/program" + parser "github.com/formancehq/ledger/v2/internal/machine/script/parser" + program "github.com/formancehq/ledger/v2/internal/machine/vm/program" "github.com/pkg/errors" ) diff --git a/internal/machine/script/compiler/compiler_test.go b/internal/machine/script/compiler/compiler_test.go index a3b694022d..1ac1b2e33d 100644 --- a/internal/machine/script/compiler/compiler_test.go +++ b/internal/machine/script/compiler/compiler_test.go @@ -7,9 +7,9 @@ import ( "reflect" "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" - program2 "github.com/formancehq/ledger/internal/machine/vm/program" + program2 "github.com/formancehq/ledger/v2/internal/machine/vm/program" "github.com/stretchr/testify/require" ) diff --git a/internal/machine/script/compiler/destination.go b/internal/machine/script/compiler/destination.go index 1b454c13fa..927a23bdd8 100644 --- a/internal/machine/script/compiler/destination.go +++ b/internal/machine/script/compiler/destination.go @@ -3,10 +3,10 @@ package compiler import ( "errors" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" - "github.com/formancehq/ledger/internal/machine/script/parser" - "github.com/formancehq/ledger/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/machine/script/parser" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" ) func (p *parseVisitor) VisitDestination(c parser.IDestinationContext) *CompileError { diff --git a/internal/machine/script/compiler/program.go b/internal/machine/script/compiler/program.go index 0d1692be8e..2a51710868 100644 --- a/internal/machine/script/compiler/program.go +++ b/internal/machine/script/compiler/program.go @@ -1,8 +1,8 @@ package compiler import ( - "github.com/formancehq/ledger/internal/machine" - program2 "github.com/formancehq/ledger/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/machine" + program2 "github.com/formancehq/ledger/v2/internal/machine/vm/program" ) func (p *parseVisitor) AppendInstruction(instruction byte) { diff --git a/internal/machine/script/compiler/source.go b/internal/machine/script/compiler/source.go index a3d3dc0fb3..02779c006c 100644 --- a/internal/machine/script/compiler/source.go +++ b/internal/machine/script/compiler/source.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" - "github.com/formancehq/ledger/internal/machine/script/parser" - "github.com/formancehq/ledger/internal/machine/vm/program" + "github.com/formancehq/ledger/v2/internal/machine/script/parser" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" ) type FallbackAccount machine.Address diff --git a/internal/machine/vm/machine.go b/internal/machine/vm/machine.go index 34a88049ab..bc8e387aec 100644 --- a/internal/machine/vm/machine.go +++ b/internal/machine/vm/machine.go @@ -15,11 +15,11 @@ import ( "math/big" "slices" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/machine/vm/program" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" "github.com/logrusorgru/aurora" "github.com/pkg/errors" ) diff --git a/internal/machine/vm/machine_kept_test.go b/internal/machine/vm/machine_kept_test.go index 364c63e25e..e3c372a9bf 100644 --- a/internal/machine/vm/machine_kept_test.go +++ b/internal/machine/vm/machine_kept_test.go @@ -3,7 +3,7 @@ package vm import ( "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" ) func TestKeptDestinationAllotment(t *testing.T) { diff --git a/internal/machine/vm/machine_overdraft_test.go b/internal/machine/vm/machine_overdraft_test.go index c7d846b0d9..355fce42e1 100644 --- a/internal/machine/vm/machine_overdraft_test.go +++ b/internal/machine/vm/machine_overdraft_test.go @@ -3,7 +3,7 @@ package vm import ( "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" ) func TestOverdraftNotEnough(t *testing.T) { diff --git a/internal/machine/vm/machine_test.go b/internal/machine/vm/machine_test.go index 5df051f434..cd1a187311 100644 --- a/internal/machine/vm/machine_test.go +++ b/internal/machine/vm/machine_test.go @@ -9,12 +9,12 @@ import ( "sync" "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/machine/script/compiler" - "github.com/formancehq/ledger/internal/machine/vm/program" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/machine/script/compiler" + "github.com/formancehq/ledger/v2/internal/machine/vm/program" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/machine/vm/program/program.go b/internal/machine/vm/program/program.go index fb93e8f9ae..756fc15238 100644 --- a/internal/machine/vm/program/program.go +++ b/internal/machine/vm/program/program.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "fmt" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/pkg/errors" ) diff --git a/internal/machine/vm/program/program_test.go b/internal/machine/vm/program/program_test.go index 12303e0d98..f957c1adda 100644 --- a/internal/machine/vm/program/program_test.go +++ b/internal/machine/vm/program/program_test.go @@ -3,7 +3,7 @@ package program_test import ( "testing" - "github.com/formancehq/ledger/internal/machine/script/compiler" + "github.com/formancehq/ledger/v2/internal/machine/script/compiler" "github.com/stretchr/testify/require" ) diff --git a/internal/machine/vm/program/resource.go b/internal/machine/vm/program/resource.go index 983ca7f24b..b899e1d9ce 100644 --- a/internal/machine/vm/program/resource.go +++ b/internal/machine/vm/program/resource.go @@ -3,7 +3,7 @@ package program import ( "fmt" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" ) type Resource interface { diff --git a/internal/machine/vm/program/resource_test.go b/internal/machine/vm/program/resource_test.go index 2c5618a324..9c869ee1ef 100644 --- a/internal/machine/vm/program/resource_test.go +++ b/internal/machine/vm/program/resource_test.go @@ -3,7 +3,7 @@ package program import ( "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/stretchr/testify/require" ) diff --git a/internal/machine/vm/run.go b/internal/machine/vm/run.go index ae2cf0da40..1276523403 100644 --- a/internal/machine/vm/run.go +++ b/internal/machine/vm/run.go @@ -3,10 +3,10 @@ package vm import ( "math/big" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/pkg/errors" ) diff --git a/internal/machine/vm/run_test.go b/internal/machine/vm/run_test.go index c5b4af34f5..24b8202f8a 100644 --- a/internal/machine/vm/run_test.go +++ b/internal/machine/vm/run_test.go @@ -6,11 +6,11 @@ import ( "math/big" "testing" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" - "github.com/formancehq/ledger/internal/machine/script/compiler" + ledger "github.com/formancehq/ledger/v2/internal" + "github.com/formancehq/ledger/v2/internal/machine/script/compiler" "github.com/stretchr/testify/require" ) diff --git a/internal/machine/vm/stack.go b/internal/machine/vm/stack.go index b4f695098b..2bbc3fa465 100644 --- a/internal/machine/vm/stack.go +++ b/internal/machine/vm/stack.go @@ -3,7 +3,7 @@ package vm import ( "fmt" - "github.com/formancehq/ledger/internal/machine" + "github.com/formancehq/ledger/v2/internal/machine" ) func (m *Machine) popValue() machine.Value { diff --git a/internal/machine/vm/store.go b/internal/machine/vm/store.go index 188f65e943..5aa163a394 100644 --- a/internal/machine/vm/store.go +++ b/internal/machine/vm/store.go @@ -5,7 +5,7 @@ import ( "math/big" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" ) type Store interface { diff --git a/internal/posting.go b/internal/posting.go index 6a48194a89..2692ebb989 100644 --- a/internal/posting.go +++ b/internal/posting.go @@ -5,8 +5,8 @@ import ( "encoding/json" "math/big" - "github.com/formancehq/ledger/pkg/core/accounts" - "github.com/formancehq/ledger/pkg/core/assets" + "github.com/formancehq/ledger/v2/pkg/core/accounts" + "github.com/formancehq/ledger/v2/pkg/core/assets" "github.com/pkg/errors" ) diff --git a/internal/storage/driver/driver.go b/internal/storage/driver/driver.go index 577871c8f3..32889705e5 100644 --- a/internal/storage/driver/driver.go +++ b/internal/storage/driver/driver.go @@ -16,12 +16,12 @@ import ( "github.com/uptrace/bun" "github.com/formancehq/go-libs/time" - "github.com/formancehq/ledger/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/logging" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" ) const defaultBucket = "_default" diff --git a/internal/storage/driver/driver_test.go b/internal/storage/driver/driver_test.go index e845dc9850..f4e4b3c358 100644 --- a/internal/storage/driver/driver_test.go +++ b/internal/storage/driver/driver_test.go @@ -6,14 +6,14 @@ import ( "fmt" "testing" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/logging" "github.com/google/uuid" - "github.com/formancehq/ledger/internal/storage/storagetesting" + "github.com/formancehq/ledger/v2/internal/storage/storagetesting" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/inmemory.go b/internal/storage/inmemory.go index 8705fdcf6a..5db4fdf92e 100644 --- a/internal/storage/inmemory.go +++ b/internal/storage/inmemory.go @@ -4,11 +4,11 @@ import ( "context" "math/big" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" ) type InMemoryStore struct { diff --git a/internal/storage/ledgerstore/accounts.go b/internal/storage/ledgerstore/accounts.go index c45ced5194..7652f44257 100644 --- a/internal/storage/ledgerstore/accounts.go +++ b/internal/storage/ledgerstore/accounts.go @@ -10,11 +10,11 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/pointer" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/accounts_test.go b/internal/storage/ledgerstore/accounts_test.go index 8d249a459c..17a53f10f7 100644 --- a/internal/storage/ledgerstore/accounts_test.go +++ b/internal/storage/ledgerstore/accounts_test.go @@ -13,7 +13,7 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/balances.go b/internal/storage/ledgerstore/balances.go index e7df72cf7d..1229b65a2c 100644 --- a/internal/storage/ledgerstore/balances.go +++ b/internal/storage/ledgerstore/balances.go @@ -6,10 +6,10 @@ import ( "fmt" "math/big" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/balances_test.go b/internal/storage/ledgerstore/balances_test.go index 8b099d7f79..aac6f15f34 100644 --- a/internal/storage/ledgerstore/balances_test.go +++ b/internal/storage/ledgerstore/balances_test.go @@ -13,8 +13,8 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - internaltesting "github.com/formancehq/ledger/internal/testing" + ledger "github.com/formancehq/ledger/v2/internal" + internaltesting "github.com/formancehq/ledger/v2/internal/testing" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/bucket.go b/internal/storage/ledgerstore/bucket.go index dc0e217fbb..aee5a45b47 100644 --- a/internal/storage/ledgerstore/bucket.go +++ b/internal/storage/ledgerstore/bucket.go @@ -10,7 +10,7 @@ import ( "github.com/formancehq/go-libs/bun/bunconnect" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/pkg/errors" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/bucket_test.go b/internal/storage/ledgerstore/bucket_test.go index 2268b7d4ce..14d8a7cb17 100644 --- a/internal/storage/ledgerstore/bucket_test.go +++ b/internal/storage/ledgerstore/bucket_test.go @@ -8,7 +8,7 @@ import ( "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/google/uuid" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/logs.go b/internal/storage/ledgerstore/logs.go index 50a5362d9c..8df880ecdf 100644 --- a/internal/storage/ledgerstore/logs.go +++ b/internal/storage/ledgerstore/logs.go @@ -15,7 +15,7 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/pkg/errors" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/logs_test.go b/internal/storage/ledgerstore/logs_test.go index 333c2858a7..1aee66eae9 100644 --- a/internal/storage/ledgerstore/logs_test.go +++ b/internal/storage/ledgerstore/logs_test.go @@ -13,11 +13,11 @@ import ( "github.com/formancehq/go-libs/logging" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/main_test.go b/internal/storage/ledgerstore/main_test.go index 36b06c8f91..cba93edf62 100644 --- a/internal/storage/ledgerstore/main_test.go +++ b/internal/storage/ledgerstore/main_test.go @@ -21,7 +21,7 @@ import ( "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/testing/platform/pgtesting" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/google/uuid" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/migrations_v1.go b/internal/storage/ledgerstore/migrations_v1.go index f44d9d1cbf..ed0a6fbbf9 100644 --- a/internal/storage/ledgerstore/migrations_v1.go +++ b/internal/storage/ledgerstore/migrations_v1.go @@ -10,7 +10,7 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/lib/pq" "github.com/pkg/errors" "github.com/uptrace/bun" diff --git a/internal/storage/ledgerstore/store_benchmarks_test.go b/internal/storage/ledgerstore/store_benchmarks_test.go index 93b4a5a441..58a2554a1c 100644 --- a/internal/storage/ledgerstore/store_benchmarks_test.go +++ b/internal/storage/ledgerstore/store_benchmarks_test.go @@ -20,7 +20,7 @@ import ( "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/stretchr/testify/require" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/store_test.go b/internal/storage/ledgerstore/store_test.go index b3f2cc43f9..711af979c4 100644 --- a/internal/storage/ledgerstore/store_test.go +++ b/internal/storage/ledgerstore/store_test.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/collectionutils" "github.com/formancehq/go-libs/metadata" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" ) // TODO: remove that diff --git a/internal/storage/ledgerstore/transactions.go b/internal/storage/ledgerstore/transactions.go index 6157388fd3..25ae78f3b8 100644 --- a/internal/storage/ledgerstore/transactions.go +++ b/internal/storage/ledgerstore/transactions.go @@ -18,7 +18,7 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/transactions_test.go b/internal/storage/ledgerstore/transactions_test.go index 62a2a0142d..4c9eed7bbe 100644 --- a/internal/storage/ledgerstore/transactions_test.go +++ b/internal/storage/ledgerstore/transactions_test.go @@ -18,8 +18,8 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" - internaltesting "github.com/formancehq/ledger/internal/testing" + ledger "github.com/formancehq/ledger/v2/internal" + internaltesting "github.com/formancehq/ledger/v2/internal/testing" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/ledgerstore/utils.go b/internal/storage/ledgerstore/utils.go index 76bb74f2e3..fda40c03f1 100644 --- a/internal/storage/ledgerstore/utils.go +++ b/internal/storage/ledgerstore/utils.go @@ -11,7 +11,7 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/query" "github.com/uptrace/bun" diff --git a/internal/storage/ledgerstore/volumes.go b/internal/storage/ledgerstore/volumes.go index 832223fe52..0acae85242 100644 --- a/internal/storage/ledgerstore/volumes.go +++ b/internal/storage/ledgerstore/volumes.go @@ -7,7 +7,7 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" lquery "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/uptrace/bun" ) diff --git a/internal/storage/ledgerstore/volumes_test.go b/internal/storage/ledgerstore/volumes_test.go index fc6fe8e78c..04f5e46384 100644 --- a/internal/storage/ledgerstore/volumes_test.go +++ b/internal/storage/ledgerstore/volumes_test.go @@ -12,7 +12,7 @@ import ( "github.com/formancehq/go-libs/metadata" "github.com/formancehq/go-libs/query" - ledger "github.com/formancehq/ledger/internal" + ledger "github.com/formancehq/ledger/v2/internal" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/migrate_ledger_v1_test.go b/internal/storage/migrate_ledger_v1_test.go index c3c51ffa78..03f81a33c6 100644 --- a/internal/storage/migrate_ledger_v1_test.go +++ b/internal/storage/migrate_ledger_v1_test.go @@ -13,9 +13,9 @@ import ( "github.com/formancehq/go-libs/bun/bunconnect" "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/testing/platform/pgtesting" - "github.com/formancehq/ledger/internal/storage/driver" - "github.com/formancehq/ledger/internal/storage/ledgerstore" - "github.com/formancehq/ledger/internal/storage/systemstore" + "github.com/formancehq/ledger/v2/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/ledgerstore" + "github.com/formancehq/ledger/v2/internal/storage/systemstore" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/storagetesting/storage.go b/internal/storage/storagetesting/storage.go index 53afdf244d..fe78517f2f 100644 --- a/internal/storage/storagetesting/storage.go +++ b/internal/storage/storagetesting/storage.go @@ -10,7 +10,7 @@ import ( "github.com/formancehq/go-libs/bun/bunconnect" "github.com/formancehq/go-libs/testing/platform/pgtesting" - "github.com/formancehq/ledger/internal/storage/driver" + "github.com/formancehq/ledger/v2/internal/storage/driver" "github.com/stretchr/testify/require" ) diff --git a/internal/storage/systemstore/configuration.go b/internal/storage/systemstore/configuration.go index 59c11e9a64..706df7c960 100644 --- a/internal/storage/systemstore/configuration.go +++ b/internal/storage/systemstore/configuration.go @@ -5,7 +5,7 @@ import ( "github.com/formancehq/go-libs/time" - storageerrors "github.com/formancehq/ledger/internal/storage/sqlutils" + storageerrors "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/uptrace/bun" ) diff --git a/internal/storage/systemstore/ledgers.go b/internal/storage/systemstore/ledgers.go index 85e5fb438f..0fd65ec4d4 100644 --- a/internal/storage/systemstore/ledgers.go +++ b/internal/storage/systemstore/ledgers.go @@ -8,7 +8,7 @@ import ( "github.com/formancehq/go-libs/bun/bunpaginate" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/pkg/errors" "github.com/uptrace/bun" ) diff --git a/internal/storage/systemstore/migrations.go b/internal/storage/systemstore/migrations.go index cac5245651..64151648d3 100644 --- a/internal/storage/systemstore/migrations.go +++ b/internal/storage/systemstore/migrations.go @@ -6,7 +6,7 @@ import ( "github.com/formancehq/go-libs/logging" "github.com/pkg/errors" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/formancehq/go-libs/migrations" "github.com/uptrace/bun" diff --git a/internal/storage/systemstore/store.go b/internal/storage/systemstore/store.go index f76e8e6e45..57c94a9143 100644 --- a/internal/storage/systemstore/store.go +++ b/internal/storage/systemstore/store.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/formancehq/go-libs/bun/bunconnect" - "github.com/formancehq/ledger/internal/storage/sqlutils" + "github.com/formancehq/ledger/v2/internal/storage/sqlutils" "github.com/uptrace/bun" ) diff --git a/main.go b/main.go index 2b15716610..05f5f14d50 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/formancehq/ledger/cmd" + "github.com/formancehq/ledger/v2/cmd" ) func main() { diff --git a/pkg/testserver/server.go b/pkg/testserver/server.go index 736f88c527..a23a69566b 100644 --- a/pkg/testserver/server.go +++ b/pkg/testserver/server.go @@ -14,7 +14,7 @@ import ( "github.com/formancehq/go-libs/httpserver" "github.com/formancehq/go-libs/logging" "github.com/formancehq/go-libs/service" - "github.com/formancehq/ledger/cmd" + "github.com/formancehq/ledger/v2/cmd" ledgerclient "github.com/formancehq/stack/ledger/client" "github.com/stretchr/testify/require" ) diff --git a/test/integration/scenario_test.go b/test/integration/scenario_test.go index 4492c07812..88c6811e35 100644 --- a/test/integration/scenario_test.go +++ b/test/integration/scenario_test.go @@ -5,7 +5,7 @@ package test_suite import ( "github.com/formancehq/go-libs/logging" . "github.com/formancehq/go-libs/testing/platform/pgtesting" - . "github.com/formancehq/ledger/pkg/testserver" + . "github.com/formancehq/ledger/v2/pkg/testserver" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/test/performance/performance_test.go b/test/performance/performance_test.go index b35030e01f..baac65aede 100644 --- a/test/performance/performance_test.go +++ b/test/performance/performance_test.go @@ -17,7 +17,7 @@ import ( "github.com/formancehq/go-libs/testing/platform/pgtesting" "github.com/formancehq/go-libs/testing/utils" "github.com/formancehq/go-libs/time" - "github.com/formancehq/ledger/pkg/testserver" + "github.com/formancehq/ledger/v2/pkg/testserver" "github.com/formancehq/stack/ledger/client/models/components" "github.com/google/uuid" "github.com/stretchr/testify/require"