forked from TrueCloudLab/frostfs-node
[#211] localstorage: Define blobovnicza ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6813f40665
commit
2f61d8d63c
1 changed files with 17 additions and 0 deletions
17
pkg/local_object_storage/blobovnicza/id.go
Normal file
17
pkg/local_object_storage/blobovnicza/id.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package blobovnicza
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// ID represents Blobovnicza identifier.
|
||||
type ID uuid.UUID
|
||||
|
||||
// NewIDFromUUID constructs ID from UUID instance.
|
||||
func NewIDFromUUID(uid uuid.UUID) *ID {
|
||||
return (*ID)(&uid)
|
||||
}
|
||||
|
||||
func (id ID) String() string {
|
||||
return (uuid.UUID)(id).String()
|
||||
}
|
Loading…
Reference in a new issue