cmdroot

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.C{
	Name: "root",
	Help: "Manipulate filesystem root pointers.",

	Commands: []*command.C{
		{
			Name:  "list",
			Usage: "[name-glob ...]",
			Help: `List the root keys known in the store.

If name globs are provided, only names matching those globs are listed; otherwise
all known keys are listed.`,

			SetFlags: command.Flags(flax.MustBind, &listFlags),
			Run:      runList,
		},
		{
			Name:  "create",
			Usage: "<name>\n<name> <file-key>\n-ref <name> <root>/<path>",
			Help: `Create a root pointer.

If only a <name> is given, a new empty root pointer is created with that name.
If a <file-key> is specified, the new root points to that file (which must exist).`,

			SetFlags: command.Flags(flax.MustBind, &createFlags),
			Run:      command.Adapt(runCreate),
		},
		{
			Name:  "copy",
			Usage: "<source-name> <target-name>",
			Help:  "Duplicate a root pointer under a new name.",

			SetFlags: command.Flags(flax.MustBind, &copyFlags),
			Run:      runCopy,
		},
		{
			Name:  "rename",
			Usage: "<source-name> <target-name>",
			Help:  "Rename a root pointer (equivalent to copy + remove).",

			SetFlags: command.Flags(flax.MustBind, &copyFlags),
			Run:      runCopy,
		},
		{
			Name:  "delete",
			Usage: "<root-key> ...",
			Help:  "Delete the specified root pointers.",

			Run: runDelete,
		},
		{
			Name:  "set-desc",
			Usage: "<name> <description>...",
			Help:  "Edit the description of the given root pointer.",

			Run: runEditDesc,
		},
		{
			Name:  "set-file",
			Usage: "<name> <file-key>",
			Help: `Edit the file key of the given root.

If a <file-key> is specified, it must already exist in the store.`,

			Run: runEditFile,
		},
		{
			Name:  "index",
			Usage: "<root-key> ...",
			Help: `
Update each of the specified roots to include a blob index.

An index is a Bloom filter of the keys reachable from the root.  If a root
already has an index, it is not changed; use -f to force a new index to be
computed anyway.`,

			SetFlags: command.Flags(flax.MustBind, &indexFlags),
			Run:      runIndex,
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL