usecase

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 4 Imported by: 0

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