frostfs-node/pkg/local_object_storage/blobstor/blobovniczatree/id.go
Dmitrii Stepanov 484eb59893 [#661] blobovniczatree: Use .db extension for db files
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-12-07 15:37:32 +03:00

17 lines
301 B
Go

package blobovniczatree
// ID represents Blobovnicza identifier.
type ID []byte
// NewIDFromBytes constructs an ID from a byte slice.
func NewIDFromBytes(v []byte) *ID {
return (*ID)(&v)
}
func (id ID) Path() string {
return string(id) + dbExtension
}
func (id ID) Bytes() []byte {
return id
}