forked from TrueCloudLab/frostfs-api-go
[#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:
parent
7894749060
commit
f16a420bed
3 changed files with 118 additions and 20 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue