working commit
This commit is contained in:
@@ -23,7 +23,6 @@ type BlobExistsResult struct {
|
||||
func (oper *Operator) BlobExists(ctx context.Context, params *BlobExistsParams) (*BlobExistsResult, int, error) {
|
||||
var err error
|
||||
res := &BlobExistsResult{}
|
||||
//oper.logg.Debugf("Calling BlobExists")
|
||||
|
||||
if params.Digest == "" {
|
||||
err = fmt.Errorf("Empty reference")
|
||||
@@ -80,8 +79,6 @@ func (oper *Operator) PostUpload(ctx context.Context, params *PostUploadParams)
|
||||
var err error
|
||||
res := &PostUploadResult{}
|
||||
|
||||
//oper.logg.Debugf("Calling PostUpload")
|
||||
|
||||
if params.Digest == "" {
|
||||
uuid := auxuuid.NewUUID()
|
||||
location := fmt.Sprintf("/v2/%s/blobs/uploads/%s", params.Name, uuid)
|
||||
@@ -118,8 +115,6 @@ func (oper *Operator) PatchUpload(ctx context.Context, params *PatchUploadParams
|
||||
var err error
|
||||
res := &PatchUploadResult{}
|
||||
|
||||
//oper.logg.Debugf("Calling PatchUpload")
|
||||
|
||||
if params.Reference == "" {
|
||||
err = fmt.Errorf("Empty reference")
|
||||
return res, http.StatusBadRequest, err
|
||||
@@ -185,8 +180,6 @@ func (oper *Operator) PutUpload(ctx context.Context, params *PutUploadParams) (*
|
||||
var err error
|
||||
res := &PutUploadResult{}
|
||||
|
||||
//oper.logg.Debugf("Calling PutUpload")
|
||||
|
||||
if params.Reference == "" {
|
||||
err = fmt.Errorf("Empty reference")
|
||||
return res, http.StatusBadRequest, err
|
||||
@@ -244,8 +237,6 @@ func (oper *Operator) GetBlob(ctx context.Context, params *GetBlobParams) (*GetB
|
||||
var err error
|
||||
res := &GetBlobResult{}
|
||||
|
||||
//oper.logg.Debugf("Calling GetBlob %s:%s", params.Name, params.Digest)
|
||||
|
||||
if params.Name == "" {
|
||||
err = fmt.Errorf("Empty name")
|
||||
return res, http.StatusBadRequest, err
|
||||
@@ -260,7 +251,6 @@ func (oper *Operator) GetBlob(ctx context.Context, params *GetBlobParams) (*GetB
|
||||
return res, http.StatusInternalServerError, err
|
||||
}
|
||||
if !blobExists {
|
||||
oper.logg.Debugf("Blob %s:%s not exists", params.Name, params.Digest)
|
||||
return res, http.StatusNotFound, err
|
||||
}
|
||||
|
||||
@@ -285,8 +275,6 @@ func (oper *Operator) DeleteBlob(ctx context.Context, params *DeleteBlobParams)
|
||||
var err error
|
||||
res := &DeleteBlobResult{}
|
||||
|
||||
//oper.logg.Debugf("Calling DeleteBlob")
|
||||
|
||||
if params.Digest == "" {
|
||||
err = fmt.Errorf("Empty digest")
|
||||
return res, http.StatusBadRequest, err
|
||||
|
||||
Reference in New Issue
Block a user