handler

package
v0.0.0-...-40ea64e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalHandler

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

ExternalHandler is the handler for external user notifications

func NewExternalHandler

func NewExternalHandler(channelController *controller.ChannelController) *ExternalHandler

NewExternalHandler creates a new ExternalHandler

func (*ExternalHandler) GetChannels

func (eh *ExternalHandler) GetChannels(c *gin.Context)

GetChannels responds with the list of all channels, including whether they are enabled PostNotification posts a notification to a channel @Summary Gets the list of all channels, including whether they are enabled @Description gets the list of all channels, including whether they are enabled @Tags notifications @Produce json @Success 200 {object} v1.ChannelResponse @Router /api/v1/notifications [get]

func (*ExternalHandler) GetSubNotifications

func (eh *ExternalHandler) GetSubNotifications(c *gin.Context)

GetSubNotifications returns the list of all channels subscribed to by the user, including whether they are enabled for the user @Summary Gets the list of all channels subscribed to by the user, including whether they are enabled for the user @Description gets the list of all channels subscribed to by the user, including whether they are enabled for the user @Tags notifications @Produce json @Param id path string true "User ID" @Success 200 {object} v1.ChannelResponse @Failure 400 {object} httputil.HTTPError @Router /api/v1/notifications/sub/{id} [get]

func (*ExternalHandler) PatchSubNotifications

func (eh *ExternalHandler) PatchSubNotifications(c *gin.Context)

PatchSubNotifications subscribes and unsubscribes a user to the given channels @Summary Patch the channel list that the user has subscribed to @Description patch he channel list that the user has subscribed to @Tags notifications @Produce json @Param id path string true "User ID" @Param request body v1.SetChannelsRequest true "The request body." @Success 200 {object} v1.SetChannelsResponse @Failure 400 {object} httputil.HTTPError @Router /api/v1/notifications/sub/{id} [patch]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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