Skip to content

Commit 32294e4

Browse files
committed
Update FlowSynx.PluginCore to 1.2.5 and adapt new changes for that, add Icon and Readme file
#8
1 parent 1860db2 commit 32294e4

5 files changed

Lines changed: 161 additions & 24 deletions

File tree

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,64 @@
1-
# plugin-amazon-s3
1+
# Amazon S3 Plugin – FlowSynx Platform Integration
2+
3+
**Version:** 1.0.0
4+
**Author:** FlowSynx
5+
**License:** © FlowSynx. All rights reserved.
6+
**Repository:** [github.com/flowsynx/plugin-amazon-s3](https://github.com/flowsynx/plugin-amazon-s3)
7+
8+
## Overview
9+
10+
The **Amazon S3 Plugin** is a pre-packaged, plug-and-play integration component for the FlowSynx engine. It enables secure and configurable access to Amazon S3 cloud storage as part of FlowSynx’s no-code/low-code automation workflows.
11+
12+
This plugin can be installed automatically by the FlowSynx engine when selected within the platform. It is not intended for manual installation or developer use outside the FlowSynx environment.
13+
14+
---
15+
16+
## Purpose
17+
18+
This plugin allows FlowSynx users to interact with Amazon S3 for a variety of storage-related operations—without writing code. Once installed, the plugin becomes available as a storage connector within the platform's workflow builder.
19+
20+
---
21+
22+
## Supported Operations
23+
24+
The plugin supports the following operations, which can be selected and configured within the FlowSynx UI:
25+
26+
| Operation | Description |
27+
|----------|--------------------------------------|
28+
| `create` | Upload a new object to the S3 bucket. |
29+
| `delete` | Remove an object from the bucket. |
30+
| `exist` | Check if an object exists. |
31+
| `list` | List all objects in the bucket. |
32+
| `purge` | Remove all contents in the bucket. |
33+
| `read` | Read and return the contents of an object. |
34+
| `write` | Overwrite or write new data to an object. |
35+
36+
---
37+
38+
## Plugin Metadata
39+
40+
| Field | Value |
41+
|---------------|-------------------------------------------------|
42+
| Plugin ID | `b961131b-04cb-48df-9554-4252dc66c04c` |
43+
| Name | `Amazon.S3` |
44+
| Company | `FlowSynx` |
45+
| Namespace | `Connectors` |
46+
| Version | `1.0.0` |
47+
| Authors | `FlowSynx` |
48+
| Tags | `FlowSynx`, `Amazon`, `S3`, `Cloud` |
49+
| License | © FlowSynx. All rights reserved. |
50+
51+
---
52+
53+
## Notes
54+
55+
- This plugin is only supported on the FlowSynx platform.
56+
- It is installed automatically by the FlowSynx engine.
57+
- All operational logic is encapsulated and executed under FlowSynx control.
58+
- Credentials are configured through platform-managed settings.
59+
60+
---
61+
62+
## License
63+
64+
© FlowSynx. All rights reserved.

src/AmazonS3Plugin.cs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public PluginMetadata Metadata {
2525
Namespace = PluginNamespace.Connectors,
2626
Authors = new List<string> { "FlowSynx" },
2727
Copyright = "© FlowSynx. All rights reserved.",
28+
Icon = "flowsynx.png",
29+
ReadMe = "README.md",
30+
RepositoryUrl = "https://github.com/flowsynx/plugin-amazon-s3",
2831
Tags = new List<string>() { "FlowSynx", "Amazon", "S3", "Cloud" }
2932
};
3033
}
@@ -47,7 +50,7 @@ public Task Initialize(IPluginLogger logger)
4750
return Task.CompletedTask;
4851
}
4952

50-
public async Task<object?> ExecuteAsync(PluginParameters parameters, CancellationToken cancellationToken)
53+
public Task<object?> ExecuteAsync(PluginParameters parameters, CancellationToken cancellationToken)
5154
{
5255
if (ReflectionHelper.IsCalledViaReflection())
5356
throw new InvalidOperationException(Resources.ReflectionBasedAccessIsNotAllowed);
@@ -58,28 +61,24 @@ public Task Initialize(IPluginLogger logger)
5861
var operationParameter = parameters.ToObject<OperationParameter>();
5962
var operation = operationParameter.Operation;
6063

61-
switch (operation.ToLower())
64+
if (OperationMap.TryGetValue(operation, out var handler))
6265
{
63-
case "create":
64-
await _manager.Create(parameters, cancellationToken).ConfigureAwait(false);
65-
return null;
66-
case "delete":
67-
await _manager.Delete(parameters, cancellationToken).ConfigureAwait(false);
68-
return null;
69-
case "exist":
70-
return await _manager.Exist(parameters, cancellationToken).ConfigureAwait(false);
71-
case "list":
72-
return await _manager.List(parameters, cancellationToken).ConfigureAwait(false);
73-
case "purge":
74-
await _manager.Purge(parameters, cancellationToken).ConfigureAwait(false);
75-
return null;
76-
case "read":
77-
return await _manager.Read(parameters, cancellationToken).ConfigureAwait(false);
78-
case "write":
79-
await _manager.Write(parameters, cancellationToken).ConfigureAwait(false);
80-
return null;
81-
default:
82-
throw new NotSupportedException($"Amazon S3 plugin: Operation '{operation}' is not supported.");
66+
return handler(parameters, cancellationToken);
8367
}
68+
69+
throw new NotSupportedException($"Amazon S3 plugin: Operation '{operation}' is not supported.");
8470
}
71+
72+
private Dictionary<string, Func<PluginParameters, CancellationToken, Task<object?>>> OperationMap => new(StringComparer.OrdinalIgnoreCase)
73+
{
74+
["create"] = async (parameters, cancellationToken) => { await _manager.Create(parameters, cancellationToken); return null; },
75+
["delete"] = async (parameters, cancellationToken) => { await _manager.Delete(parameters, cancellationToken); return null; },
76+
["exist"] = async (parameters, cancellationToken) => await _manager.Exist(parameters, cancellationToken),
77+
["list"] = async (parameters, cancellationToken) => await _manager.List(parameters, cancellationToken),
78+
["purge"] = async (parameters, cancellationToken) => { await _manager.Purge(parameters, cancellationToken); return null; },
79+
["read"] = async (parameters, cancellationToken) => await _manager.Read(parameters, cancellationToken),
80+
["write"] = async (parameters, cancellationToken) => { await _manager.Write(parameters, cancellationToken); return null; },
81+
};
82+
83+
public IReadOnlyCollection<string> SupportedOperations => OperationMap.Keys;
8584
}

src/FlowSynx.Plugins.Amazon.S3.csproj

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<PackageReadmeFile>README.md</PackageReadmeFile>
8+
<PackageIcon>flowsynx.png</PackageIcon>
79
</PropertyGroup>
810

911
<PropertyGroup Condition="'$(Configuration)'=='Release'">
@@ -13,7 +15,7 @@
1315

1416
<ItemGroup>
1517
<PackageReference Include="AWSSDK.S3" Version="3.7.310.3" />
16-
<PackageReference Include="FlowSynx.PluginCore" Version="1.2.2" />
18+
<PackageReference Include="FlowSynx.PluginCore" Version="1.2.5" />
1719
</ItemGroup>
1820

1921
<ItemGroup>
@@ -34,5 +36,14 @@
3436
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
3537
</EmbeddedResource>
3638
</ItemGroup>
39+
40+
<ItemGroup>
41+
<None Update="flowsynx.png">
42+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
</None>
44+
<None Update="README.md">
45+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
46+
</None>
47+
</ItemGroup>
3748

3849
</Project>

src/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Amazon S3 Plugin – FlowSynx Platform Integration
2+
3+
**Version:** 1.0.0
4+
**Author:** FlowSynx
5+
**License:** © FlowSynx. All rights reserved.
6+
**Repository:** [github.com/flowsynx/plugin-amazon-s3](https://github.com/flowsynx/plugin-amazon-s3)
7+
8+
## Overview
9+
10+
The **Amazon S3 Plugin** is a pre-packaged, plug-and-play integration component for the FlowSynx engine. It enables secure and configurable access to Amazon S3 cloud storage as part of FlowSynx’s no-code/low-code automation workflows.
11+
12+
This plugin can be installed automatically by the FlowSynx engine when selected within the platform. It is not intended for manual installation or developer use outside the FlowSynx environment.
13+
14+
---
15+
16+
## Purpose
17+
18+
This plugin allows FlowSynx users to interact with Amazon S3 for a variety of storage-related operations—without writing code. Once installed, the plugin becomes available as a storage connector within the platform's workflow builder.
19+
20+
---
21+
22+
## Supported Operations
23+
24+
The plugin supports the following operations, which can be selected and configured within the FlowSynx UI:
25+
26+
| Operation | Description |
27+
|----------|--------------------------------------|
28+
| `create` | Upload a new object to the S3 bucket. |
29+
| `delete` | Remove an object from the bucket. |
30+
| `exist` | Check if an object exists. |
31+
| `list` | List all objects in the bucket. |
32+
| `purge` | Remove all contents in the bucket. |
33+
| `read` | Read and return the contents of an object. |
34+
| `write` | Overwrite or write new data to an object. |
35+
36+
---
37+
38+
## Plugin Metadata
39+
40+
| Field | Value |
41+
|---------------|-------------------------------------------------|
42+
| Plugin ID | `b961131b-04cb-48df-9554-4252dc66c04c` |
43+
| Name | `Amazon.S3` |
44+
| Company | `FlowSynx` |
45+
| Namespace | `Connectors` |
46+
| Version | `1.0.0` |
47+
| Authors | `FlowSynx` |
48+
| Tags | `FlowSynx`, `Amazon`, `S3`, `Cloud` |
49+
| License | © FlowSynx. All rights reserved. |
50+
51+
---
52+
53+
## Notes
54+
55+
- This plugin is only supported on the FlowSynx platform.
56+
- It is installed automatically by the FlowSynx engine.
57+
- All operational logic is encapsulated and executed under FlowSynx control.
58+
- Credentials are configured through platform-managed settings.
59+
60+
---
61+
62+
## License
63+
64+
© FlowSynx. All rights reserved.

src/flowsynx.png

20 KB
Loading

0 commit comments

Comments
 (0)