[#193] pkg/container: Wrap container structure with SDK functions

All setters and getters should work with SDK types.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-11 16:49:54 +03:00 committed by Alex Vanin
parent 7894749060
commit f16a420bed
3 changed files with 118 additions and 20 deletions

View file

@ -20,7 +20,7 @@ type (
containerOptions struct {
acl uint32
policy *netmap.PlacementPolicy
attributes []attribute
attributes Attributes
owner *owner.ID
nonce uuid.UUID
}
@ -100,10 +100,10 @@ func WithPolicy(policy *netmap.PlacementPolicy) NewOption {
func WithAttribute(key, value string) NewOption {
return newFuncContainerOption(func(option *containerOptions) {
attr := attribute{
key: key,
value: value,
}
attr := NewAttribute()
attr.SetKey(key)
attr.SetValue(value)
option.attributes = append(option.attributes, attr)
})
}