Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move most packages to the internal package #941

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cli/app/artifact/artifact_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/policy/table_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"google.golang.org/protobuf/types/known/structpb"
"gopkg.in/yaml.v2"

"github.com/stacklok/mediator/pkg/entities"
"github.com/stacklok/mediator/internal/entities"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/policy_status/policy_status_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/spf13/viper"

"github.com/stacklok/mediator/cmd/cli/app"
"github.com/stacklok/mediator/internal/entities"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/entities"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/provider/provider_enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"github.com/spf13/viper"
"google.golang.org/protobuf/types/known/timestamppb"

ghclient "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// Response is the response from the OAuth callback server.
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/repo/repo_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/spf13/viper"

"github.com/stacklok/mediator/cmd/cli/app"
github "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
github "github.com/stacklok/mediator/pkg/providers/github"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/repo/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

github "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
github "github.com/stacklok/mediator/pkg/providers/github"
)

// repo_listCmd represents the list command to list repos with the
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/repo/repo_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

github "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
github "github.com/stacklok/mediator/pkg/providers/github"
)

// repo_registerCmd represents the register command to register a repo with the
Expand Down
4 changes: 2 additions & 2 deletions cmd/dev/app/rule_type/rule_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"github.com/stacklok/mediator/cmd/dev/app"
"github.com/stacklok/mediator/internal/engine"
"github.com/stacklok/mediator/internal/engine/eval/rego"
"github.com/stacklok/mediator/internal/entities"
ghclient "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/entities"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// TestCmd is the root command for the rule subcommands
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/config"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/app/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"golang.org/x/sync/errgroup"

"github.com/stacklok/mediator/internal/config"
"github.com/stacklok/mediator/internal/controlplane"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/engine"
"github.com/stacklok/mediator/internal/events"
"github.com/stacklok/mediator/internal/logger"
"github.com/stacklok/mediator/internal/reconcilers"
"github.com/stacklok/mediator/pkg/controlplane"
)

var serveCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ flowchart LR
grpc>GRPC endpoint]
click grpc "/api" "GRPC auto-generated documentation"
web>HTTP endpoint]
click web "https://github.com/stacklok/mediator/blob/main/pkg/controlplane/server.go#L210" "Webserver URL registration code"
click web "https://github.com/stacklok/mediator/blob/main/internal/controlplane/server.go#L210" "Webserver URL registration code"
events("watermill")
click events "https://watermill.io/docs" "Watermill event processing library"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"

ghclient "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// REGISTRY is the default registry
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

"github.com/stacklok/mediator/internal/auth"
mcrypto "github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
"google.golang.org/grpc/metadata"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/config"
mcrypto "github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
github "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
mediator "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
github "github.com/stacklok/mediator/pkg/providers/github"
)

func parseToken(token string, store db.Store) (auth.UserClaims, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/pkg/auth"
"github.com/stacklok/mediator/internal/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/stacklok/mediator/internal/container"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/engine"
"github.com/stacklok/mediator/internal/providers"
ghclient "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/container"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
"github.com/stacklok/mediator/pkg/providers"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// CONTAINER_TYPE is the type for container artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"google.golang.org/grpc/codes"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/config"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/stacklok/mediator/internal/auth"
mcrypto "github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// GetAuthorizationURL returns the URL to redirect the user to for authorization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"google.golang.org/grpc/codes"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

func TestNewOAuthConfig(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/engine"
"github.com/stacklok/mediator/internal/entities"
ghclient "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/reconcilers"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
"github.com/stacklok/mediator/pkg/entities"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// authAndContextValidation is a helper function to initialize entity context info and validate input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/gh/queries"
github "github.com/stacklok/mediator/internal/providers/github"
"github.com/stacklok/mediator/internal/reconcilers"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
github "github.com/stacklok/mediator/pkg/providers/github"
)

// RegisterRepository adds repositories to the database and registers a webhook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/stacklok/mediator/internal/auth"
mcrypto "github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

mockdb "github.com/stacklok/mediator/database/mock"
"github.com/stacklok/mediator/internal/auth"
"github.com/stacklok/mediator/internal/config"
"github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/events"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/auth"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/engine/entity_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/reflect/protoreflect"

"github.com/stacklok/mediator/internal/entities"
"github.com/stacklok/mediator/internal/events"
"github.com/stacklok/mediator/internal/util"
"github.com/stacklok/mediator/pkg/entities"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/engine/eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/stacklok/mediator/internal/engine/eval/rego"
"github.com/stacklok/mediator/internal/engine/eval/vulncheck"
engif "github.com/stacklok/mediator/internal/engine/interfaces"
ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

// NewRuleEvaluator creates a new rule data evaluator
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/eval/vulncheck/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"context"
"fmt"

ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

type prStatusHandler interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/eval/vulncheck/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/google/go-github/v53/github"
"github.com/rs/zerolog"

ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/eval/vulncheck/vulncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"

engif "github.com/stacklok/mediator/internal/engine/interfaces"
ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/engine/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/stacklok/mediator/internal/crypto"
"github.com/stacklok/mediator/internal/db"
"github.com/stacklok/mediator/internal/events"
"github.com/stacklok/mediator/internal/providers"
ghclient "github.com/stacklok/mediator/internal/providers/github"
pb "github.com/stacklok/mediator/pkg/generated/protobuf/go/mediator/v1"
"github.com/stacklok/mediator/pkg/providers"
ghclient "github.com/stacklok/mediator/pkg/providers/github"
)

const (
Expand Down
Loading