forked from TrueCloudLab/frostfs-http-gw
Merge pull request #62 from roman-khimov/client-object
*: use client.Object where appropriate
This commit is contained in:
commit
9148cef0fc
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ func isValidValue(s string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *request) receiveFile(clnt client.Client,
|
func (r *request) receiveFile(clnt client.Object,
|
||||||
sessionToken *session.Token,
|
sessionToken *session.Token,
|
||||||
objectAddress *object.Address) {
|
objectAddress *object.Address) {
|
||||||
var (
|
var (
|
||||||
|
@ -194,7 +194,7 @@ func (d *Downloader) DownloadByAddress(c *fasthttp.RequestCtx) {
|
||||||
oid, _ = c.UserValue("oid").(string)
|
oid, _ = c.UserValue("oid").(string)
|
||||||
val = strings.Join([]string{cid, oid}, "/")
|
val = strings.Join([]string{cid, oid}, "/")
|
||||||
log = d.log.With(zap.String("cid", cid), zap.String("oid", oid))
|
log = d.log.With(zap.String("cid", cid), zap.String("oid", oid))
|
||||||
conn client.Client
|
conn client.Object
|
||||||
tkn *session.Token
|
tkn *session.Token
|
||||||
)
|
)
|
||||||
if err = address.Parse(val); err != nil {
|
if err = address.Parse(val); err != nil {
|
||||||
|
@ -221,7 +221,7 @@ func (d *Downloader) DownloadByAttribute(c *fasthttp.RequestCtx) {
|
||||||
val, _ = c.UserValue("attr_val").(string)
|
val, _ = c.UserValue("attr_val").(string)
|
||||||
log = d.log.With(zap.String("cid", scid), zap.String("attr_key", key), zap.String("attr_val", val))
|
log = d.log.With(zap.String("cid", scid), zap.String("attr_key", key), zap.String("attr_val", val))
|
||||||
ids []*object.ID
|
ids []*object.ID
|
||||||
conn client.Client
|
conn client.Object
|
||||||
tkn *session.Token
|
tkn *session.Token
|
||||||
)
|
)
|
||||||
cid := cid.New()
|
cid := cid.New()
|
||||||
|
|
|
@ -43,7 +43,7 @@ func (u *Uploader) Upload(c *fasthttp.RequestCtx) {
|
||||||
err error
|
err error
|
||||||
file MultipartFile
|
file MultipartFile
|
||||||
obj *object.ID
|
obj *object.ID
|
||||||
conn client.Client
|
conn client.Object
|
||||||
tkn *session.Token
|
tkn *session.Token
|
||||||
addr = object.NewAddress()
|
addr = object.NewAddress()
|
||||||
cid = cid.New()
|
cid = cid.New()
|
||||||
|
|
Loading…
Reference in a new issue