frostfs-api-go/pkg/container/id.go
Leonard Lyubich 7314038069 [#283] pkg/container: Define ID in a separate package
In order to prevent potential cross imports, container ID should be defined
in a separate package as a base type. A similar approach was used in the
NeoFS API design.

Create `pkg/container/id` package and replace container ID implementation to
it. Related API in `container` package is deprecated from now.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00

22 lines
483 B
Go

package container
import (
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
)
// ID represents v2-compatible container identifier.
//
// Deprecated: use cid.ID instead.
type ID = cid.ID
// NewIDFromV2 wraps v2 ContainerID message to ID.
//
// Deprecated: use cid.NewFromV2 instead.
var NewIDFromV2 = cid.NewFromV2
// NewID creates and initializes blank ID.
//
// Works similar to NewIDFromV2(new(ContainerID)).
//
// Deprecated: use cid.New instead.
var NewID = cid.New