[#211] localstorage: Define blobovnicza ID

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-24 16:50:56 +03:00 committed by Alex Vanin
parent 6813f40665
commit 2f61d8d63c

View 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()
}