announcementep

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncementSvc

AnnouncementSvc backs the broadcast announcement endpoints via the notification-service MessagingService gRPC client.

func NewAnnouncementSvc

func NewAnnouncementSvc(config *AnnouncementSvcConfig) AnnouncementSvc

type AnnouncementSvcConfig

type AnnouncementSvcConfig struct {
	// MessagingClient (required) is the notification-service MessagingService gRPC client.
	MessagingClient pb.MessagingServiceClient
}

type ListAnnouncementsEndpoint

type ListAnnouncementsEndpoint struct{}

Lists the announcements currently active for the caller, newest first.

The feed covers announcements broadcast to the account being acted in together with platform-wide announcements from OpenMRP. Announcements the caller has dismissed are left out, as are any that are scheduled for later or have already expired.

type ListAnnouncementsRequest

type ListAnnouncementsRequest struct {
	apiresource.PaginationRequest
}

Request to list the caller's active announcements.

type MarkAnnouncementDismissedEndpoint

type MarkAnnouncementDismissedEndpoint struct{}

Dismisses an announcement for the calling user, removing it from their feed.

The announcement itself is not deleted: it stays retrievable by ID and remains in every other user's feed until they dismiss it too. Dismissing an already-dismissed announcement keeps the original dismissal time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.

func (*MarkAnnouncementDismissedEndpoint) Materialize

type MarkAnnouncementReadEndpoint

type MarkAnnouncementReadEndpoint struct{}

Marks an announcement as read for the calling user, as when they open it.

Reading also marks the announcement seen if it was not already, and leaves it in the feed until it is dismissed. Repeating the call keeps the original read time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.

func (*MarkAnnouncementReadEndpoint) Materialize

type MarkAnnouncementRequest

type MarkAnnouncementRequest struct {
	// Announcement ID.
	AnnouncementID string `path:"id" validate:"required"`
}

Request to advance the calling user's state for a single announcement.

type MarkAnnouncementSeenEndpoint

type MarkAnnouncementSeenEndpoint struct{}

Marks an announcement as seen for the calling user, as when it is surfaced to them without being opened.

Seeing an announcement clears it from the caller's unread bell total but leaves it in the feed, and only affects the caller: everyone else in the account keeps their own state. Repeating the call keeps the original seen time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.

func (*MarkAnnouncementSeenEndpoint) Materialize

type RetrieveAnnouncementEndpoint

type RetrieveAnnouncementEndpoint struct{}

Retrieves a single announcement by ID, with the calling user's own read state.

Only announcements the caller can see are returned: one published to another account, one that has not reached its publish time, or one that has expired is reported as not found. An announcement the caller has dismissed stays retrievable even though it no longer appears in their feed.

type RetrieveAnnouncementRequest

type RetrieveAnnouncementRequest struct {
	// Announcement ID.
	AnnouncementID string `path:"id" validate:"required"`
}

Request to retrieve a single active announcement visible to the caller.

Jump to

Keyboard shortcuts

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