policy

package
v0.0.0-...-349de90 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAccessPolicy = `
package digger
default allow = true
allow = (count(input.planPolicyViolations) == 0)
`

Variables

This section is empty.

Functions

func GetPrefixesForPath

func GetPrefixesForPath(path string, fileName string) []string

GetPrefixesForPath @path is the total path example /dev/vpc/subnets @filename is the name of the file to search for example access.rego returns the list of prefixes in priority order example: /dev/vpc/subnets/access.rego /dev/vpc/access.rego /dev/access.rego

Types

type AdvancedPolicyProvider

type AdvancedPolicyProvider struct{}

func (AdvancedPolicyProvider) GetPolicyProvider

func (p AdvancedPolicyProvider) GetPolicyProvider(policySpec lib_spec.PolicySpec, diggerHost string, diggerOrg string, token string) (policy.Checker, error)

type DiggerRepoPolicyProvider

type DiggerRepoPolicyProvider struct {
	ManagementRepoUrl string
	GitToken          string
}

func (DiggerRepoPolicyProvider) GetAccessPolicy

func (p DiggerRepoPolicyProvider) GetAccessPolicy(organisation string, repo string, projectName string, projectDir string) (string, error)

GetPolicy fetches policy for particular project, if not found then it will fallback to org level policy

func (DiggerRepoPolicyProvider) GetDriftPolicy

func (p DiggerRepoPolicyProvider) GetDriftPolicy() (string, error)

func (DiggerRepoPolicyProvider) GetOrganisation

func (p DiggerRepoPolicyProvider) GetOrganisation() string

func (DiggerRepoPolicyProvider) GetPlanPolicy

func (p DiggerRepoPolicyProvider) GetPlanPolicy(organisation string, repository string, projectname string, projectDir string) (string, error)

type PolicyCheckerProviderAdvanced

type PolicyCheckerProviderAdvanced struct{}

func (PolicyCheckerProviderAdvanced) Get

func (p PolicyCheckerProviderAdvanced) Get(hostname string, organisationName string, authToken string) (policy.Checker, error)

Jump to

Keyboard shortcuts

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