Skip to content

Commit 6e61abe

Browse files
fix(functions): add short and long descriptions to triggers methods (#3454)
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
1 parent 4b7e2a5 commit 6e61abe

8 files changed

+35
-35
lines changed

cmd/scw/testdata/test-all-usage-function-trigger-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Create function resources.
3+
Create a new trigger for a specified function.
44

55
USAGE:
66
scw function trigger create [arg=value ...]

cmd/scw/testdata/test-all-usage-function-trigger-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Delete function resources.
3+
Delete a trigger with a specified ID.
44

55
USAGE:
66
scw function trigger delete <trigger-id ...> [arg=value ...]

cmd/scw/testdata/test-all-usage-function-trigger-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Get function resources.
3+
Get a trigger with a specified ID.
44

55
USAGE:
66
scw function trigger get <trigger-id ...> [arg=value ...]

cmd/scw/testdata/test-all-usage-function-trigger-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List function resources.
3+
List all triggers belonging to a specified Organization or Project.
44

55
USAGE:
66
scw function trigger list [arg=value ...]

cmd/scw/testdata/test-all-usage-function-trigger-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Update function resources.
3+
Update a trigger with a specified ID.
44

55
USAGE:
66
scw function trigger update <trigger-id ...> [arg=value ...]

cmd/scw/testdata/test-all-usage-function-trigger-usage.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw function trigger <command>
77

88
AVAILABLE COMMANDS:
9-
create Create function resources
10-
delete Delete function resources
11-
get Get function resources
12-
list List function resources
13-
update Update function resources
9+
create Create a trigger
10+
delete Delete a trigger
11+
get Get a trigger
12+
list List all triggers
13+
update Update a trigger
1414

1515
FLAGS:
1616
-h, --help help for trigger

docs/commands/function.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Function as a Service API.
3838
- [Get a token](#get-a-token)
3939
- [List all tokens](#list-all-tokens)
4040
- [Trigger management commands](#trigger-management-commands)
41-
- [Create function resources](#create-function-resources)
42-
- [Delete function resources](#delete-function-resources)
43-
- [Get function resources](#get-function-resources)
44-
- [List function resources](#list-function-resources)
45-
- [Update function resources](#update-function-resources)
41+
- [Create a trigger](#create-a-trigger)
42+
- [Delete a trigger](#delete-a-trigger)
43+
- [Get a trigger](#get-a-trigger)
44+
- [List all triggers](#list-all-triggers)
45+
- [Update a trigger](#update-a-trigger)
4646

4747

4848
## Cron management commands
@@ -725,9 +725,9 @@ scw function token list [arg=value ...]
725725
Trigger management commands.
726726

727727

728-
### Create function resources
728+
### Create a trigger
729729

730-
Create function resources.
730+
Create a new trigger for a specified function.
731731

732732
**Usage:**
733733

@@ -756,9 +756,9 @@ scw function trigger create [arg=value ...]
756756

757757

758758

759-
### Delete function resources
759+
### Delete a trigger
760760

761-
Delete function resources.
761+
Delete a trigger with a specified ID.
762762

763763
**Usage:**
764764

@@ -776,9 +776,9 @@ scw function trigger delete <trigger-id ...> [arg=value ...]
776776

777777

778778

779-
### Get function resources
779+
### Get a trigger
780780

781-
Get function resources.
781+
Get a trigger with a specified ID.
782782

783783
**Usage:**
784784

@@ -796,9 +796,9 @@ scw function trigger get <trigger-id ...> [arg=value ...]
796796

797797

798798

799-
### List function resources
799+
### List all triggers
800800

801-
List function resources.
801+
List all triggers belonging to a specified Organization or Project.
802802

803803
**Usage:**
804804

@@ -819,9 +819,9 @@ scw function trigger list [arg=value ...]
819819

820820

821821

822-
### Update function resources
822+
### Update a trigger
823823

824-
Update function resources.
824+
Update a trigger with a specified ID.
825825

826826
**Usage:**
827827

internal/namespaces/function/v1beta1/function_cli.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,8 +1481,8 @@ func functionTokenDelete() *core.Command {
14811481

14821482
func functionTriggerCreate() *core.Command {
14831483
return &core.Command{
1484-
Short: `Create function resources`,
1485-
Long: `Create function resources.`,
1484+
Short: `Create a trigger`,
1485+
Long: `Create a new trigger for a specified function.`,
14861486
Namespace: "function",
14871487
Resource: "trigger",
14881488
Verb: "create",
@@ -1586,8 +1586,8 @@ func functionTriggerCreate() *core.Command {
15861586

15871587
func functionTriggerGet() *core.Command {
15881588
return &core.Command{
1589-
Short: `Get function resources`,
1590-
Long: `Get function resources.`,
1589+
Short: `Get a trigger`,
1590+
Long: `Get a trigger with a specified ID.`,
15911591
Namespace: "function",
15921592
Resource: "trigger",
15931593
Verb: "get",
@@ -1616,8 +1616,8 @@ func functionTriggerGet() *core.Command {
16161616

16171617
func functionTriggerList() *core.Command {
16181618
return &core.Command{
1619-
Short: `List function resources`,
1620-
Long: `List function resources.`,
1619+
Short: `List all triggers`,
1620+
Long: `List all triggers belonging to a specified Organization or Project.`,
16211621
Namespace: "function",
16221622
Resource: "trigger",
16231623
Verb: "list",
@@ -1671,8 +1671,8 @@ func functionTriggerList() *core.Command {
16711671

16721672
func functionTriggerUpdate() *core.Command {
16731673
return &core.Command{
1674-
Short: `Update function resources`,
1675-
Long: `Update function resources.`,
1674+
Short: `Update a trigger`,
1675+
Long: `Update a trigger with a specified ID.`,
16761676
Namespace: "function",
16771677
Resource: "trigger",
16781678
Verb: "update",
@@ -1715,8 +1715,8 @@ func functionTriggerUpdate() *core.Command {
17151715

17161716
func functionTriggerDelete() *core.Command {
17171717
return &core.Command{
1718-
Short: `Delete function resources`,
1719-
Long: `Delete function resources.`,
1718+
Short: `Delete a trigger`,
1719+
Long: `Delete a trigger with a specified ID.`,
17201720
Namespace: "function",
17211721
Resource: "trigger",
17221722
Verb: "delete",

0 commit comments

Comments
 (0)