[#45] api-go: Add PutSingle request wrappers
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
b17995a238
commit
2cb57a8835
6 changed files with 157 additions and 0 deletions
|
@ -610,3 +610,25 @@ func GenerateLock(empty bool) *object.Lock {
|
|||
|
||||
return m
|
||||
}
|
||||
|
||||
func GeneratePutSingleRequest(empty bool) *object.PutSingleRequest {
|
||||
m := new(object.PutSingleRequest)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GeneratePutSingleRequestBody(false))
|
||||
}
|
||||
|
||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GeneratePutSingleRequestBody(empty bool) *object.PutSingleRequestBody {
|
||||
b := new(object.PutSingleRequestBody)
|
||||
if !empty {
|
||||
b.SetObject(GenerateObject(empty))
|
||||
b.SetCopiesNumber([]uint32{12345})
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue