Documentation
¶
Overview ¶
Package issue provides the issue remediation engine.
Index ¶
Constants ¶
View Source
const ( // TitleMaxLength is the maximum number of bytes for the title. TitleMaxLength = 75 // BodyMaxLength is the maximum number of bytes for the body. BodyMaxLength = 65536 )
Limits on the rendered output sent to the repository provider.
View Source
const (
// RemediateType is the type of the Issue remediation engine.
RemediateType = "issue"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remediator ¶
type Remediator struct {
// contains filtered or unexported fields
}
Remediator implements the issue remediation engine.
func NewIssueRemediate ¶
func NewIssueRemediate( actionType interfaces.ActionType, issueCfg *pb.RuleType_Definition_Remediate_IssueRemediation, issueCli provifv1.IssuePublisher, setting models.ActionOpt, ) (*Remediator, error)
NewIssueRemediate creates a new Issue remediation engine.
func (*Remediator) Class ¶
func (r *Remediator) Class() interfaces.ActionType
Class returns the action type of the remediation engine.
func (*Remediator) Do ¶
func (r *Remediator) Do( ctx context.Context, cmd interfaces.ActionCmd, ent proto.Message, params interfaces.ActionsParams, metadata *json.RawMessage, ) (json.RawMessage, error)
Do perform the remediation
func (*Remediator) GetOnOffState ¶
func (r *Remediator) GetOnOffState() models.ActionOpt
GetOnOffState returns the remediation action state read from the profile.
func (*Remediator) Type ¶
func (*Remediator) Type() string
Type returns the action subtype of the remediation engine.
type TemplateParams ¶
type TemplateParams struct {
// Entity is the entity being evaluated.
Entity any
// Profile contains the profile definition.
Profile map[string]any
// Params contains the rule instance parameters.
Params map[string]any
// EvalResultOutput contains the evaluation output.
EvalResultOutput any
}
TemplateParams is the parameters for the Issue templates
Click to show internal directories.
Click to hide internal directories.