All checks were successful
DCO action / DCO (pull_request) Successful in 1m33s
Tests and linters / Run gofumpt (pull_request) Successful in 1m57s
Build / Build Components (1.23) (pull_request) Successful in 2m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m48s
Build / Build Components (1.22) (pull_request) Successful in 2m53s
Vulncheck / Vulncheck (pull_request) Successful in 2m34s
Tests and linters / Tests (1.22) (pull_request) Successful in 3m23s
Tests and linters / Tests (1.23) (pull_request) Successful in 3m26s
Tests and linters / Staticcheck (pull_request) Successful in 3m49s
Tests and linters / Lint (pull_request) Successful in 4m22s
Tests and linters / gopls check (pull_request) Successful in 4m16s
Tests and linters / Tests with -race (pull_request) Successful in 4m21s
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
33 lines
700 B
Go
33 lines
700 B
Go
package blobovnicza
|
|
|
|
import (
|
|
common "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-lens/internal"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-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, tuiCMD)
|
|
}
|
|
|
|
func openBlobovnicza(cmd *cobra.Command) *blobovnicza.Blobovnicza {
|
|
blz := blobovnicza.New(
|
|
blobovnicza.WithPath(vPath),
|
|
blobovnicza.WithReadOnly(true),
|
|
)
|
|
common.ExitOnErr(cmd, blz.Open())
|
|
|
|
return blz
|
|
}
|