Rename folder "internal" to "common" (#3225)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
parent
95690ac052
commit
934e86c4f7
|
@ -4,14 +4,14 @@ set -e
|
|||
|
||||
# Rebuild the Worker
|
||||
(
|
||||
cd internal/component/cloudflare/worker-src;
|
||||
cd common/component/cloudflare/worker-src;
|
||||
npm ci;
|
||||
npm run build;
|
||||
)
|
||||
|
||||
# Check that the code of the worker is correct
|
||||
git diff --exit-code ./internal/component/cloudflare/workers/code \
|
||||
|| (echo "The source code of the Cloudflare Worker has changed, but the Worker has not been recompiled. Please re-compile the Worker by running 'npm ci && npm run build' in 'internal/component/cloudflare/worker-src'" && exit 1)
|
||||
git diff --exit-code ./common/component/cloudflare/workers/code \
|
||||
|| (echo "The source code of the Cloudflare Worker has changed, but the Worker has not been recompiled. Please re-compile the Worker by running 'npm ci && npm run build' in 'common/component/cloudflare/worker-src'" && exit 1)
|
||||
|
||||
# Remove dashes from UNIQUE_ID
|
||||
Suffix=$(echo "$UNIQUE_ID" | sed -E 's/-//g')
|
||||
|
|
|
@ -19,7 +19,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'bindings/azure/blobstorage',
|
||||
'internal/component/azure/blobstorage',
|
||||
'common/component/azure/blobstorage',
|
||||
],
|
||||
},
|
||||
'bindings.azure.cosmosdb': {
|
||||
|
@ -73,7 +73,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'bindings/azure/eventhubs',
|
||||
'internal/component/azure/eventhubs',
|
||||
'common/component/azure/eventhubs',
|
||||
],
|
||||
},
|
||||
'bindings.azure.servicebusqueues': {
|
||||
|
@ -82,7 +82,7 @@ const components = {
|
|||
requiredSecrets: ['AzureServiceBusConnectionString'],
|
||||
sourcePkg: [
|
||||
'bindings/azure/servicebusqueues',
|
||||
'internal/component/azure/servicebus',
|
||||
'common/component/azure/servicebus',
|
||||
],
|
||||
},
|
||||
'bindings.azure.storagequeues': {
|
||||
|
@ -135,17 +135,17 @@ const components = {
|
|||
},
|
||||
'bindings.kafka': {
|
||||
certification: true,
|
||||
sourcePkg: ['bindings/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['bindings/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'bindings.kafka-confluent': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh confluent',
|
||||
sourcePkg: ['bindings/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['bindings/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'bindings.kafka-wurstmeister': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh kafka',
|
||||
sourcePkg: ['bindings/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['bindings/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'bindings.kitex': {
|
||||
certification: true,
|
||||
|
@ -180,7 +180,7 @@ const components = {
|
|||
conformanceSetup: 'docker-compose.sh postgresql',
|
||||
sourcePkg: [
|
||||
'bindings/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'common/authentication/postgresql',
|
||||
],
|
||||
},
|
||||
'bindings.postgresql.azure': {
|
||||
|
@ -193,7 +193,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'bindings/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'common/authentication/postgresql',
|
||||
],
|
||||
},
|
||||
'bindings.rabbitmq': {
|
||||
|
@ -203,23 +203,23 @@ const components = {
|
|||
},
|
||||
'bindings.redis': {
|
||||
certification: true,
|
||||
sourcePkg: ['bindings/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['bindings/redis', 'common/component/redis'],
|
||||
},
|
||||
'bindings.redis.v6': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redisjson redis',
|
||||
sourcePkg: ['bindings/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['bindings/redis', 'common/component/redis'],
|
||||
},
|
||||
'bindings.redis.v7': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redis7 redis',
|
||||
sourcePkg: ['bindings/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['bindings/redis', 'common/component/redis'],
|
||||
},
|
||||
'configuration.postgres': {
|
||||
certification: true,
|
||||
sourcePkg: [
|
||||
'configuration/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'common/authentication/postgresql',
|
||||
],
|
||||
},
|
||||
'configuration.postgresql.docker': {
|
||||
|
@ -227,7 +227,7 @@ const components = {
|
|||
conformanceSetup: 'docker-compose.sh postgresql',
|
||||
sourcePkg: [
|
||||
'configuration/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'common/authentication/postgresql',
|
||||
],
|
||||
},
|
||||
'configuration.postgresql.azure': {
|
||||
|
@ -240,7 +240,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'configuration/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'common/authentication/postgresql',
|
||||
],
|
||||
},
|
||||
'configuration.redis.v6': {
|
||||
|
@ -275,12 +275,12 @@ const components = {
|
|||
'lock.redis.v6': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redisjson redis',
|
||||
sourcePkg: ['lock/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['lock/redis', 'common/component/redis'],
|
||||
},
|
||||
'lock.redis.v7': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redis7 redis',
|
||||
sourcePkg: ['lock/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['lock/redis', 'common/component/redis'],
|
||||
},
|
||||
'middleware.http.bearer': {
|
||||
certification: true,
|
||||
|
@ -350,7 +350,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'pubsub/azure/eventhubs',
|
||||
'internal/component/azure/eventhubs',
|
||||
'common/component/azure/eventhubs',
|
||||
],
|
||||
},
|
||||
'pubsub.azure.servicebus.queues': {
|
||||
|
@ -358,7 +358,7 @@ const components = {
|
|||
requiredSecrets: ['AzureServiceBusConnectionString'],
|
||||
sourcePkg: [
|
||||
'pubsub/azure/servicebus/queues',
|
||||
'internal/component/azure/servicebus',
|
||||
'common/component/azure/servicebus',
|
||||
],
|
||||
},
|
||||
'pubsub.azure.servicebus.topics': {
|
||||
|
@ -373,7 +373,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'pubsub/azure/servicebus/topics',
|
||||
'internal/component/azure/servicebus',
|
||||
'common/component/azure/servicebus',
|
||||
],
|
||||
},
|
||||
'pubsub.in-memory': {
|
||||
|
@ -385,17 +385,17 @@ const components = {
|
|||
},
|
||||
'pubsub.kafka': {
|
||||
certification: true,
|
||||
sourcePkg: ['pubsub/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['pubsub/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'pubsub.kafka-confluent': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh confluent',
|
||||
sourcePkg: ['pubsub/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['pubsub/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'pubsub.kafka-wurstmeister': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh kafka',
|
||||
sourcePkg: ['pubsub/kafka', 'internal/component/kafka'],
|
||||
sourcePkg: ['pubsub/kafka', 'common/component/kafka'],
|
||||
},
|
||||
'pubsub.kubemq': {
|
||||
conformance: true,
|
||||
|
@ -427,7 +427,7 @@ const components = {
|
|||
'pubsub.redis.v6': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redisjson redis',
|
||||
sourcePkg: ['pubsub/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['pubsub/redis', 'common/component/redis'],
|
||||
},
|
||||
// This test is currently disabled due to issues with Redis v7
|
||||
/*'pubsub.redis.v7': {
|
||||
|
@ -521,7 +521,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'state/azure/blobstorage',
|
||||
'internal/component/azure/blobstorage',
|
||||
'common/component/azure/blobstorage',
|
||||
],
|
||||
},
|
||||
'state.azure.blobstorage.v1': {
|
||||
|
@ -536,7 +536,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'state/azure/blobstorage',
|
||||
'internal/component/azure/blobstorage',
|
||||
'common/component/azure/blobstorage',
|
||||
],
|
||||
},
|
||||
'state.azure.blobstorage': {
|
||||
|
@ -551,7 +551,7 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'state/azure/blobstorage',
|
||||
'internal/component/azure/blobstorage',
|
||||
'common/component/azure/blobstorage',
|
||||
],
|
||||
},
|
||||
'state.azure.cosmosdb': {
|
||||
|
@ -621,8 +621,8 @@ const components = {
|
|||
conformanceSetup: 'docker-compose.sh cockroachdb',
|
||||
sourcePkg: [
|
||||
'state/cockroachdb',
|
||||
'internal/component/postgresql',
|
||||
'internal/component/sql',
|
||||
'common/component/postgresql',
|
||||
'common/component/sql',
|
||||
],
|
||||
},
|
||||
'state.etcd.v1': {
|
||||
|
@ -648,17 +648,17 @@ const components = {
|
|||
},
|
||||
'state.mysql': {
|
||||
certification: true,
|
||||
sourcePkg: ['state/mysql', 'internal/component/sql'],
|
||||
sourcePkg: ['state/mysql', 'common/component/sql'],
|
||||
},
|
||||
'state.mysql.mariadb': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh mariadb',
|
||||
sourcePkg: ['state/mysql', 'internal/component/sql'],
|
||||
sourcePkg: ['state/mysql', 'common/component/sql'],
|
||||
},
|
||||
'state.mysql.mysql': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh mysql',
|
||||
sourcePkg: ['state/mysql', 'internal/component/sql'],
|
||||
sourcePkg: ['state/mysql', 'common/component/sql'],
|
||||
},
|
||||
'state.oracledatabase': {
|
||||
conformance: true,
|
||||
|
@ -668,9 +668,9 @@ const components = {
|
|||
certification: true,
|
||||
sourcePkg: [
|
||||
'state/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'internal/component/postgresql',
|
||||
'internal/component/sql',
|
||||
'common/authentication/postgresql',
|
||||
'common/component/postgresql',
|
||||
'common/component/sql',
|
||||
],
|
||||
},
|
||||
'state.postgresql.docker': {
|
||||
|
@ -678,9 +678,9 @@ const components = {
|
|||
conformanceSetup: 'docker-compose.sh postgresql',
|
||||
sourcePkg: [
|
||||
'state/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'internal/component/postgresql',
|
||||
'internal/component/sql',
|
||||
'common/authentication/postgresql',
|
||||
'common/component/postgresql',
|
||||
'common/component/sql',
|
||||
],
|
||||
},
|
||||
'state.postgresql.azure': {
|
||||
|
@ -693,24 +693,24 @@ const components = {
|
|||
],
|
||||
sourcePkg: [
|
||||
'state/postgresql',
|
||||
'internal/authentication/postgresql',
|
||||
'internal/component/postgresql',
|
||||
'internal/component/sql',
|
||||
'common/authentication/postgresql',
|
||||
'common/component/postgresql',
|
||||
'common/component/sql',
|
||||
],
|
||||
},
|
||||
'state.redis': {
|
||||
certification: true,
|
||||
sourcePkg: ['state/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['state/redis', 'common/component/redis'],
|
||||
},
|
||||
'state.redis.v6': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redisjson redis',
|
||||
sourcePkg: ['state/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['state/redis', 'common/component/redis'],
|
||||
},
|
||||
'state.redis.v7': {
|
||||
conformance: true,
|
||||
conformanceSetup: 'docker-compose.sh redis7 redis',
|
||||
sourcePkg: ['state/redis', 'internal/component/redis'],
|
||||
sourcePkg: ['state/redis', 'common/component/redis'],
|
||||
},
|
||||
'state.rethinkdb': {
|
||||
conformance: true,
|
||||
|
@ -719,14 +719,14 @@ const components = {
|
|||
'state.sqlite': {
|
||||
conformance: true,
|
||||
certification: true,
|
||||
sourcePkg: ['state/sqlite', 'internal/component/sql'],
|
||||
sourcePkg: ['state/sqlite', 'common/component/sql'],
|
||||
},
|
||||
'state.sqlserver': {
|
||||
conformance: true,
|
||||
certification: true,
|
||||
conformanceSetup: 'docker-compose.sh sqlserver',
|
||||
requiredSecrets: ['AzureSqlServerConnectionString'],
|
||||
sourcePkg: ['state/sqlserver', 'internal/component/sql'],
|
||||
sourcePkg: ['state/sqlserver', 'common/component/sql'],
|
||||
},
|
||||
// 'state.gcp.firestore.docker': {
|
||||
// conformance: true,
|
||||
|
|
|
@ -1 +1 @@
|
|||
internal/component/cloudflare/workers/code/
|
||||
common/component/cloudflare/workers/code/
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -33,7 +33,7 @@ import (
|
|||
"github.com/vmware/vmware-go-kcl/clientlibrary/worker"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -36,8 +36,8 @@ import (
|
|||
"github.com/google/uuid"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
internalutils "github.com/dapr/components-contrib/internal/utils"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
commonutils "github.com/dapr/components-contrib/common/utils"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
@ -188,7 +188,7 @@ func (s *AWSS3) create(ctx context.Context, req *bindings.InvokeRequest) (*bindi
|
|||
return nil, fmt.Errorf("s3 binding error: file read error: %w", err)
|
||||
}
|
||||
} else {
|
||||
r = strings.NewReader(internalutils.Unquote(req.Data))
|
||||
r = strings.NewReader(commonutils.Unquote(req.Data))
|
||||
}
|
||||
|
||||
if metadata.DecodeBase64 {
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go/service/ses"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go/service/sns"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go/service/sqs"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
awsAuth "github.com/dapr/components-contrib/internal/authentication/aws"
|
||||
awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -31,7 +31,7 @@ import (
|
|||
"github.com/google/uuid"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
storageinternal "github.com/dapr/components-contrib/internal/component/azure/blobstorage"
|
||||
storagecommon "github.com/dapr/components-contrib/common/component/azure/blobstorage"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/ptr"
|
||||
|
@ -65,7 +65,7 @@ var ErrMissingBlobName = errors.New("blobName is a required attribute")
|
|||
|
||||
// AzureBlobStorage allows saving blobs to an Azure Blob Storage account.
|
||||
type AzureBlobStorage struct {
|
||||
metadata *storageinternal.BlobStorageMetadata
|
||||
metadata *storagecommon.BlobStorageMetadata
|
||||
containerClient *container.Client
|
||||
|
||||
logger logger.Logger
|
||||
|
@ -99,7 +99,7 @@ func NewAzureBlobStorage(logger logger.Logger) bindings.OutputBinding {
|
|||
// Init performs metadata parsing.
|
||||
func (a *AzureBlobStorage) Init(ctx context.Context, metadata bindings.Metadata) error {
|
||||
var err error
|
||||
a.containerClient, a.metadata, err = storageinternal.CreateContainerStorageClient(ctx, a.logger, metadata.Properties)
|
||||
a.containerClient, a.metadata, err = storagecommon.CreateContainerStorageClient(ctx, a.logger, metadata.Properties)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ func (a *AzureBlobStorage) create(ctx context.Context, req *bindings.InvokeReque
|
|||
blobName = id.String()
|
||||
}
|
||||
|
||||
blobHTTPHeaders, err := storageinternal.CreateBlobHTTPHeadersFromRequest(req.Metadata, nil, a.logger)
|
||||
blobHTTPHeaders, err := storagecommon.CreateBlobHTTPHeadersFromRequest(req.Metadata, nil, a.logger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ func (a *AzureBlobStorage) create(ctx context.Context, req *bindings.InvokeReque
|
|||
}
|
||||
|
||||
uploadOptions := azblob.UploadBufferOptions{
|
||||
Metadata: storageinternal.SanitizeMetadata(a.logger, req.Metadata),
|
||||
Metadata: storagecommon.SanitizeMetadata(a.logger, req.Metadata),
|
||||
HTTPHeaders: &blobHTTPHeaders,
|
||||
TransactionalContentMD5: blobHTTPHeaders.BlobContentMD5,
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ func (a *AzureBlobStorage) isValidDeleteSnapshotsOptionType(accessType azblob.De
|
|||
|
||||
// GetComponentMetadata returns the metadata of the component.
|
||||
func (a *AzureBlobStorage) GetComponentMetadata() (metadataInfo contribMetadata.MetadataMap) {
|
||||
metadataStruct := storageinternal.BlobStorageMetadata{}
|
||||
metadataStruct := storagecommon.BlobStorageMetadata{}
|
||||
contribMetadata.GetMetadataInfoFromStructType(reflect.TypeOf(metadataStruct), &metadataInfo, contribMetadata.BindingType)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
"github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
"github.com/dapr/components-contrib/common/authentication/azure"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -37,8 +37,8 @@ import (
|
|||
"github.com/valyala/fasthttp"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/components-contrib/contenttype"
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
impl "github.com/dapr/components-contrib/internal/component/azure/eventhubs"
|
||||
impl "github.com/dapr/components-contrib/common/component/azure/eventhubs"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/ptr"
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -26,7 +26,7 @@ import (
|
|||
servicebus "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
impl "github.com/dapr/components-contrib/internal/component/azure/servicebus"
|
||||
impl "github.com/dapr/components-contrib/common/component/azure/servicebus"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
|
|
@ -33,7 +33,7 @@ import (
|
|||
"github.com/lestrrat-go/jwx/v2/jwt"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
"github.com/dapr/components-contrib/internal/component/cloudflare/workers"
|
||||
"github.com/dapr/components-contrib/common/component/cloudflare/workers"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"errors"
|
||||
"regexp"
|
||||
|
||||
"github.com/dapr/components-contrib/internal/component/cloudflare/workers"
|
||||
"github.com/dapr/components-contrib/common/component/cloudflare/workers"
|
||||
)
|
||||
|
||||
// Component metadata struct.
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/dapr/kit/logger"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
"github.com/dapr/components-contrib/internal/component/kafka"
|
||||
"github.com/dapr/components-contrib/common/component/kafka"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
kubeclient "github.com/dapr/components-contrib/internal/authentication/kubernetes"
|
||||
kubeclient "github.com/dapr/components-contrib/common/authentication/kubernetes"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
|
|
@ -14,7 +14,7 @@ limitations under the License.
|
|||
package postgres
|
||||
|
||||
import (
|
||||
pgauth "github.com/dapr/components-contrib/internal/authentication/postgresql"
|
||||
pgauth "github.com/dapr/components-contrib/common/authentication/postgresql"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"reflect"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
rediscomponent "github.com/dapr/components-contrib/internal/component/redis"
|
||||
rediscomponent "github.com/dapr/components-contrib/common/component/redis"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
internalredis "github.com/dapr/components-contrib/internal/component/redis"
|
||||
rediscomponent "github.com/dapr/components-contrib/common/component/redis"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
@ -243,7 +243,7 @@ func TestIncrement(t *testing.T) {
|
|||
assert.Equal(t, nil, err)
|
||||
}
|
||||
|
||||
func setupMiniredis() (*miniredis.Miniredis, internalredis.RedisClient) {
|
||||
func setupMiniredis() (*miniredis.Miniredis, rediscomponent.RedisClient) {
|
||||
s, err := miniredis.Run()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -253,5 +253,5 @@ func setupMiniredis() (*miniredis.Miniredis, internalredis.RedisClient) {
|
|||
DB: 0,
|
||||
}
|
||||
|
||||
return s, internalredis.ClientFromV8Client(redis.NewClient(opts))
|
||||
return s, rediscomponent.ClientFromV8Client(redis.NewClient(opts))
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
internalutils "github.com/dapr/components-contrib/internal/utils"
|
||||
commonutils "github.com/dapr/components-contrib/common/utils"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
|
@ -103,7 +103,7 @@ func (t *SMS) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*binding
|
|||
toNumberValue = toNumberFromRequest
|
||||
}
|
||||
|
||||
body := internalutils.Unquote(req.Data)
|
||||
body := commonutils.Unquote(req.Data)
|
||||
|
||||
v := url.Values{}
|
||||
v.Set("To", toNumberValue)
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
"github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
"github.com/dapr/components-contrib/internal/wasm"
|
||||
"github.com/dapr/components-contrib/common/wasm"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
|
||||
"github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
"github.com/dapr/components-contrib/common/authentication/azure"
|
||||
)
|
||||
|
||||
// PostgresAuthMetadata contains authentication metadata for PostgreSQL components.
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
mdutils "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
|
@ -21,7 +21,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
|
@ -19,7 +19,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
mdutils "github.com/dapr/components-contrib/metadata"
|
||||
kitmd "github.com/dapr/kit/metadata"
|
||||
)
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/ptr"
|
||||
"github.com/dapr/kit/retry"
|
|
@ -29,8 +29,8 @@ import (
|
|||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
"github.com/dapr/components-contrib/internal/component/azure/blobstorage"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/components-contrib/common/component/azure/blobstorage"
|
||||
"github.com/dapr/components-contrib/pubsub"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/retry"
|
|
@ -20,7 +20,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/metadata"
|
||||
)
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/cenkalti/backoff/v4"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
azauth "github.com/dapr/components-contrib/internal/authentication/azure"
|
||||
azauth "github.com/dapr/components-contrib/common/authentication/azure"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
||||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/cenkalti/backoff/v4"
|
||||
|
||||
"github.com/dapr/components-contrib/bindings"
|
||||
internalutils "github.com/dapr/components-contrib/internal/utils"
|
||||
commonutils "github.com/dapr/components-contrib/common/utils"
|
||||
contribMetadata "github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/components-contrib/pubsub"
|
||||
"github.com/dapr/kit/logger"
|
||||
|
@ -107,7 +107,7 @@ func (c *Client) PublishPubSubBulk(ctx context.Context, req *pubsub.BulkPublishR
|
|||
|
||||
// Create a new batch of messages with batch options.
|
||||
batchOpts := &servicebus.MessageBatchOptions{
|
||||
MaxBytes: internalutils.GetElemOrDefaultFromMap(req.Metadata, contribMetadata.MaxBulkPubBytesKey, defaultMaxBulkPubBytes),
|
||||
MaxBytes: commonutils.GetElemOrDefaultFromMap(req.Metadata, contribMetadata.MaxBulkPubBytesKey, defaultMaxBulkPubBytes),
|
||||
}
|
||||
|
||||
batchMsg, err := sender.NewMessageBatch(ctx, batchOpts)
|
|
@ -29,7 +29,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
cfworkerscode "github.com/dapr/components-contrib/internal/component/cloudflare/workers/code"
|
||||
cfworkerscode "github.com/dapr/components-contrib/common/component/cloudflare/workers/code"
|
||||
"github.com/dapr/kit/logger"
|
||||
"github.com/dapr/kit/ptr"
|
||||
)
|
|
@ -17,7 +17,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
pgauth "github.com/dapr/components-contrib/internal/authentication/postgresql"
|
||||
pgauth "github.com/dapr/components-contrib/common/authentication/postgresql"
|
||||
"github.com/dapr/components-contrib/state"
|
||||
"github.com/dapr/kit/metadata"
|
||||
"github.com/dapr/kit/ptr"
|
|
@ -28,8 +28,8 @@ import (
|
|||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
|
||||
pginterfaces "github.com/dapr/components-contrib/internal/component/postgresql/interfaces"
|
||||
internalsql "github.com/dapr/components-contrib/internal/component/sql"
|
||||
pginterfaces "github.com/dapr/components-contrib/common/component/postgresql/interfaces"
|
||||
commonsql "github.com/dapr/components-contrib/common/component/sql"
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
"github.com/dapr/components-contrib/state"
|
||||
"github.com/dapr/components-contrib/state/query"
|
||||
|
@ -46,7 +46,7 @@ type PostgreSQL struct {
|
|||
metadata pgMetadata
|
||||
db pginterfaces.PGXPoolConn
|
||||
|
||||
gc internalsql.GarbageCollector
|
||||
gc commonsql.GarbageCollector
|
||||
|
||||
migrateFn func(context.Context, pginterfaces.PGXPoolConn, MigrateOptions) error
|
||||
setQueryFn func(*state.SetRequest, SetQueryOptions) string
|
||||
|
@ -132,7 +132,7 @@ func (p *PostgreSQL) Init(ctx context.Context, meta state.Metadata) error {
|
|||
}
|
||||
|
||||
if p.metadata.CleanupInterval != nil {
|
||||
gc, err := internalsql.ScheduleGarbageCollector(internalsql.GCOptions{
|
||||
gc, err := commonsql.ScheduleGarbageCollector(commonsql.GCOptions{
|
||||
Logger: p.logger,
|
||||
UpdateLastCleanupQuery: func(arg any) (string, any) {
|
||||
return fmt.Sprintf(
|
||||
|
@ -149,7 +149,7 @@ func (p *PostgreSQL) Init(ctx context.Context, meta state.Metadata) error {
|
|||
p.metadata.TableName,
|
||||
),
|
||||
CleanupInterval: *p.metadata.CleanupInterval,
|
||||
DB: internalsql.AdaptPgxConn(p.db),
|
||||
DB: commonsql.AdaptPgxConn(p.db),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
|
@ -20,7 +20,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
pginterfaces "github.com/dapr/components-contrib/internal/component/postgresql/interfaces"
|
||||
pginterfaces "github.com/dapr/components-contrib/common/component/postgresql/interfaces"
|
||||
"github.com/dapr/components-contrib/state"
|
||||
"github.com/dapr/components-contrib/state/query"
|
||||
"github.com/dapr/kit/logger"
|
|
@ -25,7 +25,7 @@ import (
|
|||
pgxmock "github.com/pashagolub/pgxmock/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
pginterfaces "github.com/dapr/components-contrib/internal/component/postgresql/interfaces"
|
||||
pginterfaces "github.com/dapr/components-contrib/common/component/postgresql/interfaces"
|
||||
"github.com/dapr/components-contrib/state"
|
||||
"github.com/dapr/kit/logger"
|
||||
)
|
|
@ -23,7 +23,6 @@ import (
|
|||
"golang.org/x/mod/semver"
|
||||
|
||||
"github.com/dapr/components-contrib/configuration"
|
||||
|
||||
"github.com/dapr/components-contrib/metadata"
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue