Skip to content

Commit

Permalink
Move config from internal to pkg
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
  • Loading branch information
rdimitrov committed Oct 24, 2024
1 parent 693862c commit 193e8e9
Show file tree
Hide file tree
Showing 117 changed files with 121 additions and 121 deletions.
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/auth_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/spf13/viper"
"google.golang.org/grpc"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util/cli"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// loginCmd represents the login command
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/auth_logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// logoutCmd represents the logout command
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/auth_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

var tokenCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/offline_token/offline_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/spf13/viper"
"google.golang.org/grpc"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// offlineTokenGetCmd represents the offline-token get command
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/offline_token/offline_revoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/spf13/viper"
"google.golang.org/grpc"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// offlineTokenRevokeCmd represents the offline-token use command
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/offline_token/offline_use.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/spf13/viper"
"google.golang.org/grpc"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// offlineTokenUseCmd represents the offline-token use command
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/constants"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/set_project/set_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"gopkg.in/yaml.v3"

"github.com/mindersec/minder/cmd/cli/app"
"github.com/mindersec/minder/internal/config"
clientconfig "github.com/mindersec/minder/internal/config/client"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
clientconfig "github.com/mindersec/minder/pkg/config/client"
)

// SetProjectCmd is the cd command
Expand Down
2 changes: 1 addition & 1 deletion cmd/dev/app/rule_type/rttst.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/spf13/viper"
"google.golang.org/protobuf/reflect/protoreflect"

serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/actions"
"github.com/mindersec/minder/internal/engine/entities"
Expand All @@ -40,6 +39,7 @@ import (
"github.com/mindersec/minder/internal/providers/telemetry"
"github.com/mindersec/minder/internal/util/jsonyaml"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
serverconfig "github.com/mindersec/minder/pkg/config/server"
"github.com/mindersec/minder/pkg/engine/v1/rtengine"
provifv1 "github.com/mindersec/minder/pkg/providers/v1"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dev/app/testserver/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ import (
"github.com/mindersec/minder/internal/auth"
noopauth "github.com/mindersec/minder/internal/auth/jwt/noop"
mockauthz "github.com/mindersec/minder/internal/authz/mock"
"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/controlplane/metrics"
"github.com/mindersec/minder/internal/db/embedded"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/internal/metrics/meters"
"github.com/mindersec/minder/internal/providers/ratecache"
provtelemetry "github.com/mindersec/minder/internal/providers/telemetry"
"github.com/mindersec/minder/internal/service"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// CmdTestServer starts a test server for integration testing.
Expand Down
4 changes: 2 additions & 2 deletions cmd/reminder/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
reminderconfig "github.com/mindersec/minder/internal/config/reminder"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
reminderconfig "github.com/mindersec/minder/pkg/config/reminder"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/reminder/app/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/spf13/viper"
"golang.org/x/sync/errgroup"

"github.com/mindersec/minder/internal/config"
reminderconfig "github.com/mindersec/minder/internal/config/reminder"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/reminder"
"github.com/mindersec/minder/internal/reminder/logger"
"github.com/mindersec/minder/pkg/config"
reminderconfig "github.com/mindersec/minder/pkg/config/reminder"
)

var startCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/app/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/rs/zerolog"
"github.com/spf13/cobra"

serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/db"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// This file contains logic shared between different commands.
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/encryption_purge_sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// purgeCmd represents the `encryption purge-sessions` command
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/encryption_rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/crypto"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// number of secrets to re-encrypt per batch
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/history_purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// historyPurgeCmd represents the `history purge` command
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/migrate_down.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/spf13/viper"

"github.com/mindersec/minder/database"
"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

var downCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/migrate_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

"github.com/mindersec/minder/database"
"github.com/mindersec/minder/internal/authz"
"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// upCmd represents the up command
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/migrate_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/spf13/viper"

"github.com/mindersec/minder/database"
"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// versionCmd represents the version command
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/util/cli"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import (
"github.com/mindersec/minder/internal/auth/jwt"
"github.com/mindersec/minder/internal/auth/keycloak"
"github.com/mindersec/minder/internal/authz"
"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
cpmetrics "github.com/mindersec/minder/internal/controlplane/metrics"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/internal/metrics/meters"
"github.com/mindersec/minder/internal/providers/ratecache"
provtelemetry "github.com/mindersec/minder/internal/providers/telemetry"
"github.com/mindersec/minder/internal/service"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

var serveCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/webhook_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/mindersec/minder/internal/config"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/controlplane/metrics"
"github.com/mindersec/minder/internal/crypto"
"github.com/mindersec/minder/internal/db"
Expand All @@ -30,6 +28,8 @@ import (
"github.com/mindersec/minder/internal/providers/manager"
"github.com/mindersec/minder/internal/providers/ratecache"
"github.com/mindersec/minder/internal/providers/telemetry"
"github.com/mindersec/minder/pkg/config"
serverconfig "github.com/mindersec/minder/pkg/config/server"
provifv1 "github.com/mindersec/minder/pkg/providers/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/auth/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"net/url"

"github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/pkg/config/server"
)

// GetUserForGitHubId looks up a user in Keycloak by their GitHub ID. This is a temporary
Expand Down
2 changes: 1 addition & 1 deletion internal/auth/keycloak/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"github.com/mindersec/minder/internal/auth"
"github.com/mindersec/minder/internal/auth/keycloak/client"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/util/ptr"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// KeyCloak is an implementation of the auth.IdentityProvider interface.
Expand Down
2 changes: 1 addition & 1 deletion internal/auth/keycloak/keycloak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/stretchr/testify/assert"

"github.com/mindersec/minder/internal/auth/keycloak/client"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/util/ptr"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

func TestKeyCloak_Resolve(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/authz/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"k8s.io/client-go/transport"

"github.com/mindersec/minder/internal/auth/jwt"
srvconfig "github.com/mindersec/minder/internal/config/server"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
srvconfig "github.com/mindersec/minder/pkg/config/server"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/authz/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/mindersec/minder/internal/auth/jwt"
"github.com/mindersec/minder/internal/authz"
srvconfig "github.com/mindersec/minder/internal/config/server"
srvconfig "github.com/mindersec/minder/pkg/config/server"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/mindersec/minder/internal/auth/jwt/noop"
"github.com/mindersec/minder/internal/authz"
"github.com/mindersec/minder/internal/authz/mock"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/engcontext"
"github.com/mindersec/minder/internal/flags"
Expand All @@ -42,6 +41,7 @@ import (
mockroles "github.com/mindersec/minder/internal/roles/mock"
"github.com/mindersec/minder/internal/util"
minder "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
serverconfig "github.com/mindersec/minder/pkg/config/server"
)

// Mock for HasProtoContext
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
mockdb "github.com/mindersec/minder/database/mock"
"github.com/mindersec/minder/internal/auth/jwt"
mockjwt "github.com/mindersec/minder/internal/auth/jwt/mock"
serverconfig "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/controlplane/metrics"
"github.com/mindersec/minder/internal/crypto"
"github.com/mindersec/minder/internal/db"
Expand All @@ -51,6 +50,7 @@ import (
mockmanager "github.com/mindersec/minder/internal/providers/manager/mock"
"github.com/mindersec/minder/internal/providers/session"
pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
serverconfig "github.com/mindersec/minder/pkg/config/server"
provinfv1 "github.com/mindersec/minder/pkg/providers/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/types/known/structpb"

config "github.com/mindersec/minder/internal/config/server"
"github.com/mindersec/minder/internal/crypto"
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/engcontext"
"github.com/mindersec/minder/internal/providers"
"github.com/mindersec/minder/internal/util"
cursorutil "github.com/mindersec/minder/internal/util/cursor"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
config "github.com/mindersec/minder/pkg/config/server"
)

// CreateProvider implements the CreateProvider RPC method.
Expand Down
Loading

0 comments on commit 193e8e9

Please sign in to comment.