Documentation ¶
Index ¶
- type Filter
- type FilterMatrix
- func (m *FilterMatrix) AddResource(r *FilterResource) error
- func (m *FilterMatrix) CheckMatches(binhost map[string][]string) error
- func (m *FilterMatrix) CreateBranches() error
- func (m *FilterMatrix) GetMatches() []*FilterMatrixLeaf
- func (m *FilterMatrix) GetMatchesFiles() []string
- func (m *FilterMatrix) GetNotMatches() []*FilterMatrixLeaf
- func (m *FilterMatrix) GetNotMatchesFiles() []string
- func (m *FilterMatrix) GetResourceFilterBySource(source string) (*FilterResource, error)
- func (m *FilterMatrix) LoadInjectRule(r *FilterResource, rule *sark.SarkFilterRuleConf, level int) error
- func (m *FilterMatrix) LoadInjectRules(source, rtype string, rules []sark.SarkFilterRuleConf) error
- func (m *FilterMatrix) Log(level logger.Level, msg string, args ...interface{})
- type FilterMatrixBranch
- func (b *FilterMatrixBranch) AddPackage(file string, match bool) (*FilterMatrixLeaf, error)
- func (b *FilterMatrixBranch) AddResource(resource *FilterResource) error
- func (b *FilterMatrixBranch) CheckPackages(files []string) error
- func (b *FilterMatrixBranch) ContainsResource(resource *FilterResource) (bool, error)
- type FilterMatrixLeaf
- type FilterReport
- type FilterResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { Config *sark.SarkConfig BinHostTree map[string][]string RulesTree *FilterMatrix // contains filtered or unexported fields }
func (*Filter) CreateFilterMatrix ¶
type FilterMatrix ¶
type FilterMatrix struct { FilterType string Father *Filter Branches map[string]*FilterMatrixBranch Resources []*FilterResource }
func NewFilterMatrix ¶
func NewFilterMatrix(ftype string) (*FilterMatrix, error)
func (*FilterMatrix) AddResource ¶
func (m *FilterMatrix) AddResource(r *FilterResource) error
func (*FilterMatrix) CheckMatches ¶
func (m *FilterMatrix) CheckMatches(binhost map[string][]string) error
func (*FilterMatrix) CreateBranches ¶
func (m *FilterMatrix) CreateBranches() error
func (*FilterMatrix) GetMatches ¶
func (m *FilterMatrix) GetMatches() []*FilterMatrixLeaf
func (*FilterMatrix) GetMatchesFiles ¶
func (m *FilterMatrix) GetMatchesFiles() []string
func (*FilterMatrix) GetNotMatches ¶
func (m *FilterMatrix) GetNotMatches() []*FilterMatrixLeaf
func (*FilterMatrix) GetNotMatchesFiles ¶
func (m *FilterMatrix) GetNotMatchesFiles() []string
func (*FilterMatrix) GetResourceFilterBySource ¶
func (m *FilterMatrix) GetResourceFilterBySource(source string) (*FilterResource, error)
func (*FilterMatrix) LoadInjectRule ¶
func (m *FilterMatrix) LoadInjectRule(r *FilterResource, rule *sark.SarkFilterRuleConf, level int) error
func (*FilterMatrix) LoadInjectRules ¶
func (m *FilterMatrix) LoadInjectRules(source, rtype string, rules []sark.SarkFilterRuleConf) error
type FilterMatrixBranch ¶
type FilterMatrixBranch struct { Category string CategoryFiltered bool Matrix *FilterMatrix Resources []*FilterResource Packages []*gentoo.GentooPackage // The key of the map contains file path Matches map[string]*FilterMatrixLeaf // The key of the map contains file path NotMatches map[string]*FilterMatrixLeaf }
func NewFilterMatrixBranch ¶
func NewFilterMatrixBranch(category string) (*FilterMatrixBranch, error)
func (*FilterMatrixBranch) AddPackage ¶
func (b *FilterMatrixBranch) AddPackage(file string, match bool) (*FilterMatrixLeaf, error)
func (*FilterMatrixBranch) AddResource ¶
func (b *FilterMatrixBranch) AddResource(resource *FilterResource) error
func (*FilterMatrixBranch) CheckPackages ¶
func (b *FilterMatrixBranch) CheckPackages(files []string) error
func (*FilterMatrixBranch) ContainsResource ¶
func (b *FilterMatrixBranch) ContainsResource(resource *FilterResource) (bool, error)
type FilterMatrixLeaf ¶
type FilterMatrixLeaf struct { Name string Path string Package *gentoo.GentooPackage Father *FilterMatrixBranch Resource *FilterResource }
type FilterReport ¶
type FilterReport struct { FilterDate string `json:"filter_date,omitempty"` FilterType string `json:"filter_type,omitempty"` Matches []string `json:"matches,omitempty"` NotMatches []string `json:"not_matches,omitempty"` }
func NewFilterReport ¶
func NewFilterReport(filterType string) (*FilterReport, error)
func (*FilterReport) GetReport ¶
func (f *FilterReport) GetReport() (string, error)
func (*FilterReport) WriteReport ¶
func (f *FilterReport) WriteReport(reportPrefix string) error
type FilterResource ¶
func NewFilterResource ¶
func (*FilterResource) AddCategory ¶
func (r *FilterResource) AddCategory(category string)
func (*FilterResource) AddPackage ¶
func (r *FilterResource) AddPackage(pkg string)
Click to show internal directories.
Click to hide internal directories.