Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = cli.Command{ Name: "dump", Usage: "dump all bucket and key/value.", ArgsUsage: "<boltdb file>", Flags: []cli.Flag{ cli.StringFlag{ Name: "schema", Value: "containerd", Usage: "boltdb schema: containerd,default. default is containerd.", }, }, Action: func(context *cli.Context) error { SrcPath := context.Args().Get(0) if SrcPath == "" { return errors.New("boltdb file need to be specified") } _, err := os.Stat(SrcPath) if os.IsNotExist(err) { return errors.New("boltdb file is not exist") } else if err != nil { return err } src, err := bolt.Open(SrcPath, 0444, nil) if err != nil { return err } defer src.Close() sc := context.String("schema") if ret := strings.Compare(sc, schema.Containerd); ret == 0 { err = containerdMetaPrintAll(src) if err != nil { return err } } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.