subscriptions

package
v0.0.69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package subscriptions contains logic relating to the concept of `subscriptions` - which describe a linkage between a project and a marketplace bundle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubscriptionService

type SubscriptionService interface {
	// Subscribe creates a subscription record for the specified project
	// and bundle. It is a no-op if the project is already subscribed.
	Subscribe(
		ctx context.Context,
		projectID uuid.UUID,
		bundle reader.BundleReader,
		qtx db.Querier,
	) error
	// CreateProfile creates the specified profile from the bundle in the project.
	CreateProfile(
		ctx context.Context,
		projectID uuid.UUID,
		bundle reader.BundleReader,
		profileName string,
		qtx db.Querier,
	) error
}

SubscriptionService defines operations on the subscriptions, as well as the profiles and rules linked to subscriptions It is assumed that all methods will be called in the context of a transaction, and they take

func NewSubscriptionService

func NewSubscriptionService(
	profiles profsvc.ProfileService,
	rules ruletypes.RuleTypeService,
) SubscriptionService

NewSubscriptionService creates an instance of the SubscriptionService interface

Directories

Path Synopsis
Package mock_subscriptions is a generated GoMock package.
Package mock_subscriptions is a generated GoMock package.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL