forked from TrueCloudLab/frostfs-api-go
[#45] api-go: Add Object.PutSingle implementation
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
3add88d435
commit
b17995a238
4 changed files with 45 additions and 0 deletions
BIN
object/grpc/service.pb.go
generated
BIN
object/grpc/service.pb.go
generated
Binary file not shown.
BIN
object/grpc/service_grpc.pb.go
generated
BIN
object/grpc/service_grpc.pb.go
generated
Binary file not shown.
BIN
object/grpc/types.pb.go
generated
BIN
object/grpc/types.pb.go
generated
Binary file not shown.
|
@ -301,6 +301,17 @@ type GetRangeHashResponse struct {
|
||||||
session.ResponseHeaders
|
session.ResponseHeaders
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PutSingleRequestBody struct {
|
||||||
|
object *Object
|
||||||
|
copyNum []uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type PutSingleRequest struct {
|
||||||
|
body *PutSingleRequestBody
|
||||||
|
|
||||||
|
session.RequestHeaders
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeRegular Type = iota
|
TypeRegular Type = iota
|
||||||
TypeTombstone
|
TypeTombstone
|
||||||
|
@ -1405,3 +1416,37 @@ func (r *GetRangeHashResponse) GetBody() *GetRangeHashResponseBody {
|
||||||
func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
|
func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
|
||||||
r.body = v
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue