Merge pull request #5716 from reasonerjt/update-go-import-path

Update import path in go code
This commit is contained in:
Wenkai Yin 2018-08-23 19:02:50 +08:00 committed by GitHub
commit 2c5b06350e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
341 changed files with 1104 additions and 1104 deletions

View File

@ -1,6 +1,6 @@
workspace: workspace:
base: /drone base: /drone
path: src/github.com/vmware/harbor path: src/github.com/goharbor/harbor
clone: clone:
git: git:

View File

@ -5,7 +5,7 @@ language: go
go: go:
- 1.9.2 - 1.9.2
go_import_path: github.com/vmware/harbor go_import_path: github.com/goharbor/harbor
services: services:
- docker - docker
@ -99,7 +99,7 @@ script:
- sudo ./admiral.sh - sudo ./admiral.sh
- cd .. - cd ..
- go test -race -i ./src/ui ./src/adminserver ./src/jobservice - go test -race -i ./src/ui ./src/adminserver ./src/jobservice
- sudo -E env "PATH=$PATH" "POSTGRES_MIGRATION_SCRIPTS_PATH=/home/travis/gopath/src/github.com/vmware/harbor/make/migrations/postgresql/" ./tests/coverage4gotest.sh - sudo -E env "PATH=$PATH" "POSTGRES_MIGRATION_SCRIPTS_PATH=/home/travis/gopath/src/github.com/goharbor/harbor/make/migrations/postgresql/" ./tests/coverage4gotest.sh
- goveralls -coverprofile=profile.cov -service=travis-ci - goveralls -coverprofile=profile.cov -service=travis-ci
- docker-compose -f make/docker-compose.test.yml down - docker-compose -f make/docker-compose.test.yml down
- ls /data/cert - ls /data/cert

View File

@ -69,12 +69,12 @@ SRCPATH=./src
TOOLSPATH=$(BUILDPATH)/tools TOOLSPATH=$(BUILDPATH)/tools
UIPATH=$(BUILDPATH)/src/ui UIPATH=$(BUILDPATH)/src/ui
UINGPATH=$(BUILDPATH)/src/ui_ng UINGPATH=$(BUILDPATH)/src/ui_ng
GOBASEPATH=/go/src/github.com/vmware GOBASEPATH=/go/src/github.com/goharbor
CHECKENVCMD=checkenv.sh CHECKENVCMD=checkenv.sh
# parameters # parameters
REGISTRYSERVER= REGISTRYSERVER=
REGISTRYPROJECTNAME=vmware REGISTRYPROJECTNAME=goharbor
DEVFLAG=true DEVFLAG=true
NOTARYFLAG=false NOTARYFLAG=false
CLAIRFLAG=false CLAIRFLAG=false

View File

@ -2,9 +2,9 @@ FROM golang:1.9.2
MAINTAINER yinw@vmware.com MAINTAINER yinw@vmware.com
COPY . /go/src/github.com/vmware/harbor COPY . /go/src/github.com/goharbor/harbor
WORKDIR /go/src/github.com/vmware/harbor/src/adminserver WORKDIR /go/src/github.com/goharbor/harbor/src/adminserver
RUN go build -a -o /go/bin/harbor_adminserver \ RUN go build -a -o /go/bin/harbor_adminserver \
&& chmod u+x /go/bin/harbor_adminserver && chmod u+x /go/bin/harbor_adminserver

View File

@ -2,9 +2,9 @@ FROM golang:1.9.2
MAINTAINER jiangd@vmware.com MAINTAINER jiangd@vmware.com
COPY . /go/src/github.com/vmware/harbor COPY . /go/src/github.com/goharbor/harbor
WORKDIR /go/src/github.com/vmware/harbor/src/jobservice WORKDIR /go/src/github.com/goharbor/harbor/src/jobservice
RUN go build -a -o /go/bin/harbor_jobservice \ RUN go build -a -o /go/bin/harbor_jobservice \
&& chmod u+x /go/bin/harbor_jobservice && chmod u+x /go/bin/harbor_jobservice

View File

@ -2,9 +2,9 @@ FROM golang:1.9.2
MAINTAINER wangyan@vmware.com MAINTAINER wangyan@vmware.com
COPY . /go/src/github.com/vmware/harbor COPY . /go/src/github.com/goharbor/harbor
WORKDIR /go/src/github.com/vmware/harbor/src/registryctl WORKDIR /go/src/github.com/goharbor/harbor/src/registryctl
RUN go build -a -o /go/bin/harbor_registryctl \ RUN go build -a -o /go/bin/harbor_registryctl \
&& chmod u+x /go/bin/harbor_registryctl && chmod u+x /go/bin/harbor_registryctl

View File

@ -2,8 +2,8 @@ FROM golang:1.9.2
MAINTAINER jiangd@vmware.com MAINTAINER jiangd@vmware.com
COPY src/. /go/src/github.com/vmware/harbor/src COPY src/. /go/src/github.com/goharbor/harbor/src
WORKDIR /go/src/github.com/vmware/harbor/src/ui WORKDIR /go/src/github.com/goharbor/harbor/src/ui
RUN go build -a -o /go/bin/harbor_ui RUN go build -a -o /go/bin/harbor_ui

View File

@ -19,8 +19,8 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"github.com/vmware/harbor/src/adminserver/systemcfg" "github.com/goharbor/harbor/src/adminserver/systemcfg"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// ListCfgs lists configurations // ListCfgs lists configurations

View File

@ -27,8 +27,8 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/adminserver/systemcfg" "github.com/goharbor/harbor/src/adminserver/systemcfg"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
) )
type fakeCfgStore struct { type fakeCfgStore struct {

View File

@ -2,7 +2,7 @@ package api
import ( import (
"net/http" "net/http"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// Ping monitor the server status // Ping monitor the server status

View File

@ -17,8 +17,8 @@ package api
import ( import (
"net/http" "net/http"
"github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// Capacity handles /api/systeminfo/capacity and returns system capacity // Capacity handles /api/systeminfo/capacity and returns system capacity

View File

@ -23,7 +23,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
) )
type fakeImageStorageDriver struct { type fakeImageStorageDriver struct {

View File

@ -15,7 +15,7 @@
package auth package auth
import ( import (
"github.com/vmware/harbor/src/common/secret" "github.com/goharbor/harbor/src/common/secret"
"net/http" "net/http"
) )

View File

@ -19,7 +19,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
commonsecret "github.com/vmware/harbor/src/common/secret" commonsecret "github.com/goharbor/harbor/src/common/secret"
) )
func TestAuthenticate(t *testing.T) { func TestAuthenticate(t *testing.T) {

View File

@ -17,10 +17,10 @@ package client
import ( import (
"strings" "strings"
"github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
"github.com/vmware/harbor/src/common/http" "github.com/goharbor/harbor/src/common/http"
"github.com/vmware/harbor/src/common/http/modifier/auth" "github.com/goharbor/harbor/src/common/http/modifier/auth"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
// Client defines methods that an Adminserver client should implement // Client defines methods that an Adminserver client should implement

View File

@ -20,8 +20,8 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/utils/test" "github.com/goharbor/harbor/src/common/utils/test"
) )
var c Client var c Client

View File

@ -19,8 +19,8 @@ import (
"os" "os"
gorilla_handlers "github.com/gorilla/handlers" gorilla_handlers "github.com/gorilla/handlers"
"github.com/vmware/harbor/src/adminserver/auth" "github.com/goharbor/harbor/src/adminserver/auth"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// NewHandler returns a gorilla router which is wrapped by authenticate handler // NewHandler returns a gorilla router which is wrapped by authenticate handler

View File

@ -21,7 +21,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/adminserver/auth" "github.com/goharbor/harbor/src/adminserver/auth"
) )
type fakeAuthenticator struct { type fakeAuthenticator struct {

View File

@ -18,7 +18,7 @@ import (
"net/http" "net/http"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/vmware/harbor/src/adminserver/api" "github.com/goharbor/harbor/src/adminserver/api"
) )
func newRouter() http.Handler { func newRouter() http.Handler {

View File

@ -18,10 +18,10 @@ import (
"net/http" "net/http"
"os" "os"
"github.com/vmware/harbor/src/adminserver/handlers" "github.com/goharbor/harbor/src/adminserver/handlers"
syscfg "github.com/vmware/harbor/src/adminserver/systemcfg" syscfg "github.com/goharbor/harbor/src/adminserver/systemcfg"
sysinfo "github.com/vmware/harbor/src/adminserver/systeminfo" sysinfo "github.com/goharbor/harbor/src/adminserver/systeminfo"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// Server for admin component // Server for admin component

View File

@ -15,8 +15,8 @@
package encrypt package encrypt
import ( import (
comcfg "github.com/vmware/harbor/src/common/config" comcfg "github.com/goharbor/harbor/src/common/config"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
// Encryptor encrypts or decrypts a strings // Encryptor encrypts or decrypts a strings

View File

@ -19,7 +19,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
comcfg "github.com/vmware/harbor/src/common/config" comcfg "github.com/goharbor/harbor/src/common/config"
) )
type fakeKeyProvider struct { type fakeKeyProvider struct {

View File

@ -19,10 +19,10 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"github.com/vmware/harbor/src/adminserver/systemcfg/store" "github.com/goharbor/harbor/src/adminserver/systemcfg/store"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
const ( const (

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestCfgStore_Name(t *testing.T) { func TestCfgStore_Name(t *testing.T) {

View File

@ -15,9 +15,9 @@
package encrypt package encrypt
import ( import (
"github.com/vmware/harbor/src/adminserver/systemcfg/encrypt" "github.com/goharbor/harbor/src/adminserver/systemcfg/encrypt"
"github.com/vmware/harbor/src/adminserver/systemcfg/store" "github.com/goharbor/harbor/src/adminserver/systemcfg/store"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -21,8 +21,8 @@ import (
"path/filepath" "path/filepath"
"sync" "sync"
"github.com/vmware/harbor/src/adminserver/systemcfg/store" "github.com/goharbor/harbor/src/adminserver/systemcfg/store"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -21,17 +21,17 @@ import (
"strconv" "strconv"
"strings" "strings"
enpt "github.com/vmware/harbor/src/adminserver/systemcfg/encrypt" enpt "github.com/goharbor/harbor/src/adminserver/systemcfg/encrypt"
"github.com/vmware/harbor/src/adminserver/systemcfg/store" "github.com/goharbor/harbor/src/adminserver/systemcfg/store"
"github.com/vmware/harbor/src/adminserver/systemcfg/store/database" "github.com/goharbor/harbor/src/adminserver/systemcfg/store/database"
"github.com/vmware/harbor/src/adminserver/systemcfg/store/encrypt" "github.com/goharbor/harbor/src/adminserver/systemcfg/store/encrypt"
"github.com/vmware/harbor/src/adminserver/systemcfg/store/json" "github.com/goharbor/harbor/src/adminserver/systemcfg/store/json"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
comcfg "github.com/vmware/harbor/src/common/config" comcfg "github.com/goharbor/harbor/src/common/config"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -19,7 +19,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
) )
func TestParseStringToInt(t *testing.T) { func TestParseStringToInt(t *testing.T) {

View File

@ -18,8 +18,8 @@ import (
"os" "os"
"syscall" "syscall"
storage "github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" storage "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -18,7 +18,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
storage "github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" storage "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
) )
func TestName(t *testing.T) { func TestName(t *testing.T) {

View File

@ -17,8 +17,8 @@ package systeminfo
import ( import (
"os" "os"
"github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage" "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage"
"github.com/vmware/harbor/src/adminserver/systeminfo/imagestorage/filesystem" "github.com/goharbor/harbor/src/adminserver/systeminfo/imagestorage/filesystem"
) )
// Init image storage driver // Init image storage driver

View File

@ -10,9 +10,9 @@ import (
"net/url" "net/url"
"regexp" "regexp"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/ui/filter" "github.com/goharbor/harbor/src/ui/filter"
"github.com/vmware/harbor/src/ui/promgr/metamgr" "github.com/goharbor/harbor/src/ui/promgr/metamgr"
) )
//The backend server //The backend server
@ -229,9 +229,9 @@ func getTheAddrOfFrontServer() string {
var harborChartV = ` var harborChartV = `
{ {
"name": "harbor", "name": "harbor",
"home": "https://github.com/vmware/harbor", "home": "https://github.com/goharbor/harbor",
"sources": [ "sources": [
"https://github.com/vmware/harbor/tree/master/contrib/helm/harbor" "https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor"
], ],
"version": "0.2.0", "version": "0.2.0",
"description": "An Enterprise-class Docker Registry by VMware", "description": "An Enterprise-class Docker Registry by VMware",
@ -252,7 +252,7 @@ var harborChartV = `
} }
], ],
"engine": "gotpl", "engine": "gotpl",
"icon": "https://github.com/vmware/harbor/blob/master/docs/img/harbor_logo.png", "icon": "https://github.com/goharbor/harbor/blob/master/docs/img/harbor_logo.png",
"appVersion": "1.5.0", "appVersion": "1.5.0",
"urls": [ "urls": [
"charts/harbor-0.2.0.tgz" "charts/harbor-0.2.0.tgz"
@ -270,8 +270,8 @@ entries:
description: An Enterprise-class Docker Registry by VMware description: An Enterprise-class Docker Registry by VMware
digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba
engine: gotpl engine: gotpl
home: https://github.com/vmware/harbor home: https://github.com/goharbor/harbor
icon: https://github.com/vmware/harbor/blob/master/docs/img/harbor_logo.png icon: https://github.com/goharbor/harbor/blob/master/docs/img/harbor_logo.png
keywords: keywords:
- vmware - vmware
- docker - docker
@ -284,7 +284,7 @@ entries:
name: paulczar name: paulczar
name: harbor name: harbor
sources: sources:
- https://github.com/vmware/harbor/tree/master/contrib/helm/harbor - https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor
urls: urls:
- charts/harbor-0.2.0.tgz - charts/harbor-0.2.0.tgz
version: 0.2.0 version: 0.2.0
@ -329,8 +329,8 @@ entries:
description: An Enterprise-class Docker Registry by VMware description: An Enterprise-class Docker Registry by VMware
digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba
engine: gotpl engine: gotpl
home: https://github.com/vmware/harbor home: https://github.com/goharbor/harbor
icon: https://github.com/vmware/harbor/blob/master/docs/img/harbor_logo.png icon: https://github.com/goharbor/harbor/blob/master/docs/img/harbor_logo.png
keywords: keywords:
- vmware - vmware
- docker - docker
@ -343,7 +343,7 @@ entries:
name: paulczar name: paulczar
name: harbor name: harbor
sources: sources:
- https://github.com/vmware/harbor/tree/master/contrib/helm/harbor - https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor
urls: urls:
- charts/harbor-0.2.0.tgz - charts/harbor-0.2.0.tgz
version: 0.2.0 version: 0.2.0

View File

@ -6,7 +6,7 @@ import (
"time" "time"
beego_cache "github.com/astaxie/beego/cache" beego_cache "github.com/astaxie/beego/cache"
hlog "github.com/vmware/harbor/src/common/utils/log" hlog "github.com/goharbor/harbor/src/common/utils/log"
//Enable redis cache adaptor //Enable redis cache adaptor
_ "github.com/astaxie/beego/cache/redis" _ "github.com/astaxie/beego/cache/redis"

View File

@ -9,7 +9,7 @@ import (
"github.com/Masterminds/semver" "github.com/Masterminds/semver"
hlog "github.com/vmware/harbor/src/common/utils/log" hlog "github.com/goharbor/harbor/src/common/utils/log"
"k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/chartutil"
helm_repo "k8s.io/helm/pkg/repo" helm_repo "k8s.io/helm/pkg/repo"
) )

View File

@ -7,7 +7,7 @@ import (
"os" "os"
"strings" "strings"
hlog "github.com/vmware/harbor/src/common/utils/log" hlog "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -10,7 +10,7 @@ import (
"strings" "strings"
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
hlog "github.com/vmware/harbor/src/common/utils/log" hlog "github.com/goharbor/harbor/src/common/utils/log"
helm_repo "k8s.io/helm/pkg/repo" helm_repo "k8s.io/helm/pkg/repo"
) )

View File

@ -12,10 +12,10 @@ import (
"time" "time"
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/vmware/harbor/src/ui/filter" "github.com/goharbor/harbor/src/ui/filter"
helm_repo "k8s.io/helm/pkg/repo" helm_repo "k8s.io/helm/pkg/repo"
hlog "github.com/vmware/harbor/src/common/utils/log" hlog "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -21,8 +21,8 @@ import (
"strconv" "strconv"
"github.com/astaxie/beego/validation" "github.com/astaxie/beego/validation"
http_error "github.com/vmware/harbor/src/common/utils/error" http_error "github.com/goharbor/harbor/src/common/utils/error"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"github.com/astaxie/beego" "github.com/astaxie/beego"
) )

View File

@ -20,8 +20,8 @@ import (
"time" "time"
"github.com/astaxie/beego/cache" "github.com/astaxie/beego/cache"
"github.com/vmware/harbor/src/adminserver/client" "github.com/goharbor/harbor/src/adminserver/client"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
) )
// Manager manages configurations // Manager manages configurations

View File

@ -16,8 +16,8 @@ package dao
import ( import (
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// AddAccessLog persists the access logs // AddAccessLog persists the access logs

View File

@ -18,8 +18,8 @@ import (
"time" "time"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// AddAdminJob ... // AddAdminJob ...

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestAddAdminJob(t *testing.T) { func TestAddAdminJob(t *testing.T) {

View File

@ -21,8 +21,8 @@ import (
"sync" "sync"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -15,8 +15,8 @@
package dao package dao
import ( import (
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"time" "time"
) )

View File

@ -20,7 +20,7 @@ import (
"sync" "sync"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
) )
const ( const (

View File

@ -15,7 +15,7 @@
package dao package dao
import ( import (
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// AuthModeCanBeModified determines whether auth mode can be // AuthModeCanBeModified determines whether auth mode can be

View File

@ -17,7 +17,7 @@ package dao
import ( import (
"testing" "testing"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestAuthModeCanBeModified(t *testing.T) { func TestAuthModeCanBeModified(t *testing.T) {

View File

@ -22,10 +22,10 @@ import (
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
func execUpdate(o orm.Ormer, sql string, params ...interface{}) error { func execUpdate(o orm.Ormer, sql string, params ...interface{}) error {

View File

@ -18,11 +18,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// AddUserGroup - Add User Group // AddUserGroup - Add User Group

View File

@ -19,11 +19,11 @@ import (
"os" "os"
"testing" "testing"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/dao/project" "github.com/goharbor/harbor/src/common/dao/project"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
var createdUserGroupID int var createdUserGroupID int

View File

@ -19,7 +19,7 @@ import (
"time" "time"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// AddLabel creates a label // AddLabel creates a label

View File

@ -17,8 +17,8 @@ package dao
import ( import (
"testing" "testing"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View File

@ -20,7 +20,7 @@ import (
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
_ "github.com/go-sql-driver/mysql" //register mysql driver _ "github.com/go-sql-driver/mysql" //register mysql driver
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
type mysql struct { type mysql struct {

View File

@ -24,8 +24,8 @@ import (
_ "github.com/golang-migrate/migrate/source/file" // import local file driver for migrator _ "github.com/golang-migrate/migrate/source/file" // import local file driver for migrator
_ "github.com/lib/pq" //register pgsql driver _ "github.com/lib/pq" //register pgsql driver
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const defaultMigrationPath = "migrations/postgresql/" const defaultMigrationPath = "migrations/postgresql/"

View File

@ -19,7 +19,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// AddProjectMetadata adds metadata for a project // AddProjectMetadata adds metadata for a project

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestProMetaDaoMethods(t *testing.T) { func TestProMetaDaoMethods(t *testing.T) {

View File

@ -15,9 +15,9 @@
package dao package dao
import ( import (
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"fmt" "fmt"
"time" "time"

View File

@ -17,9 +17,9 @@ package project
import ( import (
"fmt" "fmt"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// GetProjectMember gets all members of the project. // GetProjectMember gets all members of the project.

View File

@ -19,13 +19,13 @@ import (
"os" "os"
"testing" "testing"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
_ "github.com/vmware/harbor/src/ui/auth/db" _ "github.com/goharbor/harbor/src/ui/auth/db"
_ "github.com/vmware/harbor/src/ui/auth/ldap" _ "github.com/goharbor/harbor/src/ui/auth/ldap"
cfg "github.com/vmware/harbor/src/ui/config" cfg "github.com/goharbor/harbor/src/ui/config"
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {

View File

@ -19,7 +19,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestDeleteProject(t *testing.T) { func TestDeleteProject(t *testing.T) {

View File

@ -18,8 +18,8 @@ import (
"errors" "errors"
"time" "time"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
// Register is used for user to register, the password is encrypted before the record is inserted into database. // Register is used for user to register, the password is encrypted before the record is inserted into database.

View File

@ -20,8 +20,8 @@ import (
"strings" "strings"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// AddRepTarget ... // AddRepTarget ...

View File

@ -19,7 +19,7 @@ import (
"time" "time"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// AddRepository adds a repo to the database. // AddRepository adds a repo to the database.

View File

@ -20,8 +20,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
var ( var (

View File

@ -18,7 +18,7 @@ import (
"time" "time"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// AddResourceLabel add a label to a resource // AddResourceLabel add a label to a resource

View File

@ -19,8 +19,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestMethodsOfResourceLabel(t *testing.T) { func TestMethodsOfResourceLabel(t *testing.T) {

View File

@ -18,7 +18,7 @@ import (
"fmt" "fmt"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// GetUserProjectRoles returns roles that the user has according to the project. // GetUserProjectRoles returns roles that the user has according to the project.

View File

@ -16,8 +16,8 @@ package dao
import ( import (
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"encoding/json" "encoding/json"
"fmt" "fmt"

View File

@ -19,8 +19,8 @@ import (
"os" "os"
"strconv" "strconv"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
var defaultRegistered = false var defaultRegistered = false

View File

@ -21,10 +21,10 @@ import (
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
// GetUser ... // GetUser ...

View File

@ -19,7 +19,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestDeleteUser(t *testing.T) { func TestDeleteUser(t *testing.T) {

View File

@ -15,7 +15,7 @@
package dao package dao
import ( import (
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
const ( const (

View File

@ -17,7 +17,7 @@ package dao
import ( import (
"time" "time"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// DefaultDatabaseWatchItemDAO is an instance of DatabaseWatchItemDAO // DefaultDatabaseWatchItemDAO is an instance of DatabaseWatchItemDAO

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
func TestMethodsOfWatchItem(t *testing.T) { func TestMethodsOfWatchItem(t *testing.T) {

View File

@ -21,7 +21,7 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"github.com/vmware/harbor/src/common/http/modifier" "github.com/goharbor/harbor/src/common/http/modifier"
) )
// Client is a util for common HTTP operations, such Get, Head, Post, Put and Delete. // Client is a util for common HTTP operations, such Get, Head, Post, Put and Delete.

View File

@ -18,8 +18,8 @@ import (
"errors" "errors"
"net/http" "net/http"
"github.com/vmware/harbor/src/common/http/modifier" "github.com/goharbor/harbor/src/common/http/modifier"
"github.com/vmware/harbor/src/common/secret" "github.com/goharbor/harbor/src/common/secret"
) )
// Authorizer is a kind of Modifier used to authorize the requests // Authorizer is a kind of Modifier used to authorize the requests

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
commonsecret "github.com/vmware/harbor/src/common/secret" commonsecret "github.com/goharbor/harbor/src/common/secret"
) )
func TestAuthorizeOfSecretAuthorizer(t *testing.T) { func TestAuthorizeOfSecretAuthorizer(t *testing.T) {

View File

@ -7,9 +7,9 @@ import (
"net/http" "net/http"
"strings" "strings"
commonhttp "github.com/vmware/harbor/src/common/http" commonhttp "github.com/goharbor/harbor/src/common/http"
"github.com/vmware/harbor/src/common/http/modifier/auth" "github.com/goharbor/harbor/src/common/http/modifier/auth"
"github.com/vmware/harbor/src/common/job/models" "github.com/goharbor/harbor/src/common/job/models"
) )
// Client wraps interface to access jobservice. // Client wraps interface to access jobservice.

View File

@ -2,8 +2,8 @@ package job
import ( import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vmware/harbor/src/common/job/models" "github.com/goharbor/harbor/src/common/job/models"
"github.com/vmware/harbor/src/common/job/test" "github.com/goharbor/harbor/src/common/job/test"
"os" "os"
"testing" "testing"
) )

View File

@ -11,7 +11,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/vmware/harbor/src/common/job/models" "github.com/goharbor/harbor/src/common/job/models"
) )
const ( const (

View File

@ -19,7 +19,7 @@ import (
"time" "time"
"github.com/astaxie/beego/validation" "github.com/astaxie/beego/validation"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
) )
// Label holds information used for a label // Label holds information used for a label

View File

@ -18,7 +18,7 @@ import (
"time" "time"
"github.com/astaxie/beego/validation" "github.com/astaxie/beego/validation"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
const ( const (

View File

@ -3,8 +3,8 @@ package notifier
import ( import (
"errors" "errors"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
) )
//WatchConfigChanges is used to watch the configuration changes. //WatchConfigChanges is used to watch the configuration changes.

View File

@ -7,7 +7,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
//HandlerIndexer is setup the relationship between the handler type and //HandlerIndexer is setup the relationship between the handler type and

View File

@ -6,7 +6,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/vmware/harbor/src/common/scheduler" "github.com/goharbor/harbor/src/common/scheduler"
) )
var statefulData int32 var statefulData int32

View File

@ -7,9 +7,9 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/vmware/harbor/src/common/scheduler" "github.com/goharbor/harbor/src/common/scheduler"
"github.com/vmware/harbor/src/common/scheduler/policy" "github.com/goharbor/harbor/src/common/scheduler/policy"
"github.com/vmware/harbor/src/common/scheduler/task" "github.com/goharbor/harbor/src/common/scheduler/task"
) )
const ( const (

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/vmware/harbor/src/common/scheduler" "github.com/goharbor/harbor/src/common/scheduler"
"github.com/vmware/harbor/src/common/scheduler/policy" "github.com/goharbor/harbor/src/common/scheduler/policy"
) )
var testingScheduler = scheduler.DefaultScheduler var testingScheduler = scheduler.DefaultScheduler

View File

@ -1,7 +1,7 @@
package notifier package notifier
import ( import (
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
) )
//Define global topic names //Define global topic names

View File

@ -17,9 +17,9 @@ package registryctl
import ( import (
"os" "os"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"github.com/vmware/harbor/src/registryctl/client" "github.com/goharbor/harbor/src/registryctl/client"
) )
var ( var (

View File

@ -6,8 +6,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/vmware/harbor/src/common/scheduler/task" "github.com/goharbor/harbor/src/common/scheduler/task"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -1,7 +1,7 @@
package policy package policy
import ( import (
"github.com/vmware/harbor/src/common/scheduler/task" "github.com/goharbor/harbor/src/common/scheduler/task"
) )
//Policy is an if-then logic to determine how the attached tasks should be //Policy is an if-then logic to determine how the attached tasks should be

View File

@ -1,8 +1,8 @@
package scheduler package scheduler
import ( import (
"github.com/vmware/harbor/src/common/scheduler/policy" "github.com/goharbor/harbor/src/common/scheduler/policy"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"errors" "errors"
"fmt" "fmt"

View File

@ -5,8 +5,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/vmware/harbor/src/common/scheduler/policy" "github.com/goharbor/harbor/src/common/scheduler/policy"
"github.com/vmware/harbor/src/common/scheduler/task" "github.com/goharbor/harbor/src/common/scheduler/task"
) )
type fakePolicy struct { type fakePolicy struct {

View File

@ -1,9 +1,9 @@
package replication package replication
import ( import (
"github.com/vmware/harbor/src/common/notifier" "github.com/goharbor/harbor/src/common/notifier"
"github.com/vmware/harbor/src/replication/event/notification" "github.com/goharbor/harbor/src/replication/event/notification"
"github.com/vmware/harbor/src/replication/event/topic" "github.com/goharbor/harbor/src/replication/event/topic"
) )
//Task is the task for triggering one replication //Task is the task for triggering one replication

View File

@ -1,7 +1,7 @@
package task package task
import ( import (
"github.com/vmware/harbor/src/ui/utils" "github.com/goharbor/harbor/src/ui/utils"
) )
//ScanAllTask is task of scanning all tags. //ScanAllTask is task of scanning all tags.

View File

@ -1,9 +1,9 @@
package scheduler package scheduler
import ( import (
"github.com/vmware/harbor/src/common/scheduler/policy" "github.com/goharbor/harbor/src/common/scheduler/policy"
"github.com/vmware/harbor/src/common/scheduler/task" "github.com/goharbor/harbor/src/common/scheduler/task"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"fmt" "fmt"
"sync" "sync"

View File

@ -23,11 +23,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils" "github.com/goharbor/harbor/src/common/utils"
http_error "github.com/vmware/harbor/src/common/utils/error" http_error "github.com/goharbor/harbor/src/common/utils/error"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
) )
const ( const (

View File

@ -15,11 +15,11 @@
package admiral package admiral
import ( import (
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/security/admiral/authcontext" "github.com/goharbor/harbor/src/common/security/admiral/authcontext"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"github.com/vmware/harbor/src/ui/promgr" "github.com/goharbor/harbor/src/ui/promgr"
) )
// SecurityContext implements security.Context interface based on // SecurityContext implements security.Context interface based on

View File

@ -15,7 +15,7 @@
package security package security
import ( import (
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
) )
// Context abstracts the operations related with authN and authZ // Context abstracts the operations related with authN and authZ

View File

@ -15,12 +15,12 @@
package local package local
import ( import (
"github.com/vmware/harbor/src/common" "github.com/goharbor/harbor/src/common"
"github.com/vmware/harbor/src/common/dao" "github.com/goharbor/harbor/src/common/dao"
"github.com/vmware/harbor/src/common/dao/group" "github.com/goharbor/harbor/src/common/dao/group"
"github.com/vmware/harbor/src/common/models" "github.com/goharbor/harbor/src/common/models"
"github.com/vmware/harbor/src/common/utils/log" "github.com/goharbor/harbor/src/common/utils/log"
"github.com/vmware/harbor/src/ui/promgr" "github.com/goharbor/harbor/src/ui/promgr"
) )
// SecurityContext implements security.Context interface based on database // SecurityContext implements security.Context interface based on database

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