forked from TrueCloudLab/frostfs-node
Airat Arifullin
a4a1c3f18b
* Also, resolve dependencies and conflicts for object service by creating stub for `Patch` method. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
52 lines
1.8 KiB
Go
52 lines
1.8 KiB
Go
package object
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/util"
|
|
)
|
|
|
|
// GetObjectStream is an interface of FrostFS API v2 compatible object streamer.
|
|
type GetObjectStream interface {
|
|
util.ServerStream
|
|
Send(*object.GetResponse) error
|
|
}
|
|
|
|
// GetObjectRangeStream is an interface of FrostFS API v2 compatible payload range streamer.
|
|
type GetObjectRangeStream interface {
|
|
util.ServerStream
|
|
Send(*object.GetRangeResponse) error
|
|
}
|
|
|
|
// SearchStream is an interface of FrostFS API v2 compatible search streamer.
|
|
type SearchStream interface {
|
|
util.ServerStream
|
|
Send(*object.SearchResponse) error
|
|
}
|
|
|
|
// PutObjectStream is an interface of FrostFS API v2 compatible client's object streamer.
|
|
type PutObjectStream interface {
|
|
Send(context.Context, *object.PutRequest) error
|
|
CloseAndRecv(context.Context) (*object.PutResponse, error)
|
|
}
|
|
|
|
// PatchObjectstream is an interface of FrostFS API v2 compatible patch streamer.
|
|
type PatchObjectstream interface {
|
|
Send(context.Context, *object.PatchRequest) error
|
|
CloseAndRecv(context.Context) (*object.PatchResponse, error)
|
|
}
|
|
|
|
// ServiceServer is an interface of utility
|
|
// serving v2 Object service.
|
|
type ServiceServer interface {
|
|
Get(*object.GetRequest, GetObjectStream) error
|
|
Put() (PutObjectStream, error)
|
|
Patch() (PatchObjectstream, error)
|
|
Head(context.Context, *object.HeadRequest) (*object.HeadResponse, error)
|
|
Search(*object.SearchRequest, SearchStream) error
|
|
Delete(context.Context, *object.DeleteRequest) (*object.DeleteResponse, error)
|
|
GetRange(*object.GetRangeRequest, GetObjectRangeStream) error
|
|
GetRangeHash(context.Context, *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
|
|
PutSingle(context.Context, *object.PutSingleRequest) (*object.PutSingleResponse, error)
|
|
}
|