Documentation ¶
Index ¶
- type ChunkWriter
- type HeadPrm
- func (p *HeadPrm) SetChunkWriter(w ChunkWriter)
- func (p *HeadPrm) SetCommonParameters(common *util.CommonPrm)
- func (p *HeadPrm) SetHeaderWriter(w HeaderWriter)
- func (p *HeadPrm) SetRequestForwarder(f RequestForwarder)
- func (p *HeadPrm) WithAddress(addr oid.Address)
- func (p *HeadPrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
- func (p *HeadPrm) WithRawFlag(raw bool)
- type HeaderWriter
- type ObjectWriter
- type Option
- type Prm
- func (p *Prm) SetChunkWriter(w ChunkWriter)
- func (p *Prm) SetCommonParameters(common *util.CommonPrm)
- func (p *Prm) SetHeaderWriter(w HeaderWriter)
- func (p *Prm) SetObjectWriter(w ObjectWriter)
- func (p *Prm) SetRequestForwarder(f RequestForwarder)
- func (p *Prm) WithAddress(addr oid.Address)
- func (p *Prm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
- func (p *Prm) WithRawFlag(raw bool)
- type RangeHashPrm
- func (p *RangeHashPrm) SetChunkWriter(w ChunkWriter)
- func (p *RangeHashPrm) SetCommonParameters(common *util.CommonPrm)
- func (p *RangeHashPrm) SetHashGenerator(v func() hash.Hash)
- func (p *RangeHashPrm) SetHeaderWriter(w HeaderWriter)
- func (p *RangeHashPrm) SetRangeList(rngs []objectSDK.Range)
- func (p *RangeHashPrm) SetRequestForwarder(f RequestForwarder)
- func (p *RangeHashPrm) SetSalt(salt []byte)
- func (p *RangeHashPrm) WithAddress(addr oid.Address)
- func (p *RangeHashPrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
- func (p *RangeHashPrm) WithRawFlag(raw bool)
- type RangeHashRes
- type RangePrm
- func (p *RangePrm) SetChunkWriter(w ChunkWriter)
- func (p *RangePrm) SetCommonParameters(common *util.CommonPrm)
- func (p *RangePrm) SetHeaderWriter(w HeaderWriter)
- func (p *RangePrm) SetRange(rng *objectSDK.Range)
- func (p *RangePrm) SetRequestForwarder(f RequestForwarder)
- func (p RangePrm) Validate() error
- func (p *RangePrm) WithAddress(addr oid.Address)
- func (p *RangePrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
- func (p *RangePrm) WithRawFlag(raw bool)
- type RemoteRequestParams
- type RequestForwarder
- type RequestParameters
- func (p *RequestParameters) SetChunkWriter(w ChunkWriter)
- func (p *RequestParameters) SetCommonParameters(common *util.CommonPrm)
- func (p *RequestParameters) SetHeaderWriter(w HeaderWriter)
- func (p *RequestParameters) SetRequestForwarder(f RequestForwarder)
- func (p *RequestParameters) WithAddress(addr oid.Address)
- func (p *RequestParameters) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
- func (p *RequestParameters) WithRawFlag(raw bool)
- type Service
- type SimpleObjectWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkWriter ¶
ChunkWriter is an interface of target component to write payload chunk.
type HeadPrm ¶
type HeadPrm struct {
// contains filtered or unexported fields
}
HeadPrm groups parameters of Head service call.
func (*HeadPrm) SetChunkWriter ¶ added in v0.37.0
func (p *HeadPrm) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*HeadPrm) SetCommonParameters ¶
SetCommonParameters sets common parameters of the operation.
func (*HeadPrm) SetHeaderWriter ¶
func (p *HeadPrm) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*HeadPrm) SetRequestForwarder ¶
func (p *HeadPrm) SetRequestForwarder(f RequestForwarder)
func (*HeadPrm) WithAddress ¶
WithAddress sets object address to be read.
func (*HeadPrm) WithCachedSignerKey ¶
func (p *HeadPrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
WithCachedSignerKey sets optional key for all further requests.
func (*HeadPrm) WithRawFlag ¶
func (p *HeadPrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type HeaderWriter ¶
HeaderWriter is an interface of target component to write object header.
type ObjectWriter ¶
type ObjectWriter interface { HeaderWriter ChunkWriter }
ObjectWriter is an interface of target component to write object.
type Option ¶
type Option func(*Service)
Option is a Service's constructor option.
func WithLogger ¶
WithLogger returns option to specify Get service's logger.
type Prm ¶
type Prm struct {
// contains filtered or unexported fields
}
Prm groups parameters of Get service call.
func (*Prm) SetChunkWriter ¶ added in v0.37.0
func (p *Prm) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*Prm) SetCommonParameters ¶
SetCommonParameters sets common parameters of the operation.
func (*Prm) SetHeaderWriter ¶ added in v0.37.0
func (p *Prm) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*Prm) SetObjectWriter ¶
func (p *Prm) SetObjectWriter(w ObjectWriter)
SetObjectWriter sets target component to write the object.
func (*Prm) SetRequestForwarder ¶
func (p *Prm) SetRequestForwarder(f RequestForwarder)
func (*Prm) WithAddress ¶
WithAddress sets object address to be read.
func (*Prm) WithCachedSignerKey ¶
func (p *Prm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
WithCachedSignerKey sets optional key for all further requests.
type RangeHashPrm ¶
type RangeHashPrm struct {
// contains filtered or unexported fields
}
RangeHashPrm groups parameters of GetRange service call.
func (*RangeHashPrm) SetChunkWriter ¶ added in v0.37.0
func (p *RangeHashPrm) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*RangeHashPrm) SetCommonParameters ¶
SetCommonParameters sets common parameters of the operation.
func (*RangeHashPrm) SetHashGenerator ¶
func (p *RangeHashPrm) SetHashGenerator(v func() hash.Hash)
SetHashGenerator sets constructor of hashing algorithm.
func (*RangeHashPrm) SetHeaderWriter ¶ added in v0.37.0
func (p *RangeHashPrm) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*RangeHashPrm) SetRangeList ¶
func (p *RangeHashPrm) SetRangeList(rngs []objectSDK.Range)
SetRangeList sets a list of object payload ranges.
func (*RangeHashPrm) SetRequestForwarder ¶
func (p *RangeHashPrm) SetRequestForwarder(f RequestForwarder)
func (*RangeHashPrm) SetSalt ¶
func (p *RangeHashPrm) SetSalt(salt []byte)
SetSalt sets binary salt to XOR object's payload ranges before hash calculation.
func (*RangeHashPrm) WithAddress ¶
WithAddress sets object address to be read.
func (*RangeHashPrm) WithCachedSignerKey ¶
func (p *RangeHashPrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
WithCachedSignerKey sets optional key for all further requests.
func (*RangeHashPrm) WithRawFlag ¶
func (p *RangeHashPrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type RangeHashRes ¶
type RangeHashRes struct {
// contains filtered or unexported fields
}
func (*RangeHashRes) Hashes ¶
func (r *RangeHashRes) Hashes() [][]byte
type RangePrm ¶
type RangePrm struct {
// contains filtered or unexported fields
}
RangePrm groups parameters of GetRange service call.
func (*RangePrm) SetChunkWriter ¶
func (p *RangePrm) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*RangePrm) SetCommonParameters ¶
SetCommonParameters sets common parameters of the operation.
func (*RangePrm) SetHeaderWriter ¶ added in v0.37.0
func (p *RangePrm) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*RangePrm) SetRequestForwarder ¶
func (p *RangePrm) SetRequestForwarder(f RequestForwarder)
func (RangePrm) Validate ¶
Validate pre-validates `OBJECTRANGE` request's parameters content without access to the requested object's payload.
func (*RangePrm) WithAddress ¶
WithAddress sets object address to be read.
func (*RangePrm) WithCachedSignerKey ¶
func (p *RangePrm) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
WithCachedSignerKey sets optional key for all further requests.
func (*RangePrm) WithRawFlag ¶
func (p *RangePrm) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type RemoteRequestParams ¶ added in v0.37.0
type RequestForwarder ¶
type RequestForwarder func(context.Context, coreclient.NodeInfo, coreclient.MultiAddressClient) (*objectSDK.Object, error)
type RequestParameters ¶ added in v0.37.0
type RequestParameters struct {
// contains filtered or unexported fields
}
func (*RequestParameters) SetChunkWriter ¶ added in v0.37.0
func (p *RequestParameters) SetChunkWriter(w ChunkWriter)
SetChunkWriter sets target component to write the object payload range.
func (*RequestParameters) SetCommonParameters ¶ added in v0.37.0
SetCommonParameters sets common parameters of the operation.
func (*RequestParameters) SetHeaderWriter ¶ added in v0.37.0
func (p *RequestParameters) SetHeaderWriter(w HeaderWriter)
SetHeaderWriter sets target component to write the object header.
func (*RequestParameters) SetRequestForwarder ¶ added in v0.37.0
func (p *RequestParameters) SetRequestForwarder(f RequestForwarder)
func (*RequestParameters) WithAddress ¶ added in v0.37.0
WithAddress sets object address to be read.
func (*RequestParameters) WithCachedSignerKey ¶ added in v0.37.0
func (p *RequestParameters) WithCachedSignerKey(signerKey *ecdsa.PrivateKey)
WithCachedSignerKey sets optional key for all further requests.
func (*RequestParameters) WithRawFlag ¶ added in v0.37.0
func (p *RequestParameters) WithRawFlag(raw bool)
WithRawFlag sets flag of raw reading.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service utility serving requests of Object.Get service.
func New ¶
func New( ks keyStorage, es epochSource, e localStorageEngine, tg traverserGenerator, cc clientConstructor, cs container.Source, opts ...Option, ) *Service
New creates, initializes and returns utility serving Object.Get service requests.
func (*Service) Get ¶
Get serves a request to get an object by address, and returns Streamer instance.
func (*Service) GetRange ¶
GetRange serves a request to get an object by address, and returns Streamer instance.
func (*Service) GetRangeHash ¶
func (s *Service) GetRangeHash(ctx context.Context, prm RangeHashPrm) (*RangeHashRes, error)
type SimpleObjectWriter ¶
type SimpleObjectWriter struct {
// contains filtered or unexported fields
}
func NewSimpleObjectWriter ¶
func NewSimpleObjectWriter() *SimpleObjectWriter
func (*SimpleObjectWriter) Object ¶
func (s *SimpleObjectWriter) Object() *objectSDK.Object
func (*SimpleObjectWriter) WriteChunk ¶
func (s *SimpleObjectWriter) WriteChunk(_ context.Context, p []byte) error