mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-11-26 00:46:45 +01:00
refactor: move filter and fetch to pkg
This commit is contained in:
parent
f791b87172
commit
02e31146cc
@ -1 +0,0 @@
|
|||||||
export TEST_GRAPHQL_ENDPOINT=
|
|
5
Makefile
5
Makefile
@ -13,6 +13,5 @@ mod:
|
|||||||
go mod tidy
|
go mod tidy
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|
||||||
test:
|
test-pkg:
|
||||||
source .env.test
|
TEST_GRAPHQL_ENDPOINT=https://rpc.alfajores.celo.grassecon.net/graphql go test -v -covermode atomic -coverprofile=covprofile ./pkg/...
|
||||||
go test -v -covermode atomic -coverprofile=covprofile ./internal/...
|
|
@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/filter"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/filter"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initAddressFilter() filter.Filter {
|
func initAddressFilter() filter.Filter {
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/alitto/pond"
|
"github.com/alitto/pond"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/pool"
|
"github.com/grassrootseconomics/cic-chain-events/internal/pool"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/store"
|
"github.com/grassrootseconomics/cic-chain-events/internal/store"
|
||||||
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/knadh/goyesql/v2"
|
"github.com/knadh/goyesql/v2"
|
||||||
"github.com/knadh/koanf"
|
"github.com/knadh/koanf"
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/api"
|
"github.com/grassrootseconomics/cic-chain-events/internal/api"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/filter"
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/pipeline"
|
"github.com/grassrootseconomics/cic-chain-events/internal/pipeline"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/syncer"
|
"github.com/grassrootseconomics/cic-chain-events/internal/syncer"
|
||||||
|
"github.com/grassrootseconomics/cic-chain-events/pkg/filter"
|
||||||
"github.com/knadh/goyesql/v2"
|
"github.com/knadh/goyesql/v2"
|
||||||
"github.com/knadh/koanf"
|
"github.com/knadh/koanf"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
|
@ -3,9 +3,9 @@ package pipeline
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/filter"
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/store"
|
"github.com/grassrootseconomics/cic-chain-events/internal/store"
|
||||||
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
|
"github.com/grassrootseconomics/cic-chain-events/pkg/filter"
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
celo "github.com/grassrootseconomics/cic-celo-sdk"
|
celo "github.com/grassrootseconomics/cic-celo-sdk"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
)
|
)
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
)
|
)
|
@ -5,7 +5,7 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/celo-org/celo-blockchain/common"
|
"github.com/celo-org/celo-blockchain/common"
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
"github.com/grassrootseconomics/w3-celo-patch"
|
"github.com/grassrootseconomics/w3-celo-patch"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"github.com/zerodha/logf"
|
"github.com/zerodha/logf"
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package filter
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-chain-events/internal/fetch"
|
"github.com/grassrootseconomics/cic-chain-events/pkg/fetch"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Filter defines a read only filter which must return next as true/false or an error
|
// Filter defines a read only filter which must return next as true/false or an error
|
Loading…
Reference in New Issue
Block a user