Ejemplo n.º 1
0
func main() {
	opts := auth.Options{Logger: gologger.Get()}
	application := &subcommands.DefaultApplication{
		Name:  "auth",
		Title: "Chrome Infra Authentication tool",
		Commands: []*subcommands.Command{
			subcommands.CmdHelp,
			authcli.SubcommandInfo(opts, "info"),
			authcli.SubcommandLogin(opts, "login"),
			authcli.SubcommandLogout(opts, "logout"),
		},
	}
	os.Exit(subcommands.Run(application, nil))
}
Ejemplo n.º 2
0
	if fail {
		return 1
	}
	return 0
}

////////////////////////////////////////////////////////////////////////////////

var application = &subcommands.DefaultApplication{
	Name:  "cloudtail",
	Title: "Tail logs and send them to Cloud Logging",
	Commands: []*subcommands.Command{
		subcommands.CmdHelp,
		cipd.SubcommandVersion,

		// Main commands.
		cmdSend,
		cmdPipe,
		cmdTail,

		// Authentication related commands.
		authcli.SubcommandInfo(authOptions, "whoami"),
		authcli.SubcommandLogin(authOptions, "login"),
		authcli.SubcommandLogout(authOptions, "logout"),
	},
}

func main() {
	os.Exit(subcommands.Run(application, nil))
}
Ejemplo n.º 3
0
}

////////////////////////////////////////////////////////////////////////////////
// Main.

var application = &subcommands.DefaultApplication{
	Name:  "cipd",
	Title: "Chrome infra package deployer",
	Commands: []*subcommands.Command{
		subcommands.CmdHelp,
		cipd_lib.SubcommandVersion,

		// Authentication related commands.
		authcli.SubcommandInfo(auth.Options{Logger: log}, "auth-info"),
		authcli.SubcommandLogin(auth.Options{Logger: log}, "auth-login"),
		authcli.SubcommandLogout(auth.Options{Logger: log}, "auth-logout"),

		// High level commands.
		cmdListPackages,
		cmdCreate,
		cmdEnsure,
		cmdResolve,
		cmdSetRef,

		// ACLs.
		cmdListACL,
		cmdEditACL,

		// Low level pkg-* commands.
		cmdBuild,
		cmdDeploy,