You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/events.go
+18-3
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ func init() {
78
78
// flags for forwarding functionality/changing payloads
79
79
triggerCmd.Flags().StringVarP(&forwardAddress, "forward-address", "F", "", "Forward address for mock event.")
80
80
triggerCmd.Flags().StringVarP(&transport, "transport", "T", "eventsub", fmt.Sprintf("Preferred transport method for event. Defaults to /EventSub.\nSupported values: %s", events.ValidTransports()))
81
-
triggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC.")
81
+
triggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
82
82
83
83
// per-topic flags
84
84
triggerCmd.Flags().StringVarP(&toUser, "to-user", "t", "", "User ID of the receiver of the event. For example, the user that receives a follow. In most contexts, this is the broadcaster.")
@@ -96,13 +96,13 @@ func init() {
96
96
// retrigger flags
97
97
retriggerCmd.Flags().StringVarP(&forwardAddress, "forward-address", "F", "", "Forward address for mock event.")
98
98
retriggerCmd.Flags().StringVarP(&eventID, "id", "i", "", "ID of the event to be refired.")
99
-
retriggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC.")
99
+
retriggerCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
100
100
retriggerCmd.MarkFlagRequired("id")
101
101
102
102
// verify-subscription flags
103
103
verifyCmd.Flags().StringVarP(&forwardAddress, "forward-address", "F", "", "Forward address for mock event.")
104
104
verifyCmd.Flags().StringVarP(&transport, "transport", "T", "eventsub", fmt.Sprintf("Preferred transport method for event. Defaults to EventSub.\nSupported values: %s", events.ValidTransports()))
105
-
verifyCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC.")
105
+
verifyCmd.Flags().StringVarP(&secret, "secret", "s", "", "Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.")
`--forward-address` | `-F` | Web server address for where to send mock events. | `-F https://localhost:8080` | N
63
-
`--transport` | `-T` | The method used to send events. Default is `eventsub`, but can send using `websub`. | `-T websub` | N
64
-
`--to-user` | `-t` | Denotes the receiver's TUID of the event, usually the broadcaster. | `-t 44635596` | N
65
-
`--from-user` | `-f` | Denotes the sender's TUID of the event, for example the user that follows another user or the subscriber to a broadcaster. | `-f 44635596` | N
66
-
`--gift-user` | `-g` | Used only for subcription-based events, denotes the gifting user ID | `-g 44635596` | N
67
-
`--secret` | `-s` | Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC. | `-s testsecret` | N
68
-
`--count` | `-c` | Count of events to fire. This can be used to simulate an influx of events. | `-c 100` | N
69
-
`--anonymous` | `-a` | If the event is anonymous. Only applies to `gift` and `cheer` events. | `-a` | N
70
-
`--status` | `-S` | Status of the event object, currently applies to channel points redemptions. | `-S fulfilled` | N
71
-
`--item-id` | `-i` | Manually set the ID of the event payload item (for example the reward ID in redemption events or game in stream events). | `-i 032e4a6c-4aef-11eb-a9f5-1f703d1f0b92` | N
72
-
`--item-name` | `-n` | Manually set the name of the event payload item (for example the reward ID in redemption events or game name in stream events). | `-n "Science & Technology"` | N
73
-
`--cost` | `-C` | Amount of bits or channel points redeemed/used in the event. | `-C 250` | N
74
-
`--description` | `-d` | Title the stream should be updated/started with. | `-d Awesome new title!` | N
75
-
`--game-id` | `-G` | Game ID for Drop or other relevant events. | `-G 1234` | N
60
+
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--forward-address`|`-F`| Web server address for where to send mock events. |`-F https://localhost:8080`| N |
63
+
|`--transport`|`-T`| The method used to send events. Default is `eventsub`, but can send using `websub`. |`-T websub`| N |
64
+
|`--to-user`|`-t`| Denotes the receiver's TUID of the event, usually the broadcaster. |`-t 44635596`| N |
65
+
|`--from-user`|`-f`| Denotes the sender's TUID of the event, for example the user that follows another user or the subscriber to a broadcaster. |`-f 44635596`| N |
66
+
|`--gift-user`|`-g`| Used only for subcription-based events, denotes the gifting user ID |`-g 44635596`| N |
67
+
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length.|`-s testsecret`| N |
68
+
|`--count`|`-c`| Count of events to fire. This can be used to simulate an influx of events. |`-c 100`| N |
69
+
|`--anonymous`|`-a`| If the event is anonymous. Only applies to `gift` and `cheer` events. |`-a`| N |
70
+
|`--status`|`-S`| Status of the event object, currently applies to channel points redemptions. |`-S fulfilled`| N |
71
+
|`--item-id`|`-i`| Manually set the ID of the event payload item (for example the reward ID in redemption events or game in stream events). |`-i 032e4a6c-4aef-11eb-a9f5-1f703d1f0b92`| N |
72
+
|`--item-name`|`-n`| Manually set the name of the event payload item (for example the reward ID in redemption events or game name in stream events). |`-n "Science & Technology"`| N |
73
+
|`--cost`|`-C`| Amount of bits or channel points redeemed/used in the event. |`-C 250`| N |
74
+
|`--description`|`-d`| Title the stream should be updated/started with. |`-d Awesome new title!`| N |
75
+
|`--game-id`|`-G`| Game ID for Drop or other relevant events. |`-G 1234`| N |
76
76
77
77
78
78
@@ -106,11 +106,11 @@ None
106
106
107
107
**Flags**
108
108
109
-
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--forward-address`|`-F`| Web server address for where to send mock events. |`-F https://localhost:8080`| N |
112
+
|`--id`|`-i`| The ID of the event to refire. |`-i <id>`| Y |
113
+
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
114
114
115
115
**Examples**
116
116
@@ -163,11 +163,11 @@ Allows you to test if your webserver responds to subscription requests properly.
163
163
164
164
**Flags**
165
165
166
-
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--forward-address`|`-F`| Web server address for where to send mock subscription. |`-F https://localhost:8080`| Y |
169
+
|`--secret`|`-s`| Webhook secret. If defined, signs all forwarded events with the SHA256 HMAC and must be 10-100 characters in length. |`-s testsecret`| N |
170
+
|`--transport`|`-T`| The method used to send events. Default is eventsub, but can send using websub. |`-T websub`| N |
0 commit comments