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
|
@ -179,6 +179,19 @@ func GenerateObjectSessionContext(empty bool) *session.ObjectSessionContext {
|
|||
return m
|
||||
}
|
||||
|
||||
func GenerateContainerSessionContext(empty bool) *session.ContainerSessionContext {
|
||||
m := new(session.ContainerSessionContext)
|
||||
|
||||
if !empty {
|
||||
m.SetVerb(session.ContainerVerbDelete)
|
||||
m.SetWildcard(true)
|
||||
}
|
||||
|
||||
m.SetContainerID(refstest.GenerateContainerID(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateXHeader(empty bool) *session.XHeader {
|
||||
m := new(session.XHeader)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue