2020-12-02 23:45:25 +00:00
|
|
|
package object
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/object"
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
// GetObjectStream is an interface of NeoFS API v2 compatible object streamer.
|
|
|
|
type GetObjectStream interface {
|
|
|
|
util.ServerStream
|
|
|
|
Send(*object.GetResponse) error
|
|
|
|
}
|
|
|
|
|
2020-12-07 17:49:47 +00:00
|
|
|
// GetObjectRangeStream is an interface of NeoFS API v2 compatible payload range streamer.
|
|
|
|
type GetObjectRangeStream interface {
|
|
|
|
util.ServerStream
|
|
|
|
Send(*object.GetRangeResponse) error
|
|
|
|
}
|
|
|
|
|
2020-12-02 23:45:25 +00:00
|
|
|
// ServiceServer is an interface of utility
|
|
|
|
// serving v2 Object service.
|
|
|
|
type ServiceServer interface {
|
|
|
|
Get(*object.GetRequest, GetObjectStream) error
|
|
|
|
Put(context.Context) (object.PutObjectStreamer, error)
|
|
|
|
Head(context.Context, *object.HeadRequest) (*object.HeadResponse, error)
|
|
|
|
Search(context.Context, *object.SearchRequest) (object.SearchObjectStreamer, error)
|
|
|
|
Delete(context.Context, *object.DeleteRequest) (*object.DeleteResponse, error)
|
2020-12-07 17:49:47 +00:00
|
|
|
GetRange(*object.GetRangeRequest, GetObjectRangeStream) error
|
2020-12-02 23:45:25 +00:00
|
|
|
GetRangeHash(context.Context, *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
|
|
|
|
}
|