forked from TrueCloudLab/frostfs-api-go
[#283] v2/session: Support ContainerSessionContext message
Define `ContainerSessionContext` structure, implement getters / setters, JSON and binary encoders, gRPC converters. Support new type of context in SessionTokenBody message. Add test message generator and cover methods with unit tests. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f2be7509d3
commit
9eb567a53a
6 changed files with 261 additions and 0 deletions
|
@ -119,3 +119,11 @@ func (r *ResponseVerificationHeader) UnmarshalJSON(data []byte) error {
|
|||
|
||||
return r.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (x *ContainerSessionContext) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(x)
|
||||
}
|
||||
|
||||
func (x *ContainerSessionContext) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(x, data, new(session.ContainerSessionContext))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue