Refactor: move model/ to server/model/ (#366)

This commit is contained in:
6543 2021-09-27 19:51:55 +02:00 committed by GitHub
parent 06d83c7b0e
commit a94807efeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
121 changed files with 97 additions and 97 deletions

View file

@ -21,8 +21,8 @@ import (
"github.com/dimfeld/httptreemux"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/plugins/environments"
"github.com/woodpecker-ci/woodpecker/server/plugins/registry"
"github.com/woodpecker-ci/woodpecker/server/plugins/secrets"

View file

@ -23,8 +23,8 @@ import (
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store"
)

View file

@ -29,8 +29,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/queue"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"

View file

@ -31,7 +31,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"

View file

@ -20,8 +20,8 @@ import (
"time"
"github.com/gorilla/securecookie"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/httputil"

View file

@ -17,8 +17,8 @@ package api
import (
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/gin-gonic/gin"

View file

@ -23,8 +23,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/securecookie"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/store"

View file

@ -17,8 +17,8 @@ package api
import (
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/gin-gonic/gin"

View file

@ -22,9 +22,9 @@ import (
"strconv"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/logging"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/pubsub"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/store"

View file

@ -24,7 +24,7 @@ import (
"github.com/gorilla/securecookie"
"github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/shared"

View file

@ -21,7 +21,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/securecookie"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store"
)

View file

@ -20,8 +20,8 @@ package server
import (
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/logging"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/pubsub"
"github.com/woodpecker-ci/woodpecker/server/queue"
)

View file

@ -40,7 +40,7 @@ import (
"github.com/woodpecker-ci/woodpecker/server/queue"
"github.com/woodpecker-ci/woodpecker/server/shared"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/store"

View file

@ -1,7 +1,7 @@
package environments
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"strings"
)

View file

@ -1,7 +1,7 @@
package registry
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type combined struct {

View file

@ -1,7 +1,7 @@
package registry
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type db struct {

View file

@ -6,7 +6,7 @@ import (
"fmt"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/config/types"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"os"
"strings"
)

View file

@ -1,7 +1,7 @@
package secrets
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type builtin struct {

View file

@ -1,7 +1,7 @@
package sender
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type builtin struct {

View file

@ -3,7 +3,7 @@ package sender
import (
"fmt"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/plugins/internal"
)

View file

@ -19,8 +19,8 @@ import (
"net/http"
"net/url"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/internal"

View file

@ -20,7 +20,7 @@ import (
"net/http/httptest"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/fixtures"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/internal"

View file

@ -20,7 +20,7 @@ import (
"regexp"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/internal"
"golang.org/x/oauth2"

View file

@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/internal"
"github.com/franela/goblin"

View file

@ -19,7 +19,7 @@ import (
"io/ioutil"
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucket/internal"
)

View file

@ -29,7 +29,7 @@ import (
"strings"
"github.com/mrjones/oauth"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucketserver/internal"
)

View file

@ -23,7 +23,7 @@ import (
"time"
"github.com/mrjones/oauth"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucketserver/internal"
)

View file

@ -19,7 +19,7 @@ import (
"github.com/franela/goblin"
"github.com/mrjones/oauth"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucketserver/internal"
)

View file

@ -27,7 +27,7 @@ import (
"github.com/mrjones/oauth"
log "github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
const (

View file

@ -17,7 +17,7 @@ package bitbucketserver
import (
"encoding/json"
"fmt"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/bitbucketserver/internal"
"net/http"
)

View file

@ -20,8 +20,8 @@ import (
"net/http"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/remote/coding/internal"

View file

@ -20,7 +20,7 @@ import (
"net/http/httptest"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/coding/fixtures"
"github.com/franela/goblin"

View file

@ -22,7 +22,7 @@ import (
"regexp"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
const (

View file

@ -20,7 +20,7 @@ import (
"strings"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/coding/fixtures"
"github.com/franela/goblin"

View file

@ -20,7 +20,7 @@ import (
"net/http"
"net/url"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -28,8 +28,8 @@ import (
"path/filepath"
"code.gitea.io/sdk/gitea"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"golang.org/x/oauth2"

View file

@ -20,7 +20,7 @@ import (
"github.com/franela/goblin"
"github.com/gin-gonic/gin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gitea/fixtures"
)

View file

@ -23,7 +23,7 @@ import (
"time"
"code.gitea.io/sdk/gitea"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
// helper function that converts a Gitea repository to a Drone repository.

View file

@ -20,7 +20,7 @@ import (
"code.gitea.io/sdk/gitea"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gitea/fixtures"
)

View file

@ -19,7 +19,7 @@ import (
"net/http"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
const (

View file

@ -20,7 +20,7 @@ import (
"testing"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gitea/fixtures"
)

View file

@ -18,7 +18,7 @@ import (
"fmt"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/google/go-github/github"
)

View file

@ -18,7 +18,7 @@ import (
"testing"
"github.com/google/go-github/github"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/franela/goblin"
)

View file

@ -24,8 +24,8 @@ import (
"strconv"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/google/go-github/github"

View file

@ -18,7 +18,7 @@ import (
"net/http/httptest"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/github/fixtures"
"github.com/franela/goblin"

View file

@ -21,7 +21,7 @@ import (
"io/ioutil"
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
const (

View file

@ -20,7 +20,7 @@ import (
"testing"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/github/fixtures"
)

View file

@ -24,8 +24,8 @@ import (
"strconv"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/shared/oauth2"

View file

@ -20,7 +20,7 @@ import (
"testing"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gitlab/testdata"
)

View file

@ -24,8 +24,8 @@ import (
"strconv"
"strings"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/shared/oauth2"

View file

@ -20,7 +20,7 @@ import (
"testing"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gitlab3/testdata"
)

View file

@ -23,7 +23,7 @@ import (
"strings"
"github.com/gogits/go-gogs-client"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -18,7 +18,7 @@ import (
"net/http/httptest"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gogs/fixtures"
"github.com/franela/goblin"

View file

@ -23,7 +23,7 @@ import (
"time"
"github.com/gogits/go-gogs-client"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
// helper function that converts a Gogs repository to a Drone repository.

View file

@ -18,7 +18,7 @@ import (
"bytes"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote/gogs/fixtures"
"github.com/franela/goblin"

View file

@ -18,7 +18,7 @@ import (
"io"
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
const (

View file

@ -6,7 +6,7 @@ import (
http "net/http"
mock "github.com/stretchr/testify/mock"
model "github.com/woodpecker-ci/woodpecker/model"
model "github.com/woodpecker-ci/woodpecker/server/model"
remote "github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -19,7 +19,7 @@ package remote
import (
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"golang.org/x/net/context"
)

View file

@ -15,7 +15,7 @@
package middleware
import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/gin-gonic/gin"
"github.com/urfave/cli"

View file

@ -18,7 +18,7 @@ import (
"net/http"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/store"

View file

@ -17,7 +17,7 @@ package session
import (
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/token"

View file

@ -17,7 +17,7 @@ package shared
import (
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type UpdateBuildStore interface {

View file

@ -19,7 +19,7 @@ import (
"testing"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type mockUpdateBuildStore struct {

View file

@ -5,7 +5,7 @@ import (
"strings"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/remote/mocks"
"github.com/woodpecker-ci/woodpecker/server/shared"

View file

@ -23,7 +23,6 @@ import (
"strings"
"github.com/drone/envsubst"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
@ -31,6 +30,7 @@ import (
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/linter"
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/matrix"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -18,7 +18,7 @@ import (
"fmt"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
)

View file

@ -17,8 +17,8 @@ package shared
import (
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/pipeline/rpc"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type UpdateProcStore interface {

View file

@ -18,8 +18,8 @@ import (
"testing"
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/pipeline/rpc"
"github.com/woodpecker-ci/woodpecker/server/model"
)
type mockUpdateProcStore struct {

View file

@ -17,7 +17,7 @@ package shared
import (
"time"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/remote"
"github.com/woodpecker-ci/woodpecker/server/store"
)

View file

@ -19,7 +19,7 @@ import (
"time"
"github.com/russross/meddler"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/sql"
)

View file

@ -19,7 +19,7 @@ import (
"testing"
"github.com/franela/goblin"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
func TestBuilds(t *testing.T) {

View file

@ -18,7 +18,7 @@ import (
gosql "database/sql"
"github.com/russross/meddler"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/sql"
)

View file

@ -17,7 +17,7 @@ package datastore
import (
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
func TestConfig(t *testing.T) {

View file

@ -19,7 +19,7 @@ import (
"io"
"io/ioutil"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/sql"
"github.com/russross/meddler"

View file

@ -19,7 +19,7 @@ import (
"io/ioutil"
"testing"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/model"
)
func TestFileFind(t *testing.T) {

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