Skip to content

Commit 679288c

Browse files
committed
Add execution and trigger commands to the workflow command
#96
1 parent 32aaae4 commit 679288c

51 files changed

Lines changed: 1026 additions & 34 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/FlowCtl/Commands/Config/Delete/DeleteConfigCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ internal class DeleteConfigCommand : BaseCommand<DeleteConfigCommandOptions, Del
66
{
77
public DeleteConfigCommand() : base("delete", Resources.Commands_DeleteConfig_Description)
88
{
9-
var identityOption = new Option<string>(new[] { "-i", "--id" },
9+
var configIdOption = new Option<string>(new[] { "-c", "--config-id" },
1010
description: Resources.Commands_DeleteConfig_IdentityOption) { IsRequired = true };
1111

1212
var addressOption = new Option<string?>(new[] { "-a", "--address" },
1313
description: Resources.Commands_FlowSynxAddress);
1414

15-
AddOption(identityOption);
15+
AddOption(configIdOption);
1616
AddOption(addressOption);
1717
}
1818
}

src/FlowCtl/Commands/Config/Delete/DeleteConfigCommandOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
internal class DeleteConfigCommandOptions : ICommandOptions
44
{
5-
public required string Id { get; set; }
5+
public required string ConfigId { get; set; }
66
public string? Address { get; set; } = string.Empty;
77
}

src/FlowCtl/Commands/Config/Delete/DeleteConfigCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private async Task Execute(DeleteConfigCommandOptions options, CancellationToken
4141
_flowSynxClient.SetConnection(connection);
4242
}
4343

44-
var request = new DeletePluginConfigRequest { Id = Guid.Parse(options.Id) };
44+
var request = new DeletePluginConfigRequest { Id = Guid.Parse(options.ConfigId) };
4545
var result = await _flowSynxClient.PluginConfig.DeleteAsync(request, cancellationToken);
4646

4747
if (result.StatusCode != 200)

src/FlowCtl/Commands/Config/Details/DetailsConfigCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ internal class DetailsConfigCommand : BaseCommand<DetailsConfigCommandOptions, D
77
{
88
public DetailsConfigCommand() : base("details", Resources.Commands_DetailsConfig_Description)
99
{
10-
var identityOption = new Option<string>(new[] { "-i", "--id" },
10+
var configIdOption = new Option<string>(new[] { "-c", "--config-id" },
1111
description: Resources.Commands_DetailsConfig_IdentityOption) { IsRequired = true };
1212

1313
var outputFormatOption = new Option<OutputType>(new[] { "-o", "--output" },
1414
getDefaultValue: () => OutputType.Json,
1515
description: Resources.Commands_Output_Format);
1616

17-
AddOption(identityOption);
17+
AddOption(configIdOption);
1818
AddOption(outputFormatOption);
1919
}
2020
}

src/FlowCtl/Commands/Config/Details/DetailsConfigCommandOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace FlowCtl.Commands.Config.Details;
44

55
internal class DetailsConfigCommandOptions : ICommandOptions
66
{
7-
public required string Id { get; set; }
7+
public required string ConfigId { get; set; }
88
public string? Address { get; set; } = string.Empty;
99
public OutputType Output { get; set; } = OutputType.Json;
1010
}

src/FlowCtl/Commands/Config/Details/DetailsConfigCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private async Task Execute(DetailsConfigCommandOptions options, CancellationToke
4141
_flowSynxClient.SetConnection(connection);
4242
}
4343

44-
var request = new PluginConfigDetailsRequest { Id = Guid.Parse(options.Id) };
44+
var request = new PluginConfigDetailsRequest { Id = Guid.Parse(options.ConfigId) };
4545
var result = await _flowSynxClient.PluginConfig.DetailsAsync(request, cancellationToken);
4646

4747
if (result.StatusCode != 200)

src/FlowCtl/Commands/Plugins/Details/PluginDetailsCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ internal class PluginDetailsCommand : BaseCommand<PluginDetailsCommandOptions, P
77
{
88
public PluginDetailsCommand() : base("details", Resources.Commands_Plugins_DetailsDescription)
99
{
10-
var identityOption = new Option<string>(new[] { "-i", "--id" },
10+
var pluginIdOption = new Option<string>(new[] { "-p", "--plugin-id" },
1111
description: Resources.Commands_Plugins_DetailsIdentityOption) { IsRequired = true };
1212

1313
var addressOption = new Option<string?>(new[] { "-a", "--address" },
@@ -17,7 +17,7 @@ public PluginDetailsCommand() : base("details", Resources.Commands_Plugins_Detai
1717
getDefaultValue: () => OutputType.Json,
1818
description: Resources.Commands_Output_Format);
1919

20-
AddOption(identityOption);
20+
AddOption(pluginIdOption);
2121
AddOption(addressOption);
2222
AddOption(outputFormatOption);
2323
}

src/FlowCtl/Commands/Plugins/Details/PluginDetailsCommandOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace FlowCtl.Commands.Plugins.Details;
44

55
internal class PluginDetailsCommandOptions : ICommandOptions
66
{
7-
public required string Id { get; set; }
7+
public required string PluginId { get; set; }
88
public string? Address { get; set; } = string.Empty;
99
public OutputType Output { get; set; } = OutputType.Json;
1010
}

src/FlowCtl/Commands/Plugins/Details/PluginDetailsCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private async Task Execute(PluginDetailsCommandOptions options, CancellationToke
4141
_flowSynxClient.SetConnection(connection);
4242
}
4343

44-
var request = new PluginDetailsRequest { Id = Guid.Parse(options.Id) };
44+
var request = new PluginDetailsRequest { Id = Guid.Parse(options.PluginId) };
4545
var result = await _flowSynxClient.Plugins.DetailsAsync(request, cancellationToken);
4646

4747
if (result.StatusCode != 200)

src/FlowCtl/Commands/Workflows/Delete/DeleteWorkflowCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ internal class DeleteWorkflowCommand : BaseCommand<DeleteWorkflowCommandOptions,
66
{
77
public DeleteWorkflowCommand() : base("delete", Resources.Commands_Workflows_DeleteDescription)
88
{
9-
var identityOption = new Option<string>(new[] { "-i", "--id" },
9+
var workflowIdOption = new Option<string>(new[] { "-w", "--workflow-id" },
1010
description: Resources.Commands_Workflows_DeleteIdentityOption) { IsRequired = true };
1111

1212
var addressOption = new Option<string?>(new[] { "-a", "--address" },
1313
description: Resources.Commands_FlowSynxAddress);
1414

15-
AddOption(identityOption);
15+
AddOption(workflowIdOption);
1616
AddOption(addressOption);
1717
}
1818
}

0 commit comments

Comments
 (0)