Documentation
¶
Index ¶
- Constants
- func GetPrefixesForPath(path string, fileName string) []string
- type AdvancedPolicyProvider
- type DiggerRepoPolicyProvider
- func (p DiggerRepoPolicyProvider) GetAccessPolicy(organisation string, repo string, projectName string, projectDir string) (string, error)
- func (p DiggerRepoPolicyProvider) GetDriftPolicy() (string, error)
- func (p DiggerRepoPolicyProvider) GetOrganisation() string
- func (p DiggerRepoPolicyProvider) GetPlanPolicy(organisation string, repository string, projectname string, projectDir string) (string, error)
- type PolicyCheckerProviderAdvanced
Constants ¶
View Source
const DefaultAccessPolicy = `
package digger
default allow = true
allow = (count(input.planPolicyViolations) == 0)
`
Variables ¶
This section is empty.
Functions ¶
func GetPrefixesForPath ¶
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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.