management

package
v0.0.0-...-4e66fdd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyManager

type PolicyManager struct {
	Agent            policy.IAgent
	Store            *policy.Store
	SupportedSchemes []string
}

func CreatePolicyManagerFromConfig

func CreatePolicyManagerFromConfig(v *viper.Viper, name string) (*PolicyManager, error)

func NewPolicyManager

func NewPolicyManager(agent policy.IAgent, store *policy.Store, schemes []string) *PolicyManager

func (*PolicyManager) Activate

func (o *PolicyManager) Activate(
	ctx context.Context,
	tenantID string,
	scheme string,
	policyID uuid.UUID,
) error

func (*PolicyManager) DeactivateAll

func (o *PolicyManager) DeactivateAll(
	ctx context.Context,
	tenantID string,
	scheme string,
) error

func (*PolicyManager) GetActive

func (o *PolicyManager) GetActive(
	ctx context.Context,
	tenantID string,
	scheme string,
) (*policy.Policy, error)

func (*PolicyManager) GetPolicies

func (o *PolicyManager) GetPolicies(
	ctx context.Context,
	tenantID string,
	scheme string,
	name string,
) ([]*policy.Policy, error)

func (*PolicyManager) GetPolicy

func (o *PolicyManager) GetPolicy(
	ctx context.Context,
	tenantID string,
	scheme string,
	policyID uuid.UUID,
) (*policy.Policy, error)

func (*PolicyManager) IsSchemeSupported

func (o *PolicyManager) IsSchemeSupported(scheme string) bool

func (*PolicyManager) Update

func (o *PolicyManager) Update(
	ctx context.Context,
	tenantID string,
	scheme string,
	name string,
	rules string,
) (*policy.Policy, error)

func (*PolicyManager) Validate

func (o *PolicyManager) Validate(ctx context.Context, policyRules string) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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