forked from TrueCloudLab/frostfs-api-go
7314038069
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>
22 lines
483 B
Go
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
|