notifications

package
v0.19.765 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

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

func (*Notifications) SendSlack

func (n *Notifications) SendSlack(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