[#45] api-go: Add Object.PutSingle implementation

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-30 13:25:01 +03:00
parent 3add88d435
commit b17995a238
4 changed files with 45 additions and 0 deletions

Binary file not shown.

Binary file not shown.

BIN
object/grpc/types.pb.go generated

Binary file not shown.

View file

@ -301,6 +301,17 @@ type GetRangeHashResponse struct {
session.ResponseHeaders
}
type PutSingleRequestBody struct {
object *Object
copyNum []uint32
}
type PutSingleRequest struct {
body *PutSingleRequestBody
session.RequestHeaders
}
const (
TypeRegular Type = iota
TypeTombstone
@ -1405,3 +1416,37 @@ func (r *GetRangeHashResponse) GetBody() *GetRangeHashResponseBody {
func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
r.body = v
}
func (r *PutSingleRequest) GetBody() *PutSingleRequestBody {
if r != nil {
return r.body
}
return nil
}
func (r *PutSingleRequest) SetBody(v *PutSingleRequestBody) {
r.body = v
}
func (b *PutSingleRequestBody) GetObject() *Object {
if b == nil {
return nil
}
return b.object
}
func (b *PutSingleRequestBody) SetObject(o *Object) {
b.object = o
}
func (b *PutSingleRequestBody) GetCopiesNumber() []uint32 {
if b == nil {
return nil
}
return b.copyNum
}
func (b *PutSingleRequestBody) SetCopiesNumber(v []uint32) {
b.copyNum = v
}