| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Package main implements a simple CLI tool to load and interact with Google | 5 // Package main implements a simple CLI tool to load and interact with Google |
| 6 // Storage archived data. | 6 // Storage archived data. |
| 7 package main | 7 package main |
| 8 | 8 |
| 9 import ( | 9 import ( |
| 10 "bytes" | 10 "bytes" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 }, | 79 }, |
| 80 | 80 |
| 81 Commands: []*subcommands.Command{ | 81 Commands: []*subcommands.Command{ |
| 82 subcommands.CmdHelp, | 82 subcommands.CmdHelp, |
| 83 | 83 |
| 84 &subcommandDumpIndex, | 84 &subcommandDumpIndex, |
| 85 &subcommandDumpStream, | 85 &subcommandDumpStream, |
| 86 &subcommandGet, | 86 &subcommandGet, |
| 87 &subcommandTail, | 87 &subcommandTail, |
| 88 | 88 |
| 89 » » » » authcli.SubcommandLogin(authOpts, "auth-login"), | 89 » » » » authcli.SubcommandLogin(authOpts, "auth-login",
false), |
| 90 » » » » authcli.SubcommandLogout(authOpts, "auth-logout"
), | 90 » » » » authcli.SubcommandLogout(authOpts, "auth-logout"
, false), |
| 91 » » » » authcli.SubcommandInfo(authOpts, "auth-info"), | 91 » » » » authcli.SubcommandInfo(authOpts, "auth-info", fa
lse), |
| 92 }, | 92 }, |
| 93 }, | 93 }, |
| 94 } | 94 } |
| 95 | 95 |
| 96 fs := flag.NewFlagSet("flags", flag.ExitOnError) | 96 fs := flag.NewFlagSet("flags", flag.ExitOnError) |
| 97 logConfig.AddFlags(fs) | 97 logConfig.AddFlags(fs) |
| 98 authFlags.Register(fs, authOpts) | 98 authFlags.Register(fs, authOpts) |
| 99 fs.Parse(args) | 99 fs.Parse(args) |
| 100 | 100 |
| 101 // Process authentication options. | 101 // Process authentication options. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 log.Fields{ | 454 log.Fields{ |
| 455 "index": le.StreamIndex, | 455 "index": le.StreamIndex, |
| 456 "size": len(e.D), | 456 "size": len(e.D), |
| 457 }.Debugf(c, "Dumping tail entry.") | 457 }.Debugf(c, "Dumping tail entry.") |
| 458 if err := unmarshalAndDump(c, os.Stdout, nil, le); err != nil { | 458 if err := unmarshalAndDump(c, os.Stdout, nil, le); err != nil { |
| 459 log.WithError(err).Errorf(c, "Failed to dump tail entry.") | 459 log.WithError(err).Errorf(c, "Failed to dump tail entry.") |
| 460 return 1 | 460 return 1 |
| 461 } | 461 } |
| 462 return 0 | 462 return 0 |
| 463 } | 463 } |
| OLD | NEW |