[#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:
Leonard Lyubich 2022-05-25 12:03:22 +03:00 committed by LeL
parent bef4618cd6
commit f0a5eb6dbc
15 changed files with 429 additions and 468 deletions

View file

@ -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 {