forked from TrueCloudLab/frostfs-node
[#1223] lens/tui: Add metabase schema
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
b9043433a0
commit
1ae86f35a8
18 changed files with 1381 additions and 1 deletions
29
cmd/frostfs-lens/internal/schema/common/raw.go
Normal file
29
cmd/frostfs-lens/internal/schema/common/raw.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package common
|
||||
|
||||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/mr-tron/base58"
|
||||
)
|
||||
|
||||
type RawEntry struct {
|
||||
key, value []byte
|
||||
}
|
||||
|
||||
var RawParser Parser = rawParser
|
||||
|
||||
func rawParser(key, value []byte) (SchemaEntry, Parser, error) {
|
||||
return &RawEntry{key: key, value: value}, rawParser, nil
|
||||
}
|
||||
|
||||
func (r *RawEntry) String() string {
|
||||
return FormatSimple(base58.Encode(r.key), tcell.ColorRed)
|
||||
}
|
||||
|
||||
func (r *RawEntry) DetailedString() string {
|
||||
return spew.Sdump(r)
|
||||
}
|
||||
|
||||
func (r *RawEntry) Filter(string, any) FilterResult {
|
||||
return No
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue