frostfs-api-go/pkg/netmap/policy.go
Alex Vanin 3fb3cfd1a5 [#186] sdk/netmap: Use JSON placement policy converters in SDK
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-05 10:38:04 +03:00

21 lines
556 B
Go

package netmap
import (
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
)
// fixme: make types instead of aliases to v2 structures
type PlacementPolicy = netmap.PlacementPolicy
type Selector = netmap.Selector
type Filter = netmap.Filter
type Replica = netmap.Replica
type Clause = netmap.Clause
type Operation = netmap.Operation
func PlacementPolicyToJSON(p *PlacementPolicy) ([]byte, error) {
return netmap.PlacementPolicyToJSON(p)
}
func PlacementPolicyFromJSON(data []byte) (*PlacementPolicy, error) {
return netmap.PlacementPolicyFromJSON(data)
}