-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from neuroglia-io/fix-bindings
Added AnypointMQ, JMS, SNS, Solace, SQS, STOMP, Mercure, IBMMQ, GooglePubSub and Pulsar bindings
- Loading branch information
Showing
119 changed files
with
3,956 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Neuroglia.AsyncApi.Core/Attributes/ExcludeAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Neuroglia.AsyncApi; | ||
|
||
/// <summary> | ||
/// Represents an <see cref="Attribute"/> used to exclude a parameter from the schema of an Async API message | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple = false)] | ||
public class ExcludeAttribute | ||
: Attribute | ||
{ | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/Neuroglia.AsyncApi.Core/v2/Bindings/AnypointMQ/AnypointMQBindingDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Neuroglia.AsyncApi.v2.Bindings.AnypointMQ; | ||
|
||
/// <summary> | ||
/// Represents the base record for all Anypoint MQ implementations of the <see cref="IBindingDefinition"/> interface | ||
/// </summary> | ||
[DataContract] | ||
public abstract record AnypointMQBindingDefinition | ||
: IBindingDefinition | ||
{ | ||
|
||
/// <inheritdoc/> | ||
[IgnoreDataMember, JsonIgnore, YamlIgnore] | ||
public IEnumerable<string> Protocols | ||
{ | ||
get | ||
{ | ||
yield return AsyncApiProtocol.AnypointMQ; | ||
} | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/Neuroglia.AsyncApi.Core/v2/Bindings/AnypointMQ/AnypointMQChannelBindingDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Neuroglia.AsyncApi.v2.Bindings.AnypointMQ; | ||
|
||
/// <summary> | ||
/// Represents the object used to configure an Anypoint MQ channel binding | ||
/// </summary> | ||
[DataContract] | ||
public record AnypointMQChannelBindingDefinition | ||
: AnypointMQBindingDefinition, IChannelBindingDefinition | ||
{ | ||
|
||
/// <summary> | ||
/// Gets/sets the destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. | ||
/// </summary> | ||
[DataMember(Order = 1, Name = "destination"), JsonPropertyOrder(1), JsonPropertyName("destination"), YamlMember(Order = 1, Alias = "destination")] | ||
public virtual string? Destination { get; set; } | ||
|
||
/// <summary> | ||
/// Gets/sets the type of destination, which MUST be either exchange or queue or fifo-queue. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel. | ||
/// </summary> | ||
[DataMember(Order = 2, Name = "destinationType"), JsonPropertyOrder(2), JsonPropertyName("destinationType"), YamlMember(Order = 2, Alias = "destinationType")] | ||
public virtual AnypointMQDestinationType DestinationType { get; set; } = AnypointMQDestinationType.Queue; | ||
|
||
/// <summary> | ||
/// Gets/sets the version of this binding. | ||
/// </summary> | ||
[DataMember(Order = 3, Name = "bindingVersion"), JsonPropertyOrder(3), JsonPropertyName("bindingVersion"), YamlMember(Order = 3, Alias = "bindingVersion")] | ||
public virtual string BindingVersion { get; set; } = "latest"; | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
src/Neuroglia.AsyncApi.Core/v2/Bindings/AnypointMQ/AnypointMQMessageBindingDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using Json.Schema; | ||
|
||
namespace Neuroglia.AsyncApi.v2.Bindings.AnypointMQ; | ||
|
||
/// <summary> | ||
/// Represents the object used to configure an Anypoint MQ message binding | ||
/// </summary> | ||
[DataContract] | ||
public record AnypointMQMessageBindingDefinition | ||
: AnypointMQBindingDefinition, IMessageBindingDefinition | ||
{ | ||
|
||
/// <summary> | ||
/// Gets/sets a schema object containing the definitions for Anypoint MQ-specific headers (so-called protocol headers). This schema MUST be of type object and have a properties key. Examples of Anypoint MQ protocol headers are messageId and messageGroupId | ||
/// </summary> | ||
[DataMember(Order = 1, Name = "headers"), JsonPropertyOrder(1), JsonPropertyName("headers"), YamlMember(Order = 1, Alias = "headers")] | ||
public virtual JsonSchema? Headers { get; set; } | ||
|
||
/// <summary> | ||
/// Gets/sets the version of this binding. | ||
/// </summary> | ||
[DataMember(Order = 2, Name = "bindingVersion"), JsonPropertyOrder(2), JsonPropertyName("bindingVersion"), YamlMember(Order = 2, Alias = "bindingVersion")] | ||
public virtual string BindingVersion { get; set; } = "latest"; | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/Neuroglia.AsyncApi.Core/v2/Bindings/AnypointMQ/AnypointMQOperationBindingDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Neuroglia.AsyncApi.v2.Bindings.AnypointMQ; | ||
|
||
/// <summary> | ||
/// Represents the object used to configure an Anypoint MQ operation binding | ||
/// </summary> | ||
[DataContract] | ||
public record AnypointMQOperationBindingDefinition | ||
: AnypointMQBindingDefinition, IOperationBindingDefinition | ||
{ | ||
|
||
|
||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/Neuroglia.AsyncApi.Core/v2/Bindings/AnypointMQ/AnypointMQServerBindingDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright © 2021-Present Neuroglia SRL. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"), | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Neuroglia.AsyncApi.v2.Bindings.AnypointMQ; | ||
|
||
/// <summary> | ||
/// Represents the object used to configure an Anypoint MQ server binding | ||
/// </summary> | ||
[DataContract] | ||
public record AnypointMQServerBindingDefinition | ||
: AnypointMQBindingDefinition, IServerBindingDefinition | ||
{ | ||
|
||
|
||
|
||
} |
Oops, something went wrong.