-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathgateway.go
More file actions
45 lines (35 loc) · 1.09 KB
/
gateway.go
File metadata and controls
45 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package cmd
import (
"github.com/spf13/cobra"
"github.com/hookdeck/hookdeck-cli/pkg/validators"
)
type gatewayCmd struct {
cmd *cobra.Command
}
func newGatewayCmd() *gatewayCmd {
g := &gatewayCmd{}
g.cmd = &cobra.Command{
Use: "gateway",
Args: validators.NoArgs,
Short: "Manage Hookdeck Event Gateway resources",
Long: `Commands for managing Event Gateway sources, destinations, connections,
transformations, events, requests, and metrics.
The gateway command group provides full access to all Event Gateway resources.`,
Example: ` # List connections
hookdeck gateway connection list
# Create a source
hookdeck gateway source create --name my-source --type WEBHOOK
# Query event metrics
hookdeck gateway metrics events --start 2026-01-01T00:00:00Z --end 2026-02-01T00:00:00Z`,
}
// Register resource subcommands (same factory as root backward-compat registration)
addConnectionCmdTo(g.cmd)
addSourceCmdTo(g.cmd)
addDestinationCmdTo(g.cmd)
addTransformationCmdTo(g.cmd)
addEventCmdTo(g.cmd)
addRequestCmdTo(g.cmd)
addAttemptCmdTo(g.cmd)
addMetricsCmdTo(g.cmd)
return g
}