Skip to content

Commit

Permalink
chore: make all go packages internal (#313)
Browse files Browse the repository at this point in the history
Exposing nothing by default to keep our package API slim and later decide what to expose via `pkg`.
  • Loading branch information
robinbraemer authored Nov 16, 2020
1 parent 7d99694 commit 4334366
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion cmd/relationtuple/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"os"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/spf13/cobra"

Expand Down
2 changes: 1 addition & 1 deletion cmd/relationtuple/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/spf13/pflag"

Expand Down
8 changes: 4 additions & 4 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ import (
"os"
"sync"

"github.com/ory/keto/expand"
"github.com/ory/keto/internal/expand"

"github.com/ory/keto/check"
"github.com/ory/keto/internal/check"

"github.com/julienschmidt/httprouter"
"github.com/spf13/cobra"
"google.golang.org/grpc"

"github.com/ory/graceful"

"github.com/ory/keto/driver"
"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/driver"
"github.com/ory/keto/internal/relationtuple"

"github.com/ory/x/viperx"

Expand Down
2 changes: 1 addition & 1 deletion check/engine.go → internal/check/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions check/engine_test.go → internal/check/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"context"
"testing"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/ory/keto/check"
"github.com/ory/keto/internal/check"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/ory/keto/driver"
"github.com/ory/keto/internal/driver"
)

func TestEngine(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions check/handler.go → internal/check/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package check
import (
"net/http"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/julienschmidt/httprouter"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"
)

type (
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion driver/driver.go → internal/driver/driver.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package driver

import "github.com/ory/keto/driver/configuration"
import "github.com/ory/keto/internal/driver/configuration"

type Driver interface {
Configuration() configuration.Provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package driver
import (
"github.com/ory/x/logrusx"

"github.com/ory/keto/driver/configuration"
"github.com/ory/keto/internal/driver/configuration"
)

type DefaultDriver struct {
Expand Down
4 changes: 2 additions & 2 deletions driver/registry.go → internal/driver/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ory/x/logrusx"
"github.com/ory/x/tracing"

"github.com/ory/keto/driver/configuration"
"github.com/ory/keto/x"
"github.com/ory/keto/internal/driver/configuration"
"github.com/ory/keto/internal/x"
)

type Registry interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"github.com/ory/herodot"
"github.com/ory/x/logrusx"

"github.com/ory/keto/persistence"
"github.com/ory/keto/internal/persistence"

"github.com/ory/keto/expand"
"github.com/ory/keto/internal/expand"

"github.com/ory/keto/check"
"github.com/ory/keto/internal/check"

"github.com/ory/keto/persistence/memory"
"github.com/ory/keto/relationtuple"
"github.com/ory/keto/x"
"github.com/ory/keto/internal/persistence/memory"
"github.com/ory/keto/internal/relationtuple"
"github.com/ory/keto/internal/x"
)

var _ relationtuple.ManagerProvider = &RegistryDefault{}
Expand Down
2 changes: 1 addition & 1 deletion expand/engine.go → internal/expand/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package expand
import (
"context"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions expand/engine_test.go → internal/expand/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"context"
"testing"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/ory/keto/expand"
"github.com/ory/keto/internal/expand"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/ory/keto/driver"
"github.com/ory/keto/internal/driver"
)

func newTestEngine(_ *testing.T) (*driver.RegistryDefault, *expand.Engine) {
Expand Down
4 changes: 2 additions & 2 deletions expand/handler.go → internal/expand/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"net/http"
"strconv"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/julienschmidt/httprouter"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion expand/tree.go → internal/expand/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package expand
import (
"errors"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package persistence

import (
"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type Persister interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package memory
import (
"sync"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type Persister struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package memory
import (
"context"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"
)

type (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/ory/keto/relationtuple"
"github.com/ory/keto/internal/relationtuple"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"

"github.com/tidwall/gjson"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package relationtuple
import (
"context"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"
)

var _ RelationTupleServiceServer = &Server{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/ory/herodot"

"github.com/ory/keto/x"
"github.com/ory/keto/internal/x"
)

type (
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 4334366

Please sign in to comment.