Relocate/rename some packages (#11183)

Fixes #11016
1. src/pkg/q->src/internal/q
2. src/internal->src/lib (internal is a reserved package name of golang)
3. src/api->src/controller

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开) 2020-03-24 20:45:45 +08:00 committed by GitHub
parent 3f1e9d339a
commit 8984979bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
320 changed files with 592 additions and 591 deletions

View File

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/goharbor/harbor/src/api/event/metadata"
"github.com/goharbor/harbor/src/controller/event/metadata"
"io/ioutil"
"log"
"net/http"

View File

@ -25,7 +25,7 @@ import (
"reflect"
"github.com/goharbor/harbor/src/common/http/modifier"
"github.com/goharbor/harbor/src/internal"
"github.com/goharbor/harbor/src/lib"
)
const (
@ -264,7 +264,7 @@ func (c *Client) GetAndIteratePagination(endpoint string, v interface{}) error {
resources = reflect.AppendSlice(resources, reflect.Indirect(res))
endpoint = ""
links := internal.ParseLinks(resp.Header.Get("Link"))
links := lib.ParseLinks(resp.Header.Get("Link"))
for _, link := range links {
if link.Rel == "next" {
endpoint = url.Scheme + "://" + url.Host + link.URL

View File

@ -21,7 +21,7 @@ import (
"github.com/docker/distribution/manifest/manifestlist"
"github.com/docker/distribution/manifest/schema1"
"github.com/docker/distribution/manifest/schema2"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/registry"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

View File

@ -18,7 +18,7 @@ import (
"github.com/docker/distribution"
"github.com/docker/distribution/manifest/schema1"
"github.com/docker/distribution/manifest/schema2"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/pkg/artifact"
tart "github.com/goharbor/harbor/src/testing/pkg/artifact"
"github.com/goharbor/harbor/src/testing/pkg/registry"

View File

@ -19,11 +19,25 @@ import (
"context"
"errors"
"fmt"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/api/event/metadata"
"github.com/goharbor/harbor/src/api/tag"
"github.com/goharbor/harbor/src/internal"
"github.com/goharbor/harbor/src/internal/orm"
"strings"
"time"
// registry image resolvers
_ "github.com/goharbor/harbor/src/controller/artifact/processor/image"
// register chart resolver
_ "github.com/goharbor/harbor/src/controller/artifact/processor/chart"
// register CNAB resolver
_ "github.com/goharbor/harbor/src/controller/artifact/processor/cnab"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/controller/event/metadata"
"github.com/goharbor/harbor/src/controller/tag"
"github.com/goharbor/harbor/src/lib"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/artifactrash"
"github.com/goharbor/harbor/src/pkg/artifactrash/model"
"github.com/goharbor/harbor/src/pkg/blob"
@ -32,23 +46,10 @@ import (
"github.com/goharbor/harbor/src/pkg/label"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/registry"
"github.com/goharbor/harbor/src/pkg/repository"
"github.com/goharbor/harbor/src/pkg/signature"
model_tag "github.com/goharbor/harbor/src/pkg/tag/model/tag"
"github.com/opencontainers/go-digest"
"strings"
"time"
// registry image resolvers
_ "github.com/goharbor/harbor/src/api/artifact/processor/image"
// register chart resolver
_ "github.com/goharbor/harbor/src/api/artifact/processor/chart"
// register CNAB resolver
_ "github.com/goharbor/harbor/src/api/artifact/processor/cnab"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/pkg/repository"
)
var (
@ -583,7 +584,7 @@ func (c *controller) populateLabels(ctx context.Context, art *Artifact) {
func (c *controller) populateAdditionLinks(ctx context.Context, artifact *Artifact) {
types := processor.Get(artifact.MediaType).ListAdditionTypes()
if len(types) > 0 {
version := internal.GetAPIVersion(ctx)
version := lib.GetAPIVersion(ctx)
for _, t := range types {
artifact.SetAdditionLink(strings.ToLower(t), version)
}

View File

@ -19,13 +19,13 @@ import (
"testing"
"time"
"github.com/goharbor/harbor/src/api/tag"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/internal"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/tag"
"github.com/goharbor/harbor/src/lib"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/q"
model_tag "github.com/goharbor/harbor/src/pkg/tag/model/tag"
tagtesting "github.com/goharbor/harbor/src/testing/api/tag"
ormtesting "github.com/goharbor/harbor/src/testing/lib/orm"
@ -113,7 +113,7 @@ func (c *controllerTestSuite) TestAssembleArtifact() {
},
}
c.tagCtl.On("List").Return([]*tag.Tag{tg}, nil)
ctx := internal.WithAPIVersion(nil, "2.0")
ctx := lib.WithAPIVersion(nil, "2.0")
lb := &models.Label{
ID: 1,
Name: "label",

View File

@ -18,9 +18,9 @@ import (
"fmt"
"github.com/goharbor/harbor/src/server/v2.0/models"
"github.com/goharbor/harbor/src/api/tag"
cmodels "github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils"
"github.com/goharbor/harbor/src/controller/tag"
"github.com/goharbor/harbor/src/pkg/artifact"
)

View File

@ -16,8 +16,8 @@ package base
import (
"context"
"github.com/goharbor/harbor/src/api/artifact/processor"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/registry"
)

View File

@ -17,8 +17,8 @@ package base
import (
"context"
"encoding/json"
"github.com/goharbor/harbor/src/api/artifact/processor"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/registry"
"github.com/opencontainers/image-spec/specs-go/v1"

View File

@ -19,10 +19,10 @@ import (
"encoding/json"
"io/ioutil"
ps "github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
ps "github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/chart"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

View File

@ -16,8 +16,8 @@ package chart
import (
"github.com/docker/distribution"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
chartserver "github.com/goharbor/harbor/src/pkg/chart"
"github.com/goharbor/harbor/src/testing/pkg/chart"

View File

@ -17,9 +17,9 @@ package cnab
import (
"context"
ps "github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
"github.com/goharbor/harbor/src/common/utils/log"
ps "github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
"github.com/goharbor/harbor/src/pkg/artifact"
)

View File

@ -16,7 +16,7 @@ package cnab
import (
"github.com/docker/distribution"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/testing/pkg/registry"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

View File

@ -16,7 +16,7 @@ package processor
import (
"context"
ierror "github.com/goharbor/harbor/src/internal/error"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"regexp"
"strings"

View File

@ -16,9 +16,9 @@ package image
import (
"github.com/docker/distribution/manifest/manifestlist"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)

View File

@ -18,9 +18,9 @@ import (
"context"
"encoding/json"
"github.com/docker/distribution/manifest/schema1"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
)

View File

@ -15,7 +15,7 @@
package image
import (
ierror "github.com/goharbor/harbor/src/internal/error"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/stretchr/testify/suite"
"testing"

View File

@ -18,10 +18,10 @@ import (
"context"
"encoding/json"
"github.com/docker/distribution/manifest/schema2"
"github.com/goharbor/harbor/src/api/artifact/processor"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/opencontainers/image-spec/specs-go/v1"
)

View File

@ -17,8 +17,8 @@ package image
import (
"github.com/docker/distribution"
"github.com/docker/distribution/manifest/schema2"
"github.com/goharbor/harbor/src/api/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/artifact/processor/base"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/testing/pkg/registry"
"github.com/stretchr/testify/suite"

View File

@ -23,8 +23,8 @@ import (
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
util "github.com/goharbor/harbor/src/common/utils/redis"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/blob"
)

View File

@ -22,11 +22,11 @@ import (
"strings"
"sync"
"github.com/goharbor/harbor/src/api/project"
"github.com/goharbor/harbor/src/chartserver"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/common/config"
commonhttp "github.com/goharbor/harbor/src/common/http"
"github.com/goharbor/harbor/src/controller/project"
)
var (

View File

@ -17,9 +17,9 @@ package auditlog
import (
"context"
beegorm "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/audit"
am "github.com/goharbor/harbor/src/pkg/audit/model"
)

View File

@ -18,13 +18,13 @@ import (
"context"
"testing"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/metadata"
common_dao "github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/metadata"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/audit/model"
"github.com/goharbor/harbor/src/pkg/notifier"
ne "github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
)

View File

@ -1,14 +1,14 @@
package handler
import (
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/auditlog"
"github.com/goharbor/harbor/src/api/event/handler/internal"
"github.com/goharbor/harbor/src/api/event/handler/replication"
"github.com/goharbor/harbor/src/api/event/handler/webhook/artifact"
"github.com/goharbor/harbor/src/api/event/handler/webhook/chart"
"github.com/goharbor/harbor/src/api/event/handler/webhook/quota"
"github.com/goharbor/harbor/src/api/event/handler/webhook/scan"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/auditlog"
"github.com/goharbor/harbor/src/controller/event/handler/internal"
"github.com/goharbor/harbor/src/controller/event/handler/replication"
"github.com/goharbor/harbor/src/controller/event/handler/webhook/artifact"
"github.com/goharbor/harbor/src/controller/event/handler/webhook/chart"
"github.com/goharbor/harbor/src/controller/event/handler/webhook/quota"
"github.com/goharbor/harbor/src/controller/event/handler/webhook/scan"
"github.com/goharbor/harbor/src/pkg/notifier"
)

View File

@ -17,13 +17,13 @@ package internal
import (
"context"
beegorm "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/repository"
"github.com/goharbor/harbor/src/api/tag"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/repository"
"github.com/goharbor/harbor/src/controller/tag"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
"time"
)

View File

@ -15,8 +15,8 @@
package replication
import (
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/project"
"github.com/goharbor/harbor/src/replication"
repevent "github.com/goharbor/harbor/src/replication/event"

View File

@ -18,11 +18,11 @@ import (
"context"
"fmt"
beegorm "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/util"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/util"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/notifier/model"
notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model"

View File

@ -5,10 +5,10 @@ import (
"fmt"
"strings"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/util"
commonModels "github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/util"
"github.com/goharbor/harbor/src/core/config"
"github.com/goharbor/harbor/src/jobservice/job"
"github.com/goharbor/harbor/src/pkg/notification"

View File

@ -1,8 +1,8 @@
package artifact
import (
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/core/config"
"github.com/goharbor/harbor/src/core/promgr/metamgr"
"github.com/goharbor/harbor/src/pkg/notification"

View File

@ -17,10 +17,10 @@ package chart
import (
"errors"
"fmt"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/util"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/util"
"github.com/goharbor/harbor/src/core/config"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/notifier/model"

View File

@ -15,8 +15,8 @@
package chart
import (
"github.com/goharbor/harbor/src/api/event"
common_dao "github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/controller/event"
"testing"
"github.com/goharbor/harbor/src/common/models"

View File

@ -17,10 +17,10 @@ package quota
import (
"errors"
"fmt"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/util"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/util"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/notifier/model"
notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model"

View File

@ -15,8 +15,8 @@
package quota
import (
"github.com/goharbor/harbor/src/api/event"
common_dao "github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/controller/event"
"testing"
"time"

View File

@ -17,12 +17,12 @@ package scan
import (
"context"
bo "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/scan"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/scan"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
"github.com/pkg/errors"
)

View File

@ -17,16 +17,16 @@ package scan
import (
"context"
o "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/api/event/handler/util"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/controller/event/handler/util"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/notifier/model"
"time"
"github.com/goharbor/harbor/src/api/scan"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/scan"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/project"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"

View File

@ -15,14 +15,14 @@
package scan
import (
"github.com/goharbor/harbor/src/api/event"
common_dao "github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/controller/event"
"testing"
"time"
"github.com/goharbor/harbor/src/api/artifact"
sc "github.com/goharbor/harbor/src/api/scan"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/controller/artifact"
sc "github.com/goharbor/harbor/src/controller/scan"
"github.com/goharbor/harbor/src/core/config"
"github.com/goharbor/harbor/src/pkg/notification"
"github.com/goharbor/harbor/src/pkg/notification/policy"

View File

@ -16,8 +16,8 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/security"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"time"

View File

@ -16,7 +16,7 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"

View File

@ -1,7 +1,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"time"
)

View File

@ -15,7 +15,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"
"testing"

View File

@ -15,7 +15,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"time"
)

View File

@ -15,7 +15,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"
"testing"

View File

@ -3,8 +3,8 @@ package metadata
import (
"time"
event2 "github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/models"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/pkg/errors"
)

View File

@ -15,7 +15,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"
"testing"

View File

@ -3,7 +3,7 @@ package metadata
import (
"time"
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
)

View File

@ -16,8 +16,8 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/security"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"time"
)

View File

@ -16,7 +16,7 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"
"testing"

View File

@ -1,8 +1,8 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/models"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
"github.com/pkg/errors"

View File

@ -15,7 +15,7 @@
package metadata
import (
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notifier/event"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
"github.com/stretchr/testify/suite"

View File

@ -16,8 +16,8 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/security"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"time"

View File

@ -16,7 +16,7 @@ package metadata
import (
"context"
event2 "github.com/goharbor/harbor/src/api/event"
event2 "github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/notifier/event"
"github.com/stretchr/testify/suite"

View File

@ -20,7 +20,7 @@ import (
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/core/promgr/metamgr"
ierror "github.com/goharbor/harbor/src/internal/error"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/project"
"github.com/goharbor/harbor/src/pkg/scan/whitelist"
)

View File

@ -20,7 +20,7 @@ import (
"testing"
"github.com/goharbor/harbor/src/common/models"
ierror "github.com/goharbor/harbor/src/internal/error"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/testing/pkg/project"
"github.com/stretchr/testify/suite"
)

View File

@ -22,14 +22,14 @@ import (
"github.com/garyburd/redigo/redis"
"github.com/goharbor/harbor/src/common/utils/log"
util "github.com/goharbor/harbor/src/common/utils/redis"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/quota"
"github.com/goharbor/harbor/src/pkg/quota/driver"
"github.com/goharbor/harbor/src/pkg/types"
// quota driver
_ "github.com/goharbor/harbor/src/api/quota/driver"
_ "github.com/goharbor/harbor/src/controller/quota/driver"
)
var (

View File

@ -20,7 +20,7 @@ import (
"testing"
"time"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/quota"
"github.com/goharbor/harbor/src/pkg/quota/driver"
"github.com/goharbor/harbor/src/pkg/types"

View File

@ -16,5 +16,5 @@ package driver
import (
// project quota driver
_ "github.com/goharbor/harbor/src/api/quota/driver/project"
_ "github.com/goharbor/harbor/src/controller/quota/driver/project"
)

View File

@ -19,14 +19,14 @@ import (
"fmt"
"strconv"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/blob"
"github.com/goharbor/harbor/src/api/chartmuseum"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/common/config"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/blob"
"github.com/goharbor/harbor/src/controller/chartmuseum"
"github.com/goharbor/harbor/src/lib/q"
dr "github.com/goharbor/harbor/src/pkg/quota/driver"
"github.com/goharbor/harbor/src/pkg/types"
"github.com/graph-gophers/dataloader"

View File

@ -20,7 +20,7 @@ import (
"github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/common/models"
ierror "github.com/goharbor/harbor/src/internal/error"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/project"
"github.com/graph-gophers/dataloader"
)

View File

@ -19,10 +19,10 @@ import (
"fmt"
"strconv"
"github.com/goharbor/harbor/src/api/project"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/controller/project"
ierror "github.com/goharbor/harbor/src/lib/error"
)
const (

View File

@ -20,9 +20,9 @@ import (
"testing"
"time"
"github.com/goharbor/harbor/src/api/project"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/project"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/pkg/quota"
"github.com/goharbor/harbor/src/pkg/quota/driver"
"github.com/goharbor/harbor/src/pkg/types"

View File

@ -17,15 +17,15 @@ package repository
import (
"context"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/artifact"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
art "github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/project"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/pkg/repository"
)

View File

@ -15,10 +15,10 @@
package repository
import (
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/common/models"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/controller/artifact"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
artifacttesting "github.com/goharbor/harbor/src/testing/api/artifact"
ormtesting "github.com/goharbor/harbor/src/testing/lib/orm"
"github.com/goharbor/harbor/src/testing/mock"

View File

@ -17,11 +17,11 @@ package scan
import (
"context"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/repository"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/repository"
"github.com/goharbor/harbor/src/lib/q"
"github.com/pkg/errors"
)

View File

@ -20,16 +20,16 @@ import (
"fmt"
"sync"
ar "github.com/goharbor/harbor/src/api/artifact"
sc "github.com/goharbor/harbor/src/api/scanner"
cj "github.com/goharbor/harbor/src/common/job"
jm "github.com/goharbor/harbor/src/common/job/models"
"github.com/goharbor/harbor/src/common/rbac"
"github.com/goharbor/harbor/src/common/utils/log"
ar "github.com/goharbor/harbor/src/controller/artifact"
sc "github.com/goharbor/harbor/src/controller/scanner"
"github.com/goharbor/harbor/src/core/config"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/jobservice/job"
"github.com/goharbor/harbor/src/jobservice/logger"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/permission/types"
"github.com/goharbor/harbor/src/pkg/robot"
"github.com/goharbor/harbor/src/pkg/robot/model"

View File

@ -22,14 +22,14 @@ import (
"testing"
"time"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/common"
cj "github.com/goharbor/harbor/src/common/job"
jm "github.com/goharbor/harbor/src/common/job/models"
"github.com/goharbor/harbor/src/common/rbac"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/jobservice/job"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/permission/types"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/pkg/robot/model"
sca "github.com/goharbor/harbor/src/pkg/scan"
"github.com/goharbor/harbor/src/pkg/scan/dao/scan"

View File

@ -17,8 +17,8 @@ package scan
import (
"context"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/api/scanner"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/controller/scanner"
models "github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
)

View File

@ -18,7 +18,7 @@ import (
"context"
"testing"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
artifacttesting "github.com/goharbor/harbor/src/testing/api/artifact"

View File

@ -17,7 +17,7 @@ package scan
import (
"context"
"github.com/goharbor/harbor/src/api/artifact"
"github.com/goharbor/harbor/src/controller/artifact"
"github.com/goharbor/harbor/src/jobservice/job"
"github.com/goharbor/harbor/src/pkg/scan/all"
"github.com/goharbor/harbor/src/pkg/scan/dao/scan"

View File

@ -18,7 +18,7 @@ import (
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/core/promgr/metamgr"
"github.com/goharbor/harbor/src/jobservice/logger"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
rscanner "github.com/goharbor/harbor/src/pkg/scan/scanner"

View File

@ -18,7 +18,7 @@ import (
"testing"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
mocktesting "github.com/goharbor/harbor/src/testing/mock"

View File

@ -15,7 +15,7 @@
package scanner
import (
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
)

View File

@ -4,13 +4,13 @@ import (
"context"
"github.com/goharbor/harbor/src/common/utils"
"github.com/goharbor/harbor/src/common/utils/log"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
"github.com/goharbor/harbor/src/internal/selector"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/goharbor/harbor/src/lib/q"
"github.com/goharbor/harbor/src/lib/selector"
"github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/immutabletag/match"
"github.com/goharbor/harbor/src/pkg/immutabletag/match/rule"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/pkg/signature"
"github.com/goharbor/harbor/src/pkg/tag"
model_tag "github.com/goharbor/harbor/src/pkg/tag/model/tag"

View File

@ -3,8 +3,8 @@ package tag
import (
"github.com/goharbor/harbor/src/common"
coreConfig "github.com/goharbor/harbor/src/core/config"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
pkg_artifact "github.com/goharbor/harbor/src/pkg/artifact"
"github.com/goharbor/harbor/src/pkg/tag/model/tag"
ormtesting "github.com/goharbor/harbor/src/testing/lib/orm"

View File

@ -21,12 +21,12 @@ import (
"strconv"
"time"
"github.com/goharbor/harbor/src/api/scan"
"github.com/goharbor/harbor/src/common/dao"
common_http "github.com/goharbor/harbor/src/common/http"
common_job "github.com/goharbor/harbor/src/common/job"
common_models "github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/scan"
"github.com/goharbor/harbor/src/core/api/models"
utils_core "github.com/goharbor/harbor/src/core/utils"
"github.com/pkg/errors"

View File

@ -29,7 +29,7 @@ import (
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/core/config"
"github.com/goharbor/harbor/src/core/promgr"
internal_errors "github.com/goharbor/harbor/src/internal/error"
internal_errors "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/project"
"github.com/goharbor/harbor/src/pkg/repository"
"github.com/goharbor/harbor/src/pkg/retention"

View File

@ -5,7 +5,7 @@ import (
"context"
"errors"
"fmt"
"github.com/goharbor/harbor/src/api/event/metadata"
"github.com/goharbor/harbor/src/controller/event/metadata"
"io"
"io/ioutil"
"mime/multipart"

View File

@ -7,7 +7,7 @@ import (
"strings"
"github.com/goharbor/harbor/src/common/rbac"
internal_errors "github.com/goharbor/harbor/src/internal/error"
internal_errors "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/pkg/immutabletag"
"github.com/goharbor/harbor/src/pkg/immutabletag/model"
)

View File

@ -18,14 +18,14 @@ import (
"context"
o "github.com/astaxie/beego/orm"
"github.com/goharbor/harbor/src/api/quota"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/quota"
"github.com/goharbor/harbor/src/core/config"
ierror "github.com/goharbor/harbor/src/internal/error"
"github.com/goharbor/harbor/src/internal/orm"
ierror "github.com/goharbor/harbor/src/lib/error"
"github.com/goharbor/harbor/src/lib/orm"
"github.com/pkg/errors"
)

View File

@ -1,7 +1,7 @@
package api
import (
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/controller/event"
"net/http"
"testing"
"time"

View File

@ -7,11 +7,11 @@ import (
"strconv"
"time"
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/rbac"
"github.com/goharbor/harbor/src/common/utils"
"github.com/goharbor/harbor/src/common/utils/log"
"github.com/goharbor/harbor/src/controller/event"
"github.com/goharbor/harbor/src/pkg/notification"
)

View File

@ -1,7 +1,7 @@
package api
import (
"github.com/goharbor/harbor/src/api/event"
"github.com/goharbor/harbor/src/controller/event"
"net/http"
"testing"

View File

@ -15,9 +15,9 @@
package api
import (
"github.com/goharbor/harbor/src/api/scanner"
"github.com/goharbor/harbor/src/common/rbac"
"github.com/goharbor/harbor/src/pkg/q"
"github.com/goharbor/harbor/src/controller/scanner"
"github.com/goharbor/harbor/src/lib/q"
"github.com/pkg/errors"
)

Some files were not shown because too many files have changed in this diff Show More