From 2f61d8d63cb7d2fd8b0c054dc4f5d2e58858b4be Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 24 Nov 2020 16:50:56 +0300 Subject: [PATCH] [#211] localstorage: Define blobovnicza ID Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/blobovnicza/id.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/local_object_storage/blobovnicza/id.go diff --git a/pkg/local_object_storage/blobovnicza/id.go b/pkg/local_object_storage/blobovnicza/id.go new file mode 100644 index 000000000..23e94fb82 --- /dev/null +++ b/pkg/local_object_storage/blobovnicza/id.go @@ -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() +}