Skip to content

Commit 4e29622

Browse files
committed
fix(staging): return StagingStore interface from constructors to satisfy iface linter
1 parent 8b942ff commit 4e29622

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

flow/connectors/clickhouse/staging.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import (
77
"net/url"
88
"strings"
99

10-
"github.com/aws/aws-sdk-go-v2/aws"
11-
1210
clickhouseproto "github.com/ClickHouse/clickhouse-go/v2/lib/proto"
11+
"github.com/aws/aws-sdk-go-v2/aws"
1312

1413
"github.com/PeerDB-io/peerdb/flow/connectors/utils"
1514
"github.com/PeerDB-io/peerdb/flow/generated/protos"

flow/connectors/utils/staging_gcs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type GCSStagingStore struct {
2626
fullPath string
2727
}
2828

29-
func NewGCSStagingStore(ctx context.Context, bucketPath string) (*GCSStagingStore, error) {
29+
func NewGCSStagingStore(ctx context.Context, bucketPath string) (StagingStore, error) {
3030
// bucketPath is "gcs://bucket/prefix" or just "bucket/prefix"
3131
path := strings.TrimPrefix(bucketPath, "gcs://")
3232
path = strings.TrimPrefix(path, "gs://")

flow/connectors/utils/staging_s3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type S3StagingStore struct {
2424
fullPath string // original "s3://bucket/prefix" for logging
2525
}
2626

27-
func NewS3StagingStore(bucketPath string, creds AWSCredentialsProvider) (*S3StagingStore, error) {
27+
func NewS3StagingStore(bucketPath string, creds AWSCredentialsProvider) (StagingStore, error) {
2828
s3o, err := NewS3BucketAndPrefix(bucketPath)
2929
if err != nil {
3030
return nil, fmt.Errorf("failed to parse S3 bucket path: %w", err)

0 commit comments

Comments
 (0)