Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade reflector.go for configurable endpoint #531

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/benchmarks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/OdyseeTeam/odysee-api/pkg/migrator"

"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const proxySuffix = "/api/v1/proxy"
Expand Down
2 changes: 1 addition & 1 deletion app/arweave/arweave_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func TestReplaceAssetUrls(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/asynquery/asynquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/volatiletech/null"
"github.com/volatiletech/sqlboiler/boil"
"github.com/volatiletech/sqlboiler/queries/qm"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const FilePathParam = "file_path"
Expand Down
2 changes: 1 addition & 1 deletion app/asynquery/asynquery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/OdyseeTeam/odysee-api/models"
"github.com/OdyseeTeam/odysee-api/pkg/logging/zapadapter"
"github.com/Pallinder/go-randomdata"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"

"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion app/asynquery/http_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/OdyseeTeam/odysee-api/pkg/logging"
"github.com/OdyseeTeam/odysee-api/pkg/rpcerrors"
"github.com/mitchellh/mapstructure"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"

"github.com/gorilla/mux"
)
Expand Down
2 changes: 1 addition & 1 deletion app/asynquery/http_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/Pallinder/go-randomdata"
"github.com/gorilla/mux"
"github.com/volatiletech/sqlboiler/queries/qm"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"

"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion app/geopublish/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/volatiletech/null"
"github.com/volatiletech/sqlboiler/boil"
"github.com/volatiletech/sqlboiler/queries/qm"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

type UploadsDB struct {
Expand Down
2 changes: 1 addition & 1 deletion app/geopublish/forklift/carriage.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/hibiken/asynq"
"github.com/volatiletech/sqlboiler/queries/qm"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

// A list of task types.
Expand Down
2 changes: 1 addition & 1 deletion app/geopublish/forklift/carriage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/OdyseeTeam/odysee-api/internal/test"

"github.com/stretchr/testify/suite"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

type carriageSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion app/geopublish/geopublish.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/sirupsen/logrus"
tusd "github.com/tus/tusd/pkg/handler"
"github.com/volatiletech/sqlboiler/boil"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

var logger = monitor.NewModuleLogger("geopublish")
Expand Down
2 changes: 1 addition & 1 deletion app/proxy/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const testSetupWait = 200 * time.Millisecond
Expand Down
2 changes: 1 addition & 1 deletion app/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/OdyseeTeam/odysee-api/pkg/rpcerrors"
"github.com/sirupsen/logrus"

"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

var logger = monitor.NewModuleLogger("proxy")
Expand Down
2 changes: 1 addition & 1 deletion app/proxy/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func TestProxyNilQuery(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/publish/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

type DummyPublisher struct {
Expand Down
2 changes: 1 addition & 1 deletion app/publish/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/hashicorp/go-retryablehttp"
werrors "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

var logger = monitor.NewModuleLogger("publish")
Expand Down
2 changes: 1 addition & 1 deletion app/publish/tus.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
werrors "github.com/pkg/errors"
"github.com/sirupsen/logrus"
tusd "github.com/tus/tusd/pkg/handler"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const module = "publish.tus"
Expand Down
2 changes: 1 addition & 1 deletion app/query/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/marshaler"
"github.com/eko/gocache/lib/v4/store"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
"golang.org/x/sync/singleflight"
)

Expand Down
2 changes: 1 addition & 1 deletion app/query/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/OdyseeTeam/odysee-api/internal/metrics"
"github.com/OdyseeTeam/odysee-api/internal/monitor"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"

"github.com/dgraph-io/ristretto"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion app/query/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func TestCache(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/query/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func TestGetCacheKey(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/query/caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

ljsonrpc "github.com/lbryio/lbry.go/v2/extras/jsonrpc"
"github.com/sirupsen/logrus"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/query/caller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
logrusTest "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

var bgctx = func() context.Context { return context.Background() }
Expand Down
2 changes: 1 addition & 1 deletion app/query/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/sirupsen/logrus"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

type contextKey string
Expand Down
2 changes: 1 addition & 1 deletion app/query/paid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
ljsonrpc "github.com/lbryio/lbry.go/v2/extras/jsonrpc"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/query/processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
ljsonrpc "github.com/lbryio/lbry.go/v2/extras/jsonrpc"

"github.com/mitchellh/mapstructure"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/OdyseeTeam/odysee-api/internal/monitor"
"github.com/OdyseeTeam/odysee-api/pkg/rpcerrors"

"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

var logger = monitor.NewModuleLogger("query")
Expand Down
2 changes: 1 addition & 1 deletion app/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func TestQueryParamsAsMap(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/query/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"

"github.com/ybbus/jsonrpc"
"github.com/ybbus/jsonrpc/v2"
)

func decodeResponse(r string) (*jsonrpc.RPCResponse, error) {
Expand Down
1 change: 1 addition & 0 deletions docker/oapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ SturdyCache:

ReflectorUpstream:
DatabaseDSN: 'user:password@tcp(localhost:3306)/blobs'
Endpoint: http://localhost:1337
Region: us-east-1
Bucket: blobs'
Key: key
Expand Down
Loading
Loading