[#416] session: Support new format of object session context

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-09-16 19:09:25 +04:00 committed by LeL
parent 504e427c18
commit 5fc2644c68
8 changed files with 398 additions and 247 deletions

View file

@ -65,9 +65,12 @@ func (m *SessionToken_Body) SetContainerSessionContext(v *ContainerSessionContex
}
}
// SetAddress sets address of the object related to the session.
func (m *ObjectSessionContext) SetAddress(v *refs.Address) {
m.Address = v
// SetTarget specifies objects involved in the object session.
func (m *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs []*refs.ObjectID) {
m.Target = &ObjectSessionContext_Target{
Container: cnr,
Objects: objs,
}
}
// SetVerb sets type of request for which the token is issued.