webpush

package
v1.340.0 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: 13 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 (
	// EnvVAPIDPublicKey overrides the stored VAPID public key.
	EnvVAPIDPublicKey = "CREDIMI_WEB_PUSH_VAPID_PUBLIC_KEY"
	// EnvVAPIDPrivateKey overrides the stored VAPID private key.
	EnvVAPIDPrivateKey = "CREDIMI_WEB_PUSH_VAPID_PRIVATE_KEY"
)
View Source
const StartFailureResult = "start_failed"

StartFailureResult is the push payload result of a queued pipeline run that could not start; it never got a Temporal run.

Variables

This section is empty.

Functions

func GetVAPIDKeyPair

func GetVAPIDKeyPair(app core.App) (publicKey string, privateKey string, err error)

GetVAPIDKeyPair returns the Web Push VAPID key pair, generating and persisting a new one on first use. When both environment variables are set they take precedence over the stored key pair.

func NotifyPipelineRunCompletion

func NotifyPipelineRunCompletion(
	ctx context.Context,
	app core.App,
	req CompletionRequest,
) (int, error)

NotifyPipelineRunCompletion sends a Web Push notification about a finished pipeline run to every push subscription of the organization members. Per-subscription failures are collected into the returned error without aborting the remaining sends. Dead subscriptions (HTTP 404/410) are pruned.

func NotifyPipelineStartFailure added in v1.325.0

func NotifyPipelineStartFailure(
	ctx context.Context,
	app core.App,
	req StartFailureRequest,
) (int, error)

NotifyPipelineStartFailure sends a Web Push notification about a pipeline run that could not start to every push subscription of the organization members, with the same delivery rules as NotifyPipelineRunCompletion.

Types

type CompletionRequest

type CompletionRequest struct {
	OrgID        string
	PipelineName string
	Organization string
	WorkflowID   string
	RunID        string
	Result       string
	Duration     string
	Error        string
	AppURL       string
}

CompletionRequest describes a finished pipeline run to notify users about.

type StartFailureRequest added in v1.325.0

type StartFailureRequest struct {
	OrgID        string
	PipelineName string
	// PipelinePath is the canonified pipeline path (`<org>/<pipeline>`); the
	// notification links to its pipeline page.
	PipelinePath string
	Organization string
	Error        string
	AppURL       string
}

StartFailureRequest describes a queued or scheduled pipeline run that the device semaphore could not start.

Jump to

Keyboard shortcuts

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