frostfs-node/cmd/neofs-lens/internal/blobovnicza/root.go

34 lines
668 B
Go
Raw Normal View History

package blobovnicza
import (
common "github.com/nspcc-dev/neofs-node/cmd/neofs-lens/internal"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza"
"github.com/spf13/cobra"
)
var (
vAddress string
vPath string
vOut string
)
// Root contains `blobovnicza` command definition.
var Root = &cobra.Command{
Use: "blobovnicza",
Short: "Operations with a blobovnicza",
}
func init() {
Root.AddCommand(listCMD, inspectCMD)
}
func openBlobovnicza(cmd *cobra.Command) *blobovnicza.Blobovnicza {
blz := blobovnicza.New(
blobovnicza.WithPath(vPath),
blobovnicza.WithReadOnly(true),
)
common.ExitOnErr(cmd, blz.Open())
return blz
}