Documentation
¶
Index ¶
- Variables
- func AzurePolicyToRego(policyPath string, dir string, ctx *shared.Context) error
- type EffectBody
- type If
- type IfBody
- type PolicyRuleBody
- type PolicyRuleMetaData
- type PolicyRuleModel
- type PolicyRuleParameter
- type PolicyRuleParameterMetaData
- type PolicyRuleParameterType
- type PolicyRuleParameters
- type Rule
- type ThenBody
Constants ¶
This section is empty.
Variables ¶
View Source
var Fs = afero.NewOsFs()
Functions ¶
Types ¶
type EffectBody ¶
type EffectBody struct {
DefaultValue string `json:"defaultValue"`
}
func (*EffectBody) GetDefaultValue ¶
func (e *EffectBody) GetDefaultValue() string
type PolicyRuleBody ¶
func NewPolicyRuleBody ¶
func NewPolicyRuleBody(input map[string]any) *PolicyRuleBody
func (*PolicyRuleBody) GetThen ¶
func (p *PolicyRuleBody) GetThen() *ThenBody
type PolicyRuleMetaData ¶
type PolicyRuleModel ¶
type PolicyRuleModel struct {
PolicyRule *PolicyRuleBody
Parameters *PolicyRuleParameters
DisplayName string
PolicyType string
Mode string
Description string
Version string
Metadata *PolicyRuleMetaData
}
type PolicyRuleParameter ¶
type PolicyRuleParameter struct {
Name string
Type PolicyRuleParameterType
DefaultValue any
MetaData *PolicyRuleParameterMetaData
}
type PolicyRuleParameterType ¶
type PolicyRuleParameterType string
type PolicyRuleParameters ¶
type PolicyRuleParameters struct {
Effect *EffectBody
Parameters map[string]*PolicyRuleParameter
}
func (*PolicyRuleParameters) GetEffect ¶
func (p *PolicyRuleParameters) GetEffect() *EffectBody
func (*PolicyRuleParameters) GetParameter ¶
func (p *PolicyRuleParameters) GetParameter(name string) (any, bool, error)
type Rule ¶
type Rule struct {
Properties *PolicyRuleModel
Id string
// have to ignore this field, because all built-in policy rules' names are uuids
Name string `json:"-"`
// contains filtered or unexported fields
}
func (*Rule) ParseParameters ¶
func (*Rule) SaveToDisk ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.