notifications

package
v0.19.1302 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// org notifications
	NotificationsTypeOrgCreated        Type = "org_created"
	NotificationsTypeOrgInvite         Type = "org_invite"
	NotificationsTypeOrgInviteAccepted Type = "org_invite_accepted"

	// app notifications
	NotificationsTypeAppCreated   = "app_created"
	NotificationsTypeFirstAppSync = "first_app_sync"
	NotificationsTypeAppSyncError = "app_sync_error"

	// compponent notifications
	NotificationsTypeComponentBuildFailed = "component_build_failed"

	// install notifications
	NotificationsTypeFirstInstallCreated = "first_install_created"
	NotificationsTypeInstallCreated      = "install_created"

	// install deployment notifications
	NotificationsTypeDeployFailed = "deploy_failed"

	// release notifications
	NotificationsTypeReleaseSucceeded = "release_succeeded"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifications

type Notifications struct {
	Loops loops.Client     `validate:"required"`
	Cfg   *internal.Config `validate:"required"`
	L     *zap.Logger      `validate:"required"`

	MetricsWriter metrics.Writer `validate:"required"`
}

func New

func New(v *validator.Validate,
	l *zap.Logger,
	cfg *internal.Config,
	loopsclient loops.Client,
	metricsWriter metrics.Writer,
) (*Notifications, error)

func (*Notifications) SendEmail

func (n *Notifications) SendEmail(ctx context.Context, cfg *app.NotificationsConfig, typ Type, vars map[string]string) error

type Type

type Type string

func (Type) EmailTemplateID

func (n Type) EmailTemplateID() string

func (Type) SlackNotificationTemplate

func (n Type) SlackNotificationTemplate() string

func (Type) String

func (n Type) String() string

Jump to

Keyboard shortcuts

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