policy_loader

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Description string `json:"description,omitempty"`
}

Node loads and resolves .risk-guard.yml policy from the cloned repository

func NewNode

func NewNode() *Node

NewNode creates a new policy loader node

func (*Node) CreateSkippedOutput

func (n *Node) CreateSkippedOutput(reason string, input dag_impl.Input) *Output

CreateSkippedOutput creates a skipped output with the given reason

func (*Node) Execute

func (n *Node) Execute(ctx context.Context, input dag_impl.Input) (*Output, error)

Execute loads the policy from the cloned repository

func (*Node) GetDependencies

func (n *Node) GetDependencies() []any

GetDependencies returns the node dependencies - requires git_clone_content to have completed

func (*Node) Kind

func (n *Node) Kind() string

Kind returns the node kind

type Output

type Output struct {
	dag_impl.BaseOutput `json:",inline"`
	Policy              *policy.CompiledPolicy             `json:"policy,omitempty"`
	RawYAML             string                             `json:"raw_yaml,omitempty"`
	Error               string                             `json:"error,omitempty"`
	Overrides           map[string][]policy.PolicyOverride `json:"overrides,omitempty"`
}

func NewOutput

func NewOutput(status executiondag.Status, statusReason string, p *policy.CompiledPolicy, rawYAML string, overrides map[string][]policy.PolicyOverride, input dag_impl.Input) *Output

func NewOutputWithError

func NewOutputWithError(policyError string, input dag_impl.Input) *Output

func (*Output) PersistKey

func (o *Output) PersistKey() string

Jump to

Keyboard shortcuts

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