[#251] object/address: Refactor and document package functionality
Merge `address` package into `oid` one. Bring `session.Object` implementation into conformity with the NeoFS API protocol. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
bef4618cd6
commit
f0a5eb6dbc
15 changed files with 429 additions and 468 deletions
|
@ -57,7 +57,7 @@ func (x *Container) ReadFromV2(m session.Token) error {
|
|||
}
|
||||
|
||||
c, ok := b.GetContext().(*session.ContainerSessionContext)
|
||||
if !ok {
|
||||
if !ok || c == nil {
|
||||
return fmt.Errorf("invalid context %T", b.GetContext())
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,7 @@ func (x *Container) ReadFromV2(m session.Token) error {
|
|||
|
||||
x.body = *b
|
||||
|
||||
if c != nil {
|
||||
x.c = *c
|
||||
} else {
|
||||
x.c = session.ContainerSessionContext{}
|
||||
}
|
||||
x.c = *c
|
||||
|
||||
lt := b.GetLifetime()
|
||||
if lt != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue