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

notifications

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package notifications delivers comment activity to authorized recipients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentURL

func CommentURL(origin, documentID, commentID string) string

func DocumentURL

func DocumentURL(origin, documentID string) string

Types

type DeliveryError

type DeliveryError struct {
	Code       string
	Permanent  bool
	RetryAfter time.Duration
}

func (*DeliveryError) Error

func (e *DeliveryError) Error() string

type Message

type Message struct {
	Reason, Link, DocumentTitle, Highlight, Body, Requester, Actor string
	PreviousRole, Role                                             repo.Role
	DirectAccess                                                   bool
	Reply                                                          bool
}

type Sender

type Sender interface {
	Send(ctx context.Context, email string, message Message) error
}

type Slack

type Slack struct {
	// contains filtered or unexported fields
}

func NewSlack

func NewSlack(token string) *Slack

func (*Slack) Send

func (s *Slack) Send(ctx context.Context, email string, message Message) error

type Store

type Store interface {
	repo.Repository
	// contains filtered or unexported methods
}

type Worker

type Worker struct {
	Store            Store
	Sender           Sender
	AppOrigin        string
	ResolvePrincipal func(context.Context, *auth.Principal) *auth.Principal
	// contains filtered or unexported fields
}

func (*Worker) DeliverNext

func (w *Worker) DeliverNext(ctx context.Context) error

func (*Worker) DeliverNextDocumentAccess

func (w *Worker) DeliverNextDocumentAccess(ctx context.Context) error

func (*Worker) DeliverNextDocumentAccessRequest

func (w *Worker) DeliverNextDocumentAccessRequest(ctx context.Context) error

func (*Worker) Run

func (w *Worker) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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