Skip to content

Commit

Permalink
Merge pull request #9243 from mitake/auth-internal
Browse files Browse the repository at this point in the history
*: move "auth" to "internal/auth"
mitake authored Jan 29, 2018
2 parents ce0ad37 + 9c6c830 commit 0e2f9ea
Showing 27 changed files with 246 additions and 245 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-3.4.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
- Now `go get/install/build` on `etcd` packages (e.g. `clientv3`, `tools/benchmark`) enforce builds with etcd `vendor` directory.
- Reorganize [internal packages](https://github.com/coreos/etcd/issues/9220).
- Move `"github.com/coreos/etcd/alarm"` to [`"github.com/coreos/etcd/internal/alarm"`](https://github.com/coreos/etcd/pull/9234).
- Move `"github.com/coreos/etcd/auth"` to [`"github.com/coreos/etcd/internal/auth"`](https://github.com/coreos/etcd/pull/9243).
- Move `"github.com/coreos/etcd/compactor"` to [`"github.com/coreos/etcd/internal/compactor"`](https://github.com/coreos/etcd/pull/9234).
- Move `"github.com/coreos/etcd/discovery"` to [`"github.com/coreos/etcd/internal/discovery"`](https://github.com/coreos/etcd/pull/9233).
- Move `"github.com/coreos/etcd/lease"` to [`"github.com/coreos/etcd/internal/lease"`](https://github.com/coreos/etcd/pull/9238).
6 changes: 3 additions & 3 deletions Documentation/dev-guide/api_reference_v3.md
Original file line number Diff line number Diff line change
@@ -910,7 +910,7 @@ From google paxosdb paper: Our implementation hinges around a powerful primitive



##### message `Permission` (auth/authpb/auth.proto)
##### message `Permission` (internal/auth/authpb/auth.proto)

Permission is a single entity

@@ -922,7 +922,7 @@ Permission is a single entity



##### message `Role` (auth/authpb/auth.proto)
##### message `Role` (internal/auth/authpb/auth.proto)

Role is a single entry in the bucket authRoles

@@ -933,7 +933,7 @@ Role is a single entry in the bucket authRoles



##### message `User` (auth/authpb/auth.proto)
##### message `User` (internal/auth/authpb/auth.proto)

User is a single entry in the bucket authUsers

2 changes: 1 addition & 1 deletion clientv3/auth.go
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@ import (
"fmt"
"strings"

"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth/authpb"

"google.golang.org/grpc"
)
2 changes: 1 addition & 1 deletion clientv3/main_test.go
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ import (
"testing"
"time"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/pkg/testutil"
"golang.org/x/crypto/bcrypt"
)
2 changes: 1 addition & 1 deletion embed/serve_test.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import (
"os"
"testing"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/internal/auth"
)

// TestStartEtcdWrongToken ensures that StartEtcd with wrong configs returns with error.
2 changes: 1 addition & 1 deletion etcdserver/api/v3rpc/maintenance.go
Original file line number Diff line number Diff line change
@@ -19,10 +19,10 @@ import (
"crypto/sha256"
"io"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/mvcc"
"github.com/coreos/etcd/internal/mvcc/backend"
"github.com/coreos/etcd/pkg/types"
2 changes: 1 addition & 1 deletion etcdserver/api/v3rpc/util.go
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@ import (
"context"
"strings"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/lease"
"github.com/coreos/etcd/internal/mvcc"

2 changes: 1 addition & 1 deletion etcdserver/api/v3rpc/watch.go
Original file line number Diff line number Diff line change
@@ -20,10 +20,10 @@ import (
"sync"
"time"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/mvcc"
"github.com/coreos/etcd/internal/mvcc/mvccpb"
)
2 changes: 1 addition & 1 deletion etcdserver/apply.go
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ import (
"sort"
"time"

"github.com/coreos/etcd/auth"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/lease"
"github.com/coreos/etcd/internal/mvcc"
"github.com/coreos/etcd/internal/mvcc/mvccpb"
2 changes: 1 addition & 1 deletion etcdserver/apply_auth.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ package etcdserver
import (
"sync"

"github.com/coreos/etcd/auth"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/lease"
"github.com/coreos/etcd/internal/mvcc"
)
444 changes: 222 additions & 222 deletions etcdserver/etcdserverpb/rpc.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion etcdserver/etcdserverpb/rpc.proto
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package etcdserverpb;

import "gogoproto/gogo.proto";
import "etcd/internal/mvcc/mvccpb/kv.proto";
import "etcd/auth/authpb/auth.proto";
import "etcd/internal/auth/authpb/auth.proto";

// for grpc-gateway
import "google/api/annotations.proto";
2 changes: 1 addition & 1 deletion etcdserver/server.go
Original file line number Diff line number Diff line change
@@ -29,13 +29,13 @@ import (
"sync/atomic"
"time"

"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/etcdserver/api"
"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/etcdserver/stats"
"github.com/coreos/etcd/internal/alarm"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/compactor"
"github.com/coreos/etcd/internal/discovery"
"github.com/coreos/etcd/internal/lease"
2 changes: 1 addition & 1 deletion etcdserver/v3_server.go
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ import (
"encoding/binary"
"time"

"github.com/coreos/etcd/auth"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/internal/auth"
"github.com/coreos/etcd/internal/lease"
"github.com/coreos/etcd/internal/lease/leasehttp"
"github.com/coreos/etcd/internal/mvcc"
2 changes: 1 addition & 1 deletion integration/v3_auth_test.go
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ import (
"testing"
"time"

"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth/authpb"
"github.com/coreos/etcd/pkg/testutil"
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions auth/jwt_test.go → internal/auth/jwt_test.go
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ import (
)

const (
jwtPubKey = "../integration/fixtures/server.crt"
jwtPrivKey = "../integration/fixtures/server.key.insecure"
jwtPubKey = "../../integration/fixtures/server.crt"
jwtPrivKey = "../../integration/fixtures/server.key.insecure"
)

func TestJWTInfo(t *testing.T) {
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
package auth

import (
"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/internal/auth/authpb"
"github.com/coreos/etcd/internal/mvcc/backend"
"github.com/coreos/etcd/pkg/adt"
)
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ package auth
import (
"testing"

"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/internal/auth/authpb"
"github.com/coreos/etcd/pkg/adt"
)

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion auth/store.go → internal/auth/store.go
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ import (
"sync"
"sync/atomic"

"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth/authpb"
"github.com/coreos/etcd/internal/mvcc/backend"

"github.com/coreos/pkg/capnslog"
2 changes: 1 addition & 1 deletion auth/store_test.go → internal/auth/store_test.go
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ import (
"testing"
"time"

"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/internal/auth/authpb"
"github.com/coreos/etcd/internal/mvcc/backend"

"golang.org/x/crypto/bcrypt"
4 changes: 2 additions & 2 deletions scripts/genproto.sh
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ if [[ $(protoc --version | cut -f2 -d' ') != "3.5.1" ]]; then
fi

# directories containing protos to be built
DIRS="./wal/walpb ./etcdserver/etcdserverpb ./internal/raftsnap/snappb ./raft/raftpb ./internal/mvcc/mvccpb ./internal/lease/leasepb ./auth/authpb ./etcdserver/api/v3lock/v3lockpb ./etcdserver/api/v3election/v3electionpb"
DIRS="./wal/walpb ./etcdserver/etcdserverpb ./internal/raftsnap/snappb ./raft/raftpb ./internal/mvcc/mvccpb ./internal/lease/leasepb ./internal/auth/authpb ./etcdserver/api/v3lock/v3lockpb ./etcdserver/api/v3election/v3electionpb"

# exact version of packages to build
GOGO_PROTO_SHA="41168f6614b7bb144818ec8967b8c702705df564"
@@ -128,7 +128,7 @@ if [ "$1" = "-g" ]; then
echo "protodoc is updated"
popd

protodoc --directories="etcdserver/etcdserverpb=service_message,internal/mvcc/mvccpb=service_message,internal/lease/leasepb=service_message,auth/authpb=service_message" \
protodoc --directories="etcdserver/etcdserverpb=service_message,internal/mvcc/mvccpb=service_message,internal/lease/leasepb=service_message,internal/auth/authpb=service_message" \
--title="etcd API Reference" \
--output="Documentation/dev-guide/api_reference_v3.md" \
--message-only-from-this-file="etcdserver/etcdserverpb/rpc.proto" \

0 comments on commit 0e2f9ea

Please sign in to comment.