()
| 28 | var Decrypt x.SubCommand |
| 29 | |
| 30 | func init() { |
| 31 | Decrypt.Cmd = &cobra.Command{ |
| 32 | Use: "decrypt", |
| 33 | Short: "Run the Dgraph decryption tool", |
| 34 | Long: "A tool to decrypt an export file created by an encrypted Dgraph cluster", |
| 35 | Run: func(cmd *cobra.Command, args []string) { |
| 36 | run() |
| 37 | }, |
| 38 | Annotations: map[string]string{"group": "tool"}, |
| 39 | } |
| 40 | Decrypt.EnvPrefix = "DGRAPH_TOOL_DECRYPT" |
| 41 | Decrypt.Cmd.SetHelpTemplate(x.NonRootTemplate) |
| 42 | flag := Decrypt.Cmd.Flags() |
| 43 | flag.StringP("file", "f", "", "Path to file to decrypt.") |
| 44 | flag.StringP("out", "o", "", "Path to the decrypted file.") |
| 45 | x.RegisterEncFlag(flag) |
| 46 | } |
| 47 | func run() { |
| 48 | keys, err := x.GetEncAclKeys(Decrypt.Conf) |
| 49 | x.Check(err) |
nothing calls this directly
no test coverage detected