[#294] deletesvc: Drop cast
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c83e7c875f
commit
24eb988897
2 changed files with 15 additions and 9 deletions
|
@ -72,9 +72,9 @@ func New(gs *getsvc.Service,
|
|||
opts ...Option) *Service {
|
||||
c := &cfg{
|
||||
log: &logger.Logger{Logger: zap.L()},
|
||||
header: (*headSvcWrapper)(gs),
|
||||
searcher: (*searchSvcWrapper)(ss),
|
||||
placer: (*putSvcWrapper)(ps),
|
||||
header: &headSvcWrapper{s: gs},
|
||||
searcher: &searchSvcWrapper{s: ss},
|
||||
placer: &putSvcWrapper{s: ps},
|
||||
netInfo: ni,
|
||||
keyStorage: ks,
|
||||
}
|
||||
|
|
|
@ -11,11 +11,17 @@ import (
|
|||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
type headSvcWrapper getsvc.Service
|
||||
type headSvcWrapper struct {
|
||||
s *getsvc.Service
|
||||
}
|
||||
|
||||
type searchSvcWrapper searchsvc.Service
|
||||
type searchSvcWrapper struct {
|
||||
s *searchsvc.Service
|
||||
}
|
||||
|
||||
type putSvcWrapper putsvc.Service
|
||||
type putSvcWrapper struct {
|
||||
s *putsvc.Service
|
||||
}
|
||||
|
||||
type simpleIDWriter struct {
|
||||
ids []oid.ID
|
||||
|
@ -30,7 +36,7 @@ func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oi
|
|||
p.WithRawFlag(true)
|
||||
p.WithAddress(addr)
|
||||
|
||||
err := (*getsvc.Service)(w).Head(ctx, p)
|
||||
err := w.s.Head(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -94,7 +100,7 @@ func (w *searchSvcWrapper) splitMembers(ctx context.Context, exec *execCtx) ([]o
|
|||
p.WithContainerID(exec.containerID())
|
||||
p.WithSearchFilters(fs)
|
||||
|
||||
err := (*searchsvc.Service)(w).Search(ctx, p)
|
||||
err := w.s.Search(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -109,7 +115,7 @@ func (s *simpleIDWriter) WriteIDs(ids []oid.ID) error {
|
|||
}
|
||||
|
||||
func (w *putSvcWrapper) put(ctx context.Context, exec *execCtx) (*oid.ID, error) {
|
||||
streamer, err := (*putsvc.Service)(w).Put()
|
||||
streamer, err := w.s.Put()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue