Documentation ¶
Overview ¶
Package cmd provides the command line interface for the notary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotaryInfoCommand = &cli.Command{ Name: "info", Description: "learn how to use notary cli", Action: func(c *cli.Context) error { fmt.Println(string(markdown.Render(help, termsize.Width(), 6))) return nil }, }
NotaryInfoCommand gets info about using the notary agent.
View Source
var NotaryRunCommand = &cli.Command{ Name: "run", Description: "runs the notary service", Flags: []cli.Flag{configFlag}, Action: func(c *cli.Context) error { notaryConfig, err := config.DecodeNotaryConfig(core.ExpandOrReturnPath(c.String(configFlag.Name))) if err != nil { return fmt.Errorf("failed to decode config: %w", err) } g, _ := errgroup.WithContext(c.Context) notary, err := notary.NewNotary(c.Context, notaryConfig) if err != nil { return fmt.Errorf("failed to create notary: %w", err) } g.Go(func() error { err = notary.Start(c.Context) if err != nil { return fmt.Errorf("failed to run notary: %w", err) } return nil }) if err := g.Wait(); err != nil { return fmt.Errorf("failed to run notary: %w", err) } return nil }, }
NotaryRunCommand runs the notary.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.