73f8bb3e5f
Allow to extend blobstor with more storage sub-systems. Currently objects stored in the FSTree have empty byte slice descriptor and object from blobovnicza tree have the same id as earlier. Each such change in the identifier formation should be accompanied with metabase version increase. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
17 lines
285 B
Go
17 lines
285 B
Go
package blobovnicza
|
|
|
|
// 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) String() string {
|
|
return string(id)
|
|
}
|
|
|
|
func (id ID) Bytes() []byte {
|
|
return id
|
|
}
|