forked from TrueCloudLab/frostfs-api-go
[#371] Support recent changes in NeoFS API protocol
Support: * new status codes (object, container, session); * object `Lock` message; * different signature schemes. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a4349f6692
commit
99370889d1
41 changed files with 1139 additions and 129 deletions
|
@ -80,3 +80,17 @@ func LocalizeCommonFail(c *Code) {
|
|||
func GlobalizeCommonFail(c *Code) {
|
||||
c.GlobalizeSection(sectionAfterSuccess(sectionCommon))
|
||||
}
|
||||
|
||||
// LocalizeIfInSection checks if passed global status.Code belongs to the section and:
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must not be nil.
|
||||
func LocalizeIfInSection(c *Code, sec uint32) bool {
|
||||
if IsInSection(*c, sec) {
|
||||
c.LocalizeSection(sec)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue