usecase

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RetryDeploymentResponseErrorMessage = "RetryGetDeploymentAuthorizationErrors"

RetryDeploymentResponseErrorMessage is the error message returned by a deployment authorization checker when it wants the deployment to be retried

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomRoleCreatorModifier

type CustomRoleCreatorModifier interface {
	CreateUpdateCustomRole(subscription string, role domain.Role, permissions []string) (error, []string)
	DeleteCustomRole(subscription string, role domain.Role) error
}

type DeploymentAuthorizationChecker

type DeploymentAuthorizationChecker interface {

	// Check if the user has the required permissions to deploy the template
	// If Authorization Error is received the authorization error message string is returned, and error is nil
	// If string is empty and error is not nill, then non authorization error is received
	// If string is empty and error is nil, then authorization is successful
	GetDeploymentAuthorizationErrors(mpfCoreConfig domain.MPFConfig) (string, error)
}

type DeploymentAuthorizationCheckerCleaner

type DeploymentAuthorizationCheckerCleaner interface {
	DeploymentAuthorizationChecker
	DeploymentCleaner
}

type DeploymentCleaner

type DeploymentCleaner interface {
	CleanDeployment(mpfCoreConfig domain.MPFConfig) error
}

type MPFService

type MPFService struct {
	// contains filtered or unexported fields
}

func NewMPFService

func NewMPFService(ctx context.Context, rgMgr ResourceGroupManager, spRoleAssgnMgr ServicePrincipalRolemAssignmentManager, deploymentAuthChkCln DeploymentAuthorizationCheckerCleaner, mpfConfig domain.MPFConfig, initialPermissionsToAdd []string, permissionsToAddToResult []string, autoAddReadPermissionForEachWrite bool, autoAddDeletePermissionForEachWrite bool, autoCreateResourceGroup bool) *MPFService

func (*MPFService) CleanUpResources

func (s *MPFService) CleanUpResources()

func (*MPFService) GetMinimumPermissionsRequired

func (s *MPFService) GetMinimumPermissionsRequired() (domain.MPFResult, error)

type ResourceGroupManager

type ResourceGroupManager interface {
	CreateResourceGroup(ctx context.Context, rgName, location string) error
	DeleteResourceGroup(ctx context.Context, rgName string) error
}

type ServicePrincipalAssignmentModifier

type ServicePrincipalAssignmentModifier interface {
	DetachRolesFromSP(ctx context.Context, subscription string, SPOBjectID string, role domain.Role) error
	AssignRoleToSP(subscription string, SPOBjectID string, role domain.Role) error
}

type ServicePrincipalRolemAssignmentManager

type ServicePrincipalRolemAssignmentManager interface {
	ServicePrincipalAssignmentModifier
	CustomRoleCreatorModifier
}

Jump to

Keyboard shortcuts

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