All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 30s
DCO action / DCO (pull_request) Successful in 43s
Vulncheck / Vulncheck (pull_request) Successful in 1m9s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m25s
Build / Build Components (pull_request) Successful in 1m45s
Tests and linters / Staticcheck (pull_request) Successful in 2m15s
Tests and linters / Tests (pull_request) Successful in 3m7s
Tests and linters / Lint (pull_request) Successful in 3m7s
Tests and linters / gopls check (pull_request) Successful in 3m23s
Tests and linters / Tests with -race (pull_request) Successful in 3m40s
Added `frostfs-cli object locate` subcommand. It lists info about shards storing an object. Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
54 lines
1.1 KiB
Go
54 lines
1.1 KiB
Go
package object
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Cmd represents the object command.
|
|
var Cmd = &cobra.Command{
|
|
Use: "object",
|
|
Short: "Operations with Objects",
|
|
Long: `Operations with Objects`,
|
|
PersistentPreRun: func(cmd *cobra.Command, _ []string) {
|
|
// bind exactly that cmd's flags to
|
|
// the viper before execution
|
|
commonflags.Bind(cmd)
|
|
commonflags.BindAPI(cmd)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
objectChildCommands := []*cobra.Command{
|
|
objectPutCmd,
|
|
objectDelCmd,
|
|
objectGetCmd,
|
|
objectSearchCmd,
|
|
objectHeadCmd,
|
|
objectHashCmd,
|
|
objectRangeCmd,
|
|
objectLockCmd,
|
|
objectNodesCmd,
|
|
objectPatchCmd,
|
|
objectLocateCmd,
|
|
}
|
|
|
|
Cmd.AddCommand(objectChildCommands...)
|
|
|
|
for _, objCommand := range objectChildCommands {
|
|
InitBearer(objCommand)
|
|
commonflags.InitAPI(objCommand)
|
|
}
|
|
|
|
initObjectPutCmd()
|
|
initObjectPatchCmd()
|
|
initObjectDeleteCmd()
|
|
initObjectGetCmd()
|
|
initObjectSearchCmd()
|
|
initObjectHeadCmd()
|
|
initObjectHashCmd()
|
|
initObjectRangeCmd()
|
|
initCommandObjectLock()
|
|
initObjectNodesCmd()
|
|
initObjectLocateCmd()
|
|
}
|