[#236] api: Create info.go for basic structs

Moved BucketInfo and ObjectInfo from layer and handler to api

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2021-08-28 00:33:50 +03:00 committed by Alex Vanin
parent 345dafb29d
commit 239742f413
17 changed files with 231 additions and 229 deletions

View file

@ -32,7 +32,7 @@ func path2BucketObject(path string) (bucket, prefix string) {
func (h *handler) CopyObjectHandler(w http.ResponseWriter, r *http.Request) {
var (
err error
info *layer.ObjectInfo
info *api.ObjectInfo
metadata map[string]string
reqInfo = api.GetReqInfo(r.Context())
@ -118,7 +118,7 @@ func (h *handler) CopyObjectHandler(w http.ResponseWriter, r *http.Request) {
h.log.Info("object is copied",
zap.String("bucket", info.Bucket),
zap.String("object", info.Name),
zap.Stringer("object_id", info.ID()))
zap.Stringer("object_id", info.ID))
}
func parseCopyObjectArgs(headers http.Header) (*copyObjectArgs, error) {