rules

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package rules package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRuleEnforcer

type MockRuleEnforcer struct {
	mock.Mock
}

MockRuleEnforcer is an autogenerated mock type for the RuleEnforcer type

func NewMockRuleEnforcer

func NewMockRuleEnforcer(t mockConstructorTestingTNewMockRuleEnforcer) *MockRuleEnforcer

NewMockRuleEnforcer creates a new instance of MockRuleEnforcer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRuleEnforcer) EnforceRules

func (_m *MockRuleEnforcer) EnforceRules(ctx context.Context, managedIdentity *models.ManagedIdentity, input *RunDetails) error

EnforceRules provides a mock function with given fields: ctx, managedIdentity, input

type RuleEnforcer

type RuleEnforcer interface {
	EnforceRules(ctx context.Context, managedIdentity *models.ManagedIdentity, input *RunDetails) error
}

RuleEnforcer is used to enforce managed identity access rules

func NewRuleEnforcer

func NewRuleEnforcer(dbClient *db.Client) RuleEnforcer

NewRuleEnforcer returns a new RuleEnforcer instance

type RunDetails

type RunDetails struct {
	ModuleID              *string
	ModuleSource          *string
	CurrentStateVersionID *string
	RunStage              models.JobType
	ModuleDigest          []byte
}

RunDetails is the input for enforcing rules

Jump to

Keyboard shortcuts

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