Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectPolicyAll ¶
func SelectPolicyAll(meta *PolicyMetadata) bool
Types ¶
type PolicyMetadata ¶
type PolicyMetadata struct { Title string `json:"title"` Description string `json:"description"` Tags []string `json:"tags"` Input []QueryID `json:"input"` Package string `json:"package"` Location string `json:"location"` }
func NewPolicyMetadataFromAnnotation ¶
func NewPolicyMetadataFromAnnotation(ref *ast.AnnotationsRef) (*PolicyMetadata, error)
func (*PolicyMetadata) HasTag ¶
func (x *PolicyMetadata) HasTag(tag string) bool
type PolicyMetadataSet ¶
type PolicyMetadataSet []*PolicyMetadata
func NewPolicyMetadataSetFromAnnotation ¶
func NewPolicyMetadataSetFromAnnotation(refs ast.FlatAnnotationsRefSet) (PolicyMetadataSet, error)
func (PolicyMetadataSet) Filter ¶
func (x PolicyMetadataSet) Filter(selector PolicySelector) PolicyMetadataSet
func (PolicyMetadataSet) RequiredQueries ¶
func (x PolicyMetadataSet) RequiredQueries(base Queries) Queries
type PolicySelector ¶
type PolicySelector func(meta *PolicyMetadata) bool
func SelectPolicyByTag ¶
func SelectPolicyByTag(tags ...string) PolicySelector
type QueryInput ¶
type QueryOutput ¶
type QueryOutput struct {
Alert []Alert `json:"alert"`
}
Click to show internal directories.
Click to hide internal directories.