MCPcopy Create free account
hub / github.com/auth0/auth0-cli / openLogStreamsCmd

Function openLogStreamsCmd

internal/cli/log_streams.go:246–274  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

244}
245
246func openLogStreamsCmd(cli *cli) *cobra.Command {
247 var inputs struct {
248 ID string
249 }
250
251 cmd := &cobra.Command{
252 Use: "open",
253 Args: cobra.MaximumNArgs(1),
254 Short: "Open the settings page of a log stream",
255 Long: "Open a log stream's settings page in the Auth0 Dashboard.",
256 Example: ` auth0 logs streams open
257 auth0 logs streams open <log-stream-id>`,
258 RunE: func(cmd *cobra.Command, args []string) error {
259 if len(args) == 0 {
260 if err := logStreamID.Pick(cmd, &inputs.ID, cli.allLogStreamsPickerOptions); err != nil {
261 return err
262 }
263 } else {
264 inputs.ID = args[0]
265 }
266
267 openManageURL(cli, cli.Config.DefaultTenant, formatLogStreamSettingsPath(inputs.ID))
268
269 return nil
270 },
271 }
272
273 return cmd
274}
275
276func formatLogStreamSettingsPath(id string) string {
277 if len(id) == 0 {

Callers 1

logStreamsCmdFunction · 0.85

Calls 3

openManageURLFunction · 0.85
PickMethod · 0.45

Tested by

no test coverage detected