*: use client.Object where appropriate

It's enough to do the job, we don't really need full client.Client interface
here.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2021-06-11 11:54:00 +03:00
parent b1e16c4b85
commit e177e1c9ae
2 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ func isValidValue(s string) bool {
return true
}
func (r *request) receiveFile(clnt client.Client,
func (r *request) receiveFile(clnt client.Object,
sessionToken *session.Token,
objectAddress *object.Address) {
var (
@ -194,7 +194,7 @@ func (d *Downloader) DownloadByAddress(c *fasthttp.RequestCtx) {
oid, _ = c.UserValue("oid").(string)
val = strings.Join([]string{cid, oid}, "/")
log = d.log.With(zap.String("cid", cid), zap.String("oid", oid))
conn client.Client
conn client.Object
tkn *session.Token
)
if err = address.Parse(val); err != nil {
@ -221,7 +221,7 @@ func (d *Downloader) DownloadByAttribute(c *fasthttp.RequestCtx) {
val, _ = c.UserValue("attr_val").(string)
log = d.log.With(zap.String("cid", scid), zap.String("attr_key", key), zap.String("attr_val", val))
ids []*object.ID
conn client.Client
conn client.Object
tkn *session.Token
)
cid := cid.New()

View file

@ -43,7 +43,7 @@ func (u *Uploader) Upload(c *fasthttp.RequestCtx) {
err error
file MultipartFile
obj *object.ID
conn client.Client
conn client.Object
tkn *session.Token
addr = object.NewAddress()
cid = cid.New()