Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter interface { // Return body and subject. GetSubjectAndBody(ctx context.Context, culprit *pb.Culprit, subscription *sub_pb.Subscription) (string, string, error) }
Formatter controls how the notification looks like
type MarkdownFormatter ¶
type MarkdownFormatter struct {
// contains filtered or unexported fields
}
MarkdownFormatter implement Formatter.
func NewMarkdownFormatter ¶
func NewMarkdownFormatter(commitURLTemplate string, notifyConfig *config.CulpritNotifyConfig) (*MarkdownFormatter, error)
NewMarkdownFormatter return a new MarkdownFormatter.
func (MarkdownFormatter) GetSubjectAndBody ¶
func (f MarkdownFormatter) GetSubjectAndBody(ctx context.Context, culprit *pb.Culprit, subscription *sub_pb.Subscription) (string, string, error)
FormatNewCulprit implements Formatter.
type NoopFormatter ¶
type NoopFormatter struct { }
NoopFormatter implements Formatter by doing nothing.
func NewNoopFormatter ¶
func NewNoopFormatter() *NoopFormatter
NewNoopFormatter returns a new EmailService instance.
func (*NoopFormatter) GetSubjectAndBody ¶
func (f *NoopFormatter) GetSubjectAndBody(ctx context.Context, culprit *pb.Culprit, subscription *sub_pb.Subscription) (string, string, error)
SendNewCulprit implements Formatter.
type TemplateContext ¶
type TemplateContext struct { // Commit is the Commit the regression was found at. Commit *pb.Commit // CommitURL is a URL that points to the above Commit. // e.g. CommitUrl string // Subscription is the configuration which tells where/how to file the bug Subscription *sub_pb.Subscription }
TemplateContext is used in expanding the message templates.
Click to show internal directories.
Click to hide internal directories.