mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
refactor: remove unused core/api/models pkg (#14882)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
6f3607cebd
commit
7fb1bc538c
@ -35,7 +35,6 @@ import (
|
||||
"github.com/goharbor/harbor/src/common/job/test"
|
||||
"github.com/goharbor/harbor/src/common/models"
|
||||
testutils "github.com/goharbor/harbor/src/common/utils/test"
|
||||
apimodels "github.com/goharbor/harbor/src/core/api/models"
|
||||
_ "github.com/goharbor/harbor/src/core/auth/db"
|
||||
_ "github.com/goharbor/harbor/src/core/auth/ldap"
|
||||
"github.com/goharbor/harbor/src/lib/config"
|
||||
@ -740,13 +739,3 @@ func (a testapi) RegistryDelete(authInfo usrInfo, registryID int64) (int, error)
|
||||
|
||||
return code, nil
|
||||
}
|
||||
|
||||
func (a testapi) RegistryUpdate(authInfo usrInfo, registryID int64, req *apimodels.RegistryUpdateRequest) (int, error) {
|
||||
_sling := sling.New().Base(a.basePath).Put(fmt.Sprintf("/api/registries/%d", registryID)).BodyJSON(req)
|
||||
code, _, err := request(_sling, jsonAcceptHeader, authInfo)
|
||||
if err != nil || code != http.StatusOK {
|
||||
return code, fmt.Errorf("update registry error: %v", err)
|
||||
}
|
||||
|
||||
return code, nil
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
package models
|
||||
|
||||
// RegistryUpdateRequest is request used to update a registry.
|
||||
type RegistryUpdateRequest struct {
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
URL *string `json:"url"`
|
||||
CredentialType *string `json:"credential_type"`
|
||||
AccessKey *string `json:"access_key"`
|
||||
AccessSecret *string `json:"access_secret"`
|
||||
Insecure *bool `json:"insecure"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user