MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / init

Function init

dgraph/cmd/decrypt/decrypt.go:30–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28var Decrypt x.SubCommand
29
30func 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}
47func run() {
48 keys, err := x.GetEncAclKeys(Decrypt.Conf)
49 x.Check(err)

Callers

nothing calls this directly

Calls 2

RegisterEncFlagFunction · 0.92
runFunction · 0.70

Tested by

no test coverage detected