Skip to content

Commit

Permalink
Merge branch 'pulsarproto' of github.com:yaron2/components-contrib-1 …
Browse files Browse the repository at this point in the history
…into pulsarproto
  • Loading branch information
yaron2 committed Jul 25, 2023
2 parents 606b29d + 06ab704 commit 790fd6c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
42 changes: 41 additions & 1 deletion .build-tools/pkg/metadataschema/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,46 @@ func (c *ComponentMetadata) AppendBuiltin() error {
URL: "https://docs.dapr.io/developing-applications/building-blocks/pubsub/howto-namespace/",
},
},
Metadata{
Name: "allowedTopics",
Type: "string",
Description: "A comma-separated list of allowed topics for all applications. If empty (default) apps can publish and subscribe to all topics, notwithstanding `publishingScopes` and `subscriptionScopes`.",
Example: `"app1=topic1;app2=topic2,topic3"`,
URL: &URL{
Title: "Documentation",
URL: "https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-scopes/",
},
},
Metadata{
Name: "publishingScopes",
Type: "string",
Description: "A semicolon-separated list of applications and comma-separated topic lists, allowing that app to publish to that list of topics. If empty (default), apps can publish to all topics.",
Example: `"app1=topic1;app2=topic2,topic3;app3="`,
URL: &URL{
Title: "Documentation",
URL: "https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-scopes/",
},
},
Metadata{
Name: "subscriptionScopes",
Type: "string",
Description: "A semicolon-separated list of applications and comma-separated topic lists, allowing that app to subscribe to that list of topics. If empty (default), apps can subscribe to all topics.",
Example: `"app1=topic1;app2=topic2,topic3"`,
URL: &URL{
Title: "Documentation",
URL: "https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-scopes/",
},
},
Metadata{
Name: "protectedTopics",
Type: "string",
Description: `A comma-separated list of topics marked as "protected" for all applications. If a topic is marked as protected then an application must be explicitly granted publish or subscribe permissions through 'publishingScopes' or 'subscriptionScopes' to publish or subscribe to it.`,
Example: `"topic1,topic2"`,
URL: &URL{
Title: "Documentation",
URL: "https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-scopes/",
},
},
)
case mdutils.BindingType:
if c.Binding != nil {
Expand All @@ -176,7 +216,7 @@ func (c *ComponentMetadata) AppendBuiltin() error {
Name: bindingDirectionMetadataKey,
Type: "string",
Description: "Indicates the direction of the binding component.",
Example: `"`+direction+`"`,
Example: `"` + direction + `"`,
URL: &URL{
Title: "Documentation",
URL: "https://docs.dapr.io/reference/api/bindings_api/#binding-direction-optional",
Expand Down
4 changes: 2 additions & 2 deletions pubsub/in-memory/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ schemaVersion: v1
type: pubsub
name: in-memory
version: v1
status: beta
title: "In-Memory"
status: stable
title: "In-memory"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-inmemory/
Expand Down
2 changes: 1 addition & 1 deletion pubsub/pulsar/pulsar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) {
}
meta, err := parsePulsarMetadata(m)

assert.Nil(t, err)
assert.NoError(t, err)
assert.Equal(t, "a", meta.Host)
assert.Len(t, meta.internalTopicSchemas, 2)
assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value)
Expand Down
11 changes: 11 additions & 0 deletions state/in-memory/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../component-metadata-schema.json
schemaVersion: v1
type: state
name: in-memory
version: v1
status: stable
title: "In-memory"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-inmemory/
metadata: []

0 comments on commit 790fd6c

Please sign in to comment.