api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrokersEndpoints

func BrokersEndpoints(_ configuration.Config, control Controller, router *mux.Router)

func FcmTokenEndpoints

func FcmTokenEndpoints(_ configuration.Config, control Controller, router *mux.Router)

func NotificationsEndpoints

func NotificationsEndpoints(_ configuration.Config, control Controller, router *mux.Router)

func PlatformBrokerEndpoints

func PlatformBrokerEndpoints(_ configuration.Config, control Controller, router *mux.Router)

func SettingsEndpoints added in v0.0.4

func SettingsEndpoints(_ configuration.Config, control Controller, router *mux.Router)

func Start

func Start(ctx context.Context, wg *sync.WaitGroup, config configuration.Config, control Controller)

func WsEndpoints

func WsEndpoints(_ configuration.Config, control Controller, router *mux.Router)

Types

type Controller

type Controller interface {
	ListNotifications(token auth.Token, options persistence.ListOptions, channel model.Channel) (result model.NotificationList, err error, errCode int)
	ReadNotification(token auth.Token, id string) (result model.Notification, err error, errCode int)
	CreateNotification(token *auth.Token, notification model.Notification, ignoreDuplicatesWithinSeconds *int64) (result model.Notification, err error, errCode int)
	SetNotification(token auth.Token, notification model.Notification) (result model.Notification, err error, errCode int)
	DeleteMultipleNotifications(token auth.Token, ids []string) (err error, errCode int)
	HandleWs(conn *websocket.Conn)

	ListBrokers(token auth.Token, options persistence.ListOptions) (result model.BrokerList, err error, errCode int)
	ReadBroker(token auth.Token, id string) (result model.Broker, err error, errCode int)
	CreateBroker(token auth.Token, broker model.Broker) (result model.Broker, err error, errCode int)
	SetBroker(token auth.Token, broker model.Broker) (result model.Broker, err error, errCode int)
	DeleteMultipleBrokers(token auth.Token, ids []string) (err error, errCode int)

	GetPlatformBroker(token auth.Token) (platformBroker model.PlatformBroker, err error, errCode int)
	SetPlatformBroker(token auth.Token, platformBroker model.PlatformBroker) (result model.PlatformBroker, err error, errCode int)
	DeletePlatformBroker(token auth.Token) (err error, errCode int)

	PutFcmToken(token auth.Token, fcmToken string) (err error, errCode int)
	DeleteFcmToken(token auth.Token, fcmToken string) (err error, errCode int)

	GetSettings(token auth.Token) (settings model.Settings, err error, errCode int)
	SetSettings(token auth.Token, settings model.Settings) (result model.Settings, err error, errCode int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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