forked from TrueCloudLab/frostfs-api-go
v2/container/grpc: Implement needed setters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
ddd3ba1bf2
commit
9f4d24b592
1 changed files with 10 additions and 2 deletions
|
@ -3,6 +3,7 @@ package container
|
||||||
import (
|
import (
|
||||||
netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
|
netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
|
||||||
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
||||||
|
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetKey sets key to the container attribute.
|
// SetKey sets key to the container attribute.
|
||||||
|
@ -47,9 +48,16 @@ func (m *Container) SetAttributes(v []*Container_Attribute) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetRules sets placement rules of the container.
|
// SetPlacementPolicy sets placement policy of the container.
|
||||||
func (m *Container) SetRules(v *netmap.PlacementPolicy) {
|
func (m *Container) SetPlacementPolicy(v *netmap.PlacementPolicy) {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
m.PlacementPolicy = v
|
m.PlacementPolicy = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetVersion sets version of the container.
|
||||||
|
func (m *Container) SetVersion(v *service.Version) {
|
||||||
|
if m != nil {
|
||||||
|
m.Version = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue