Skip to content

Commit

Permalink
Move ruletypes from internal to pkg
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov committed Oct 24, 2024
1 parent 828a944 commit 9e7abf0
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_evalstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
propSvc "github.com/mindersec/minder/internal/entities/properties/service"
"github.com/mindersec/minder/internal/history"
ghprop "github.com/mindersec/minder/internal/providers/github/properties"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/mindersec/minder/internal/logger"
prof "github.com/mindersec/minder/internal/profiles"
ghprop "github.com/mindersec/minder/internal/providers/github/properties"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

// CreateProfile creates a profile for a project
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_ruletype.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/engcontext"
"github.com/mindersec/minder/internal/logger"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/handlers_ruletype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
mockdb "github.com/mindersec/minder/database/mock"
df "github.com/mindersec/minder/database/mock/fixtures"
db "github.com/mindersec/minder/internal/db"
sf "github.com/mindersec/minder/internal/ruletypes/mock/fixtures"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
sf "github.com/mindersec/minder/pkg/ruletypes/mock/fixtures"
)

func TestCreateRuleType(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/controlplane/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ import (
"github.com/mindersec/minder/internal/providers/session"
reposvc "github.com/mindersec/minder/internal/repositories"
"github.com/mindersec/minder/internal/roles"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util"
pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

const metricsPath = "/metrics"
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/rtengine/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/ingestcache"
eoptions "github.com/mindersec/minder/internal/engine/options"
"github.com/mindersec/minder/internal/ruletypes"
rtengine2 "github.com/mindersec/minder/pkg/engine/v1/rtengine"
provinfv1 "github.com/mindersec/minder/pkg/providers/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

// Cache contains a set of RuleTypeEngine instances
Expand Down
2 changes: 1 addition & 1 deletion internal/marketplaces/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/mindersec/minder/internal/config/server"
sub "github.com/mindersec/minder/internal/marketplaces/subscriptions"
"github.com/mindersec/minder/internal/profiles"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/pkg/mindpak"
src "github.com/mindersec/minder/pkg/mindpak/sources"
"github.com/mindersec/minder/pkg/ruletypes"
)

// NewMarketplaceFromServiceConfig takes the Minder service config and
Expand Down
2 changes: 1 addition & 1 deletion internal/marketplaces/subscriptions/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (

"github.com/mindersec/minder/internal/db"
profsvc "github.com/mindersec/minder/internal/profiles"
"github.com/mindersec/minder/internal/ruletypes"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/mindpak"
"github.com/mindersec/minder/pkg/mindpak/reader"
"github.com/mindersec/minder/pkg/ruletypes"
)

//go:generate go run go.uber.org/mock/mockgen -package mock_$GOPACKAGE -destination=./mock/$GOFILE -source=./$GOFILE
Expand Down
4 changes: 2 additions & 2 deletions internal/marketplaces/subscriptions/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"github.com/mindersec/minder/internal/marketplaces/subscriptions"
"github.com/mindersec/minder/internal/profiles"
psf "github.com/mindersec/minder/internal/profiles/mock/fixtures"
"github.com/mindersec/minder/internal/ruletypes"
rsf "github.com/mindersec/minder/internal/ruletypes/mock/fixtures"
"github.com/mindersec/minder/pkg/mindpak/reader"
"github.com/mindersec/minder/pkg/ruletypes"
rsf "github.com/mindersec/minder/pkg/ruletypes/mock/fixtures"
)

func TestSubscriptionService_Subscribe(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/profiles/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

"github.com/mindersec/minder/internal/db"
"github.com/mindersec/minder/internal/engine/selectors"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util"
minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

// Validator encapsulates the logic for validating profiles
Expand Down
2 changes: 1 addition & 1 deletion internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (
"github.com/mindersec/minder/internal/reminderprocessor"
"github.com/mindersec/minder/internal/repositories"
"github.com/mindersec/minder/internal/roles"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/pkg/ruletypes"
)

// AllInOneServerService is a helper function that starts the gRPC and HTTP servers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package fixtures
import (
"errors"

mockrulesvc "github.com/mindersec/minder/internal/ruletypes/mock"
mockrulesvc "github.com/mindersec/minder/pkg/ruletypes/mock"
"go.uber.org/mock/gomock"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

"github.com/mindersec/minder/internal/db"
dbf "github.com/mindersec/minder/internal/db/fixtures"
"github.com/mindersec/minder/internal/ruletypes"
"github.com/mindersec/minder/internal/util/ptr"
pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1"
"github.com/mindersec/minder/pkg/ruletypes"
)

// both create and update are bundled together since the testing harness is
Expand Down
File renamed without changes.

0 comments on commit 9e7abf0

Please sign in to comment.