Skip to content

Commit

Permalink
rename models to pkg (fatedier#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier authored Sep 23, 2020
1 parent 710ecf4 commit 3fbdea0
Show file tree
Hide file tree
Showing 111 changed files with 196 additions and 196 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ test: gotest

gotest:
go test -v --cover ./assets/...
go test -v --cover ./client/...
go test -v --cover ./cmd/...
go test -v --cover ./models/...
go test -v --cover ./client/...
go test -v --cover ./server/...
go test -v --cover ./utils/...
go test -v --cover ./pkg/...

ci:
go test -count=1 -p=1 -v ./tests/...
Expand Down
2 changes: 1 addition & 1 deletion client/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"time"

"github.com/fatedier/frp/assets"
frpNet "github.com/fatedier/frp/utils/net"
frpNet "github.com/fatedier/frp/pkg/util/net"

"github.com/gorilla/mux"
)
Expand Down
4 changes: 2 additions & 2 deletions client/admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"strings"

"github.com/fatedier/frp/client/proxy"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/utils/log"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/util/log"
)

type GeneralResponse struct {
Expand Down
12 changes: 6 additions & 6 deletions client/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"time"

"github.com/fatedier/frp/client/proxy"
"github.com/fatedier/frp/models/auth"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/models/transport"
frpNet "github.com/fatedier/frp/utils/net"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/auth"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/transport"
frpNet "github.com/fatedier/frp/pkg/util/net"
"github.com/fatedier/frp/pkg/util/xlog"

"github.com/fatedier/golib/control/shutdown"
"github.com/fatedier/golib/crypto"
Expand Down
2 changes: 1 addition & 1 deletion client/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package event
import (
"errors"

"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/pkg/msg"
)

type Type int
Expand Down
2 changes: 1 addition & 1 deletion client/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/http"
"time"

"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/util/xlog"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions client/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import (
"sync"
"time"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
plugin "github.com/fatedier/frp/models/plugin/client"
"github.com/fatedier/frp/models/proto/udp"
"github.com/fatedier/frp/utils/limit"
frpNet "github.com/fatedier/frp/utils/net"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
plugin "github.com/fatedier/frp/pkg/plugin/client"
"github.com/fatedier/frp/pkg/proto/udp"
"github.com/fatedier/frp/pkg/util/limit"
frpNet "github.com/fatedier/frp/pkg/util/net"
"github.com/fatedier/frp/pkg/util/xlog"

"github.com/fatedier/golib/errors"
frpIo "github.com/fatedier/golib/io"
Expand Down
6 changes: 3 additions & 3 deletions client/proxy/proxy_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"

"github.com/fatedier/frp/client/event"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/util/xlog"

"github.com/fatedier/golib/errors"
)
Expand Down
6 changes: 3 additions & 3 deletions client/proxy/proxy_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/fatedier/frp/client/event"
"github.com/fatedier/frp/client/health"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/util/xlog"

"github.com/fatedier/golib/errors"
)
Expand Down
16 changes: 8 additions & 8 deletions client/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"crypto/tls"
"fmt"
"github.com/fatedier/frp/models/transport"
"io/ioutil"
"net"
"runtime"
Expand All @@ -27,13 +26,14 @@ import (
"time"

"github.com/fatedier/frp/assets"
"github.com/fatedier/frp/models/auth"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/utils/log"
frpNet "github.com/fatedier/frp/utils/net"
"github.com/fatedier/frp/utils/version"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/auth"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/transport"
"github.com/fatedier/frp/pkg/util/log"
frpNet "github.com/fatedier/frp/pkg/util/net"
"github.com/fatedier/frp/pkg/util/version"
"github.com/fatedier/frp/pkg/util/xlog"

fmux "github.com/hashicorp/yamux"
)
Expand Down
12 changes: 6 additions & 6 deletions client/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"sync"
"time"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/models/proto/udp"
frpNet "github.com/fatedier/frp/utils/net"
"github.com/fatedier/frp/utils/util"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/proto/udp"
frpNet "github.com/fatedier/frp/pkg/util/net"
"github.com/fatedier/frp/pkg/util/util"
"github.com/fatedier/frp/pkg/util/xlog"

"github.com/fatedier/golib/errors"
frpIo "github.com/fatedier/golib/io"
Expand Down
4 changes: 2 additions & 2 deletions client/visitor_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"sync"
"time"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/utils/xlog"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/util/xlog"
)

type VisitorManager struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"os"
"strings"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/spf13/cobra"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/frpc/sub/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/spf13/cobra"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/frpc/sub/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"os"
"strings"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"

"github.com/fatedier/frp/models/config"
"github.com/spf13/cobra"
)

func init() {
Expand Down
12 changes: 6 additions & 6 deletions cmd/frpc/sub/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
"syscall"
"time"

"github.com/spf13/cobra"

"github.com/fatedier/frp/client"
"github.com/fatedier/frp/models/auth"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/utils/log"
"github.com/fatedier/frp/utils/version"
"github.com/fatedier/frp/pkg/auth"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/util/log"
"github.com/fatedier/frp/pkg/util/version"

"github.com/spf13/cobra"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"os"
"strings"

"github.com/fatedier/frp/client"
"github.com/fatedier/frp/pkg/config"

"github.com/rodaine/table"
"github.com/spf13/cobra"

"github.com/fatedier/frp/client"
"github.com/fatedier/frp/models/config"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/stcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/spf13/cobra"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/sudp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/spf13/cobra"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/frpc/sub/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/spf13/cobra"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/frpc/sub/tcpmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/spf13/cobra"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/spf13/cobra"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/frpc/sub/xtcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/consts"

"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/consts"
"github.com/spf13/cobra"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/frps/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/fatedier/golib/crypto"

_ "github.com/fatedier/frp/assets/frps/statik"
_ "github.com/fatedier/frp/models/metrics"
_ "github.com/fatedier/frp/pkg/metrics"
)

func main() {
Expand Down
14 changes: 7 additions & 7 deletions cmd/frps/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"

"github.com/fatedier/frp/models/auth"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/pkg/auth"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/util/log"
"github.com/fatedier/frp/pkg/util/util"
"github.com/fatedier/frp/pkg/util/version"
"github.com/fatedier/frp/server"
"github.com/fatedier/frp/utils/log"
"github.com/fatedier/frp/utils/util"
"github.com/fatedier/frp/utils/version"

"github.com/spf13/cobra"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions models/auth/auth.go → pkg/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package auth
import (
"fmt"

"github.com/fatedier/frp/models/consts"
"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/pkg/consts"
"github.com/fatedier/frp/pkg/msg"

"github.com/vaughan0/go-ini"
)
Expand Down
2 changes: 1 addition & 1 deletion models/auth/oidc.go → pkg/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"fmt"

"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/pkg/msg"

"github.com/coreos/go-oidc"
"github.com/vaughan0/go-ini"
Expand Down
4 changes: 2 additions & 2 deletions models/auth/token.go → pkg/auth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"time"

"github.com/fatedier/frp/models/msg"
"github.com/fatedier/frp/utils/util"
"github.com/fatedier/frp/pkg/msg"
"github.com/fatedier/frp/pkg/util/util"

"github.com/vaughan0/go-ini"
)
Expand Down
Loading

0 comments on commit 3fbdea0

Please sign in to comment.