Skip to content
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
31 changes: 31 additions & 0 deletions bindings/alicloud/dingtalk/webhook/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: alicloud.dingtalk.webhook
version: v1
status: alpha
title: "AliCloud DingTalk Webhook"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/alicloud-dingtalk/
binding:
output: true
input: true
operations:
- name: create
description: "Send a message to DingTalk webhook"
- name: read
description: "Receive messages from DingTalk webhook"
metadata:
- name: id
required: true
description: "The webhook ID"
example: "your-webhook-id"
- name: url
required: true
description: "The webhook URL"
example: '"https://oapi.dingtalk.com/robot/send?access_token=your-token"'
- name: secret
required: false
description: "The webhook secret for signature verification"
example: "your-webhook-secret"
48 changes: 48 additions & 0 deletions bindings/alicloud/oss/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: alicloud.oss
version: v1
status: alpha
title: "AliCloud Object Storage Service (OSS)"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/oss/
binding:
output: true
input: false
operations:
- name: create
description: "Upload file to OSS"
authenticationProfiles:
- title: "AliCloud Access Key Authentication"
description: |
Authenticate using AliCloud access key credentials.
metadata:
- name: accessKeyID
required: false
description: "The AliCloud access key ID"
example: '"your-access-key-id"'
sensitive: true
- name: accessKeySecret
required: false
sensitive: true
description: "The AliCloud access key secret"
example: '"your-access-key-secret"'
- name: accessKey
required: false
description: "The AliCloud access key"
example: "access-key"
metadata:
- name: endpoint
required: true
description: "The OSS endpoint"
example: "https://oss-cn-hangzhou.aliyuncs.com"
- name: bucket
required: true
description: "The OSS bucket name"
example: "your-bucket-name"
- name: objectKey
required: true
description: "The object key in the bucket"
example: "path/to/file.txt"
52 changes: 52 additions & 0 deletions bindings/alicloud/sls/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: alicloud.sls
version: v1
status: alpha
title: "AliCloud Simple Log Storage (SLS)"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/alicloudsls/
binding:
output: true
input: false
operations:
- name: create
description: "Send logs to SLS"
authenticationProfiles:
- title: "Access Key Authentication"
description: |
Authenticate using AliCloud access key credentials.
metadata:
- name: accessKeyID
required: false
sensitive: true
description: "The AliCloud access key ID"
example: "your-access-key-id"
- name: accessKeySecret
required: false
sensitive: true
description: "The AliCloud access key secret"
example: "your-access-key-secret"
metadata:
- name: endpoint
required: true
description: "The SLS endpoint"
example: "https://your-project.cn-hangzhou.log.aliyuncs.com"
- name: project
required: true
description: "The SLS project name"
example: '"your-project-name"'
- name: logstore
required: true
description: "The SLS logstore name"
example: "your-logstore-name"
- name: topic
required: true
description: "The SLS topic name"
example: "your-topic-name"
- name: source
required: true
description: "The SLS source name"
example: "your-source-name"
1 change: 1 addition & 0 deletions bindings/alicloud/sls/sls.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func NewAliCloudSlsLogstorage(logger logger.Logger) bindings.OutputBinding {

func (s *AliCloudSlsLogstorage) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error) {
// verify the metadata property
// TODO: move these to the struct with proper tags
if logProject := req.Metadata["project"]; logProject == "" {
return nil, errors.New("SLS binding error: project property not supplied")
}
Expand Down
48 changes: 48 additions & 0 deletions bindings/alicloud/tablestore/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: alicloud.tablestore
version: v1
status: stable
title: "AliCloud Table Store"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/alicloudtablestore/
binding:
output: true
input: false
operations:
- name: create
description: "Write data to Table Store"
authenticationProfiles:
- title: "Access Key Authentication"
description: |
Authenticate using AliCloud access key credentials.
metadata:
- name: accessKeyID
required: true
description: "The AliCloud access key ID"
example: "access-key-id"
- name: accessKeySecret
required: true
sensitive: true
description: "The AliCloud access key secret"
example: "access-key-secret"
- name: accessKey
required: true
description: "The AliCloud access key"
example: "access-key"
metadata:
- name: endpoint
required: true
description: "The Table Store endpoint"
example: '"https://your-instance.cn-hangzhou.ots.aliyuncs.com"'
- name: instanceName
required: true
description: "The Table Store instance name"
example: "instance-name"
- name: tableName
required: true
description: "The table name to write to"
example: "table-name"
4 changes: 2 additions & 2 deletions bindings/alicloud/tablestore/tablestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (s *AliCloudTableStore) get(req *bindings.InvokeRequest, resp *bindings.Inv
pkNames := strings.Split(req.Metadata[primaryKeys], ",")
pks := make([]*tablestore.PrimaryKeyColumn, len(pkNames))

data := make(map[string]interface{})
data := make(map[string]any)
err := json.Unmarshal(req.Data, &data)
if err != nil {
return err
Expand Down Expand Up @@ -313,7 +313,7 @@ func (s *AliCloudTableStore) unmarshal(pks []*tablestore.PrimaryKeyColumn, colum
return nil, nil
}

data := make(map[string]interface{})
data := make(map[string]any)

for _, pk := range pks {
data[pk.ColumnName] = pk.Value
Expand Down
2 changes: 2 additions & 0 deletions bindings/apns/apns.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
kitmd "github.com/dapr/kit/metadata"
)

// TODO: these should be configured in the metadata.yaml file and be part of the metadata struct with proper json tags.
const (
collapseIDKey = "apns-collapse-id"
developmentKey = "development"
Expand Down Expand Up @@ -67,6 +68,7 @@ type APNS struct {
authorizationBuilder *authorizationBuilder
}

// TODO: use proper tags
type APNSmetadata struct {
Development bool `mapstructure:"development"`
KeyID string `mapstructure:"key-id"`
Expand Down
40 changes: 40 additions & 0 deletions bindings/apns/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# yaml-language-server: $schema=../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: apns
version: v1
status: alpha
title: "Apple Push Notification Service (APNS)"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/apns/
binding:
output: true
input: false
operations:
- name: create
description: "Send push notification via APNS"
authenticationProfiles:
- title: "APNS Key Authentication"
description: |
Authenticate using APNS key credentials.
metadata:
- name: key-id
required: true
description: "The APNS key ID"
example: "ABC123DEF4"
- name: team-id
required: true
description: "The APNS team ID"
example: "DEF123GHI4"
- name: private-key
required: true
sensitive: true
description: "The APNS private key (P8 file content)"
metadata:
- name: development
type: boolean
required: false
description: "The APNS environment is development or not"
example: true
default: false
1 change: 1 addition & 0 deletions bindings/aws/dynamodb/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type DynamoDB struct {
logger logger.Logger
}

// TODO: the metadata fields need updating to use the builtin aws auth provider fully and reflect in metadata.yaml
type dynamoDBMetadata struct {
Region string `json:"region" mapstructure:"region"`
Endpoint string `json:"endpoint" mapstructure:"endpoint"`
Expand Down
48 changes: 48 additions & 0 deletions bindings/aws/dynamodb/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: aws.dynamodb
version: v1
status: stable
title: "AWS DynamoDB"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/dynamodb/
binding:
output: true
input: false
operations:
- name: create
description: "Write item to DynamoDB table"
authenticationProfiles:
- title: "AWS Access Key Authentication"
description: |
Authenticate using AWS access key credentials.
metadata:
- name: accessKey
required: true
description: "The AWS access key"
example: "AKIAIOSFODNN7EXAMPLE"
- name: secretKey
required: true
sensitive: true
description: "The AWS secret key"
example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- name: sessionToken
required: false
sensitive: true
description: "The AWS session token"
example: "TOKEN"
- name: region
required: true
description: "The AWS region"
example: "us-east-1"
metadata:
- name: table
required: true
description: "The DynamoDB table name"
example: "my-table"
- name: endpoint
required: false
description: "The DynamoDB endpoint URL"
example: "http://localhost:8000"
3 changes: 2 additions & 1 deletion bindings/aws/kinesis/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type AWSKinesis struct {
wg sync.WaitGroup
}

// TODO: we need to clean up the metadata fields here and update this binding to use the builtin aws auth provider and reflect in metadata.yaml
type kinesisMetadata struct {
StreamName string `json:"streamName" mapstructure:"streamName"`
ConsumerName string `json:"consumerName" mapstructure:"consumerName"`
Expand All @@ -73,7 +74,7 @@ const (
// SharedThroughput - shared throughput using checkpoint and monitoring.
SharedThroughput = "shared"

partitionKeyName = "partitionKey"
partitionKeyName = "partitionKey" // TODO: mv to metadata field instead
)

// recordProcessorFactory.
Expand Down
Loading
Loading