Documentation ¶
Index ¶
- type AggregateReport
- func (ar *AggregateReport) AddName(name string) *AggregateReport
- func (br *AggregateReport) AddReason(reason string, values ...interface{})
- func (ar *AggregateReport) AddResults(results ...string) *AggregateReport
- func (ar *AggregateReport) Error(err error) Reportable
- func (ar *AggregateReport) Line() (string, error)
- func (br *AggregateReport) SetCriteria(criteria criterias.Criteriable)
- func (br *AggregateReport) SetType(actionType string)
- func (br *AggregateReport) ToJson() (*gabs.Container, error)
- type Report
- func (br *Report) AddReason(reason string, values ...interface{})
- func (r *Report) Error(err error) Reportable
- func (r *Report) Line() (string, error)
- func (br *Report) SetCriteria(criteria criterias.Criteriable)
- func (r *Report) SetName(name string) *Report
- func (r *Report) SetResult(result bool) *Report
- func (br *Report) SetType(actionType string)
- func (br *Report) ToJson() (*gabs.Container, error)
- type Reportable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateReport ¶
type AggregateReport struct { Names []string `json:"names"` Results []string `json:"results"` // contains filtered or unexported fields }
AggregateReport represents an aggregate filter report
func NewAggregateReport ¶
func NewAggregateReport() *AggregateReport
NewAggregateReport returns an instance of *AggregateReport
func (*AggregateReport) AddName ¶
func (ar *AggregateReport) AddName(name string) *AggregateReport
AddName appends actionable list names to the report
func (*AggregateReport) AddReason ¶
func (br *AggregateReport) AddReason(reason string, values ...interface{})
AddReason appends a reason for why an element of the actionable list remained or was excluded
func (*AggregateReport) AddResults ¶
func (ar *AggregateReport) AddResults(results ...string) *AggregateReport
AddResults appends report results
func (*AggregateReport) Error ¶
func (ar *AggregateReport) Error(err error) Reportable
Error adds an error message to the summary
func (*AggregateReport) Line ¶
func (ar *AggregateReport) Line() (string, error)
Line returns a human readable string for a filter runner's activity
func (*AggregateReport) SetCriteria ¶
func (br *AggregateReport) SetCriteria(criteria criterias.Criteriable)
SetCriteria sets the criteria used by the filter runner
type Report ¶
type Report struct { Name string `json:"name"` Result bool `json:"result"` // contains filtered or unexported fields }
Report represents a filter report
func (*Report) AddReason ¶
func (br *Report) AddReason(reason string, values ...interface{})
AddReason appends a reason for why an element of the actionable list remained or was excluded
func (*Report) Error ¶
func (r *Report) Error(err error) Reportable
Error adds an error message to the summary
func (*Report) SetCriteria ¶
func (br *Report) SetCriteria(criteria criterias.Criteriable)
SetCriteria sets the criteria used by the filter runner
type Reportable ¶
type Reportable interface { // Line returns a human readable string or a filter runner activity Line() (string, error) // SetCriteria sets the criteria used by the filter runner SetCriteria(criteria criterias.Criteriable) // ToJson converts the report to JSON ToJson() (*gabs.Container, error) // AddReason appends a reason for why an element of // the actionable list remained or was excluded AddReason(reason string, values ...interface{}) // Error adds an error message to the summary Error(err error) Reportable }
Reportable is a contract implemented by structs that report on the activity of a filter runner