notification

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IDKey is for notification UUIDs
	IDKey = "id"
	// BasePath is the base path for serving the notification API
	BasePath = "/api/v1/notifications"
	// BasePathWithID is just the base path with the ID key in it.
	// Use this anywhere you need to know the ID of the notification being queried.
	BasePathWithID    = BasePath + "/:" + IDKey
	BasePathWithClear = BasePath + "/clear"

	// MaxIDKey is the url query for setting a max notification ID to return
	MaxIDKey = "max_id"
	// LimitKey is for specifying maximum number of notifications to return.
	LimitKey = "limit"
	// SinceIDKey is for specifying the minimum notification ID to return.
	SinceIDKey = "since_id"
)

Variables

This section is empty.

Functions

func New

func New(processor processing.Processor) api.ClientModule

New returns a new notification module

Types

type Module

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

Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with notifications

func (*Module) NotificationsClearPOSTHandler added in v0.4.0

func (m *Module) NotificationsClearPOSTHandler(c *gin.Context)

NotificationsClearPOSTHandler clears all the notifications

func (*Module) NotificationsGETHandler

func (m *Module) NotificationsGETHandler(c *gin.Context)

NotificationsGETHandler serves a list of notifications to the caller, with the desired query parameters

func (*Module) Route

func (m *Module) Route(r router.Router) error

Route attaches all routes from this module to the given router

Jump to

Keyboard shortcuts

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