Help us shape the future of Go! Take the 2026 Go Developer Survey

webpush

package
v1.321.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

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"
)

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.

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.

Jump to

Keyboard shortcuts

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