notification

package
v1.2210.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Notifiers = []Notifier{}

Functions

func GetWorkflowStepTypeDesc

func GetWorkflowStepTypeDesc(s string) string

func Notify

func Notify(notification Notification, users []*model.User) error

func NotifyAuditPlan added in v1.2204.0

func NotifyAuditPlan(apName string, report *model.AuditPlanReportV2) error

func NotifyWorkflow

func NotifyWorkflow(workflowId string, wt WorkflowNotifyType)

Types

type AuditPlanNotification added in v1.2204.0

type AuditPlanNotification struct {
	// contains filtered or unexported fields
}

func NewAuditPlanNotification added in v1.2204.0

func NewAuditPlanNotification(auditPlan *model.AuditPlan, report *model.AuditPlanReportV2) *AuditPlanNotification

func (*AuditPlanNotification) NotificationBody added in v1.2204.0

func (a *AuditPlanNotification) NotificationBody() string

func (*AuditPlanNotification) NotificationSubject added in v1.2204.0

func (a *AuditPlanNotification) NotificationSubject() string

type AuditPlanNotifier added in v1.2204.0

type AuditPlanNotifier struct {
	// contains filtered or unexported fields
}

func GetAuditPlanNotifier added in v1.2204.0

func GetAuditPlanNotifier() *AuditPlanNotifier

func NewAuditPlanNotifier added in v1.2204.0

func NewAuditPlanNotifier() *AuditPlanNotifier

func (*AuditPlanNotifier) Notify added in v1.2204.0

func (n *AuditPlanNotifier) Notify(notification Notification, auditPlan *model.AuditPlan) error

func (*AuditPlanNotifier) Send added in v1.2204.0

func (n *AuditPlanNotifier) Send(notification Notification, auditPlan *model.AuditPlan) (err error)

type EmailNotifier

type EmailNotifier struct{}

func (*EmailNotifier) Notify

func (n *EmailNotifier) Notify(notification Notification, users []*model.User) error

type Notification

type Notification interface {
	NotificationSubject() string
	NotificationBody() string
}

type Notifier

type Notifier interface {
	Notify(Notification, []*model.User) error
}

type TestNotify

type TestNotify struct {
}

func (*TestNotify) NotificationBody

func (t *TestNotify) NotificationBody() string

func (*TestNotify) NotificationSubject

func (t *TestNotify) NotificationSubject() string

type WorkflowNotification

type WorkflowNotification struct {
	// contains filtered or unexported fields
}

func NewWorkflowNotification

func NewWorkflowNotification(w *model.Workflow, notifyType WorkflowNotifyType) *WorkflowNotification

func (*WorkflowNotification) NotificationBody

func (w *WorkflowNotification) NotificationBody() string

func (*WorkflowNotification) NotificationSubject

func (w *WorkflowNotification) NotificationSubject() string

type WorkflowNotifyType

type WorkflowNotifyType int
const (
	WorkflowNotifyTypeCreate WorkflowNotifyType = iota
	WorkflowNotifyTypeApprove
	WorkflowNotifyTypeReject
	WorkflowNotifyTypeExecuteSuccess
	WorkflowNotifyTypeExecuteFail
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL