Skip to content

Commit

Permalink
refactor: rename pkg to server
Browse files Browse the repository at this point in the history
  • Loading branch information
nodece committed Jun 23, 2023
1 parent 23a4fc3 commit ed9d5ee
Show file tree
Hide file tree
Showing 38 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
go-version: 1.18

- name: Test
run: go test -v ./pkg/...
run: go test -v ./server/...
10 changes: 5 additions & 5 deletions cmd/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
"strings"
"time"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/pkg/cluster"
"github.com/casbin/casbin-mesh/pkg/core"
"github.com/casbin/casbin-mesh/pkg/store"
"github.com/casbin/casbin-mesh/pkg/transport/tcp"
"github.com/casbin/casbin-mesh/server/auth"
"github.com/casbin/casbin-mesh/server/cluster"
"github.com/casbin/casbin-mesh/server/core"
"github.com/casbin/casbin-mesh/server/store"
"github.com/casbin/casbin-mesh/server/transport/tcp"
"github.com/rs/cors"
"github.com/soheilhy/cmux"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/cluster/join.go → server/cluster/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"strings"
"time"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/server/auth"

"github.com/casbin/casbin-mesh/pkg/utils"
"github.com/casbin/casbin-mesh/server/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/join_test.go → server/cluster/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/server/auth"
)

const numAttempts int = 3
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/core/core.go → server/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package core
import (
"context"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/pkg/store"
"github.com/casbin/casbin-mesh/proto/command"
"github.com/casbin/casbin-mesh/server/auth"
"github.com/casbin/casbin-mesh/server/store"
)

type core struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/grpc.go → server/core/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"encoding/json"
"errors"

"github.com/casbin/casbin-mesh/pkg/auth"
grpc2 "github.com/casbin/casbin-mesh/pkg/handler/grpc"
"github.com/casbin/casbin-mesh/proto/command"
"github.com/casbin/casbin-mesh/server/auth"
grpc2 "github.com/casbin/casbin-mesh/server/handler/grpc"
_ "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/http.go → server/core/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"io/ioutil"
http2 "net/http"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/pkg/handler/http"
"github.com/casbin/casbin-mesh/server/auth"
"github.com/casbin/casbin-mesh/server/handler/http"
"github.com/go-playground/validator"
"golang.org/x/net/context"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/store/adapter.go → server/store/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package store
import (
"context"

"github.com/casbin/casbin-mesh/pkg/adapter"
"github.com/casbin/casbin-mesh/proto/command"
"github.com/casbin/casbin-mesh/server/adapter"
"github.com/golang/protobuf/proto"
"github.com/hashicorp/raft"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/config.go → server/store/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package store
import (
"log"

"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/server/auth"
)

// StoreConfig represents the configuration of the underlying Store.
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/enforcer.go → server/store/enforcer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"encoding/json"
"time"

_const "github.com/casbin/casbin-mesh/pkg/const"
_const "github.com/casbin/casbin-mesh/server/const"

"github.com/casbin/casbin/v2"

Expand Down
4 changes: 2 additions & 2 deletions pkg/store/fsm.go → server/store/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"sync"
"time"

"github.com/casbin/casbin-mesh/pkg/adapter"
"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/server/adapter"
"github.com/casbin/casbin-mesh/server/auth"

model2 "github.com/casbin/casbin/v2/model"

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pkg/store/store.go → server/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
"sync"
"time"

"github.com/casbin/casbin-mesh/pkg/adapter"
"github.com/casbin/casbin-mesh/pkg/auth"
"github.com/casbin/casbin-mesh/server/adapter"
"github.com/casbin/casbin-mesh/server/auth"

"github.com/golang/protobuf/proto"

"github.com/casbin/casbin-mesh/proto/command"

rlog "github.com/casbin/casbin-mesh/pkg/log"
rlog "github.com/casbin/casbin-mesh/server/log"
"github.com/hashicorp/raft"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ed9d5ee

Please sign in to comment.