Some checks failed
DCO action / DCO (pull_request) Successful in 27s
Vulncheck / Vulncheck (pull_request) Successful in 59s
Tests and linters / Tests with -race (pull_request) Failing after 1m14s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m18s
Build / Build Components (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 2m19s
Tests and linters / gopls check (pull_request) Failing after 2m21s
Tests and linters / Tests (pull_request) Successful in 2m34s
Tests and linters / Staticcheck (pull_request) Successful in 2m35s
Change-Id: I9a60ab654078ce3d7c1c287b3ec17bbedc2c1a7e Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
34 lines
750 B
Go
34 lines
750 B
Go
package object
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
|
)
|
|
|
|
type ECInfo struct {
|
|
ParentID oid.ID
|
|
Index uint32
|
|
Total uint32
|
|
}
|
|
|
|
func (v *ECInfo) String() string {
|
|
if v == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("parent ID: %s, index: %d, total %d", v.ParentID, v.Index, v.Total)
|
|
}
|
|
|
|
// Info groups object address with its FrostFS
|
|
// object info.
|
|
type Info struct {
|
|
Address oid.Address
|
|
Type objectSDK.Type
|
|
IsLinkingObject bool
|
|
ECInfo *ECInfo
|
|
}
|
|
|
|
func (v Info) String() string {
|
|
return fmt.Sprintf("address: %s, type: %s, is linking: %t, EC header: %s", v.Address, v.Type, v.IsLinkingObject, v.ECInfo)
|
|
}
|