Documentation ¶
Overview ¶
Package marketplaces holds logic for the importing rule types and profiles from bundles into projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Marketplace ¶
type Marketplace interface { // Subscribe creates a subscription between the specified project and // bundle and adds all rules from that bundle to the project. Subscribe( ctx context.Context, projectID uuid.UUID, bundleID mindpak.BundleID, qtx db.Querier, ) error // AddProfile adds the specified profile from the bundle to the project. AddProfile( ctx context.Context, projectID uuid.UUID, bundleID mindpak.BundleID, profileName string, qtx db.Querier, ) error }
Marketplace encapsulates the operations which allow profiles and rule types from bundles to projects. Subscriptions are implicitly created and managed by these operations.
func NewMarketplace ¶
func NewMarketplace(sources []src.BundleSource, subscriptions sub.SubscriptionService) (Marketplace, error)
NewMarketplace creates an instance of Marketplace with a single source
func NewMarketplaceFromServiceConfig ¶
func NewMarketplaceFromServiceConfig( config server.MarketplaceConfig, profile profiles.ProfileService, ruleType ruletypes.RuleTypeService, ) (Marketplace, error)
NewMarketplaceFromServiceConfig takes the Minder service config and instantiates the object graph needed for the Marketplace. If the marketplace functionality is disabled in the config or missing, this returns a no-op implementation of Marketplace. Otherwise, it loads the bundle specified in the service config and builds a single-source Marketplace for it.
func NewNoopMarketplace ¶
func NewNoopMarketplace() Marketplace
NewNoopMarketplace returns an instance of Marketplace which does nothing when any methods are called.
Directories ¶
Path | Synopsis |
---|---|
bundles
|
|
mock
Package mockbundle is a generated GoMock package.
|
Package mockbundle is a generated GoMock package. |
mock/fixtures
Package fixtures contains code for creating bundle fixtures and is used in various parts of the code.
|
Package fixtures contains code for creating bundle fixtures and is used in various parts of the code. |
Package namespaces contains logic relating to the namespacing of Rule Types and Profiles
|
Package namespaces contains logic relating to the namespacing of Rule Types and Profiles |
Package subscriptions contains logic relating to the concept of `subscriptions` - which describe a linkage between a project and a marketplace bundle
|
Package subscriptions contains logic relating to the concept of `subscriptions` - which describe a linkage between a project and a marketplace bundle |
mock
Package mock_subscriptions is a generated GoMock package.
|
Package mock_subscriptions is a generated GoMock package. |
mock/fixtures
Package fixtures contains code for creating subscription fixtures and is used in various parts of the code.
|
Package fixtures contains code for creating subscription fixtures and is used in various parts of the code. |