Documentation
¶
Index ¶
- type Controller
- func (this *Controller) CreateBroker(token auth.Token, broker model.Broker) (result model.Broker, err error, errCode int)
- func (this *Controller) CreateNotification(token *auth.Token, notification model.Notification, ...) (result model.Notification, err error, errCode int)
- func (this *Controller) DeleteFcmToken(token auth.Token, fcmToken string) (err error, errCode int)
- func (this *Controller) DeleteMultipleBrokers(token auth.Token, ids []string) (err error, errCode int)
- func (this *Controller) DeleteMultipleNotifications(token auth.Token, ids []string) (err error, errCode int)
- func (this *Controller) DeletePlatformBroker(token auth.Token) (err error, errCode int)
- func (this *Controller) GetPlatformBroker(token auth.Token) (platformBroker model.PlatformBroker, err error, errCode int)
- func (this *Controller) GetSettings(token auth.Token) (settings model.Settings, err error, errCode int)
- func (this *Controller) HandleWs(conn *websocket.Conn)
- func (this *Controller) ListBrokers(token auth.Token, options persistence.ListOptions) (result model.BrokerList, err error, errCode int)
- func (this *Controller) ListNotifications(token auth.Token, options persistence.ListOptions, channel model.Channel) (result model.NotificationList, err error, errCode int)
- func (this *Controller) PutFcmToken(token auth.Token, fcmToken string) (err error, errCode int)
- func (this *Controller) ReadBroker(token auth.Token, id string) (result model.Broker, err error, errCode int)
- func (this *Controller) ReadNotification(token auth.Token, id string) (result model.Notification, err error, errCode int)
- func (this *Controller) SetBroker(token auth.Token, broker model.Broker) (result model.Broker, err error, errCode int)
- func (this *Controller) SetNotification(token auth.Token, notification model.Notification) (result model.Notification, err error, errCode int)
- func (this *Controller) SetPlatformBroker(token auth.Token, platformBroker model.PlatformBroker) (result model.PlatformBroker, err error, errCode int)
- func (this *Controller) SetSettings(token auth.Token, settings model.Settings) (result model.Settings, err error, errCode int)
- type FromTo
- type KeycloakUser
- type Persistence
- type SendRequest
- type WsSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(config configuration.Config, db Persistence, ctx context.Context) (*Controller, error)
func (*Controller) CreateBroker ¶
func (*Controller) CreateNotification ¶
func (this *Controller) CreateNotification(token *auth.Token, notification model.Notification, ignoreDuplicatesWithinSeconds *int64) (result model.Notification, err error, errCode int)
func (*Controller) DeleteFcmToken ¶
func (*Controller) DeleteMultipleBrokers ¶
func (*Controller) DeleteMultipleNotifications ¶
func (*Controller) DeletePlatformBroker ¶
func (this *Controller) DeletePlatformBroker(token auth.Token) (err error, errCode int)
func (*Controller) GetPlatformBroker ¶
func (this *Controller) GetPlatformBroker(token auth.Token) (platformBroker model.PlatformBroker, err error, errCode int)
func (*Controller) GetSettings ¶ added in v0.0.4
func (*Controller) HandleWs ¶
func (this *Controller) HandleWs(conn *websocket.Conn)
func (*Controller) ListBrokers ¶
func (this *Controller) ListBrokers(token auth.Token, options persistence.ListOptions) (result model.BrokerList, err error, errCode int)
func (*Controller) ListNotifications ¶
func (this *Controller) ListNotifications(token auth.Token, options persistence.ListOptions, channel model.Channel) (result model.NotificationList, err error, errCode int)
func (*Controller) PutFcmToken ¶
func (*Controller) ReadBroker ¶
func (*Controller) ReadNotification ¶
func (this *Controller) ReadNotification(token auth.Token, id string) (result model.Notification, err error, errCode int)
func (*Controller) SetNotification ¶
func (this *Controller) SetNotification(token auth.Token, notification model.Notification) (result model.Notification, err error, errCode int)
func (*Controller) SetPlatformBroker ¶
func (this *Controller) SetPlatformBroker(token auth.Token, platformBroker model.PlatformBroker) (result model.PlatformBroker, err error, errCode int)
type KeycloakUser ¶ added in v0.0.10
type KeycloakUser struct {
ID string `json:"id"`
CreatedTimestamp int64 `json:"createdTimestamp"`
Username string `json:"username"`
Enabled bool `json:"enabled"`
Totp bool `json:"totp"`
EmailVerified bool `json:"emailVerified"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
Attributes struct {
Locale []string `json:"locale"`
} `json:"attributes"`
DisableableCredentialTypes []any `json:"disableableCredentialTypes"`
RequiredActions []any `json:"requiredActions"`
NotBefore int `json:"notBefore"`
Access struct {
ManageGroupMembership bool `json:"manageGroupMembership"`
View bool `json:"view"`
MapRoles bool `json:"mapRoles"`
Impersonate bool `json:"impersonate"`
Manage bool `json:"manage"`
} `json:"access"`
}
type Persistence ¶
type Persistence interface {
ListNotifications(userId string, options persistence.ListOptions, topics []model.Topic) (result []model.Notification, total int64, err error, errCode int)
ReadNotification(userId string, id string) (result model.Notification, err error, errCode int)
ReadNotificationByHash(userId string, hash [32]byte, notOlderThan time.Time) (result model.Notification, err error, errCode int)
SetNotification(notification model.Notification) (err error, errCode int)
RemoveNotifications(userId string, ids []string) (err error, errCode int)
ListBrokers(userId string, options persistence.ListOptions) (result []model.Broker, total int64, err error, errCode int)
ListEnabledBrokers(userId string) (result []model.Broker, err error)
ReadBroker(userId string, id string) (result model.Broker, err error, errCode int)
SetBroker(broker model.Broker) (err error, errCode int)
RemoveBrokers(userId string, ids []string) (err error, errCode int)
ReadPlatformBroker(userId string) (platformBroker model.PlatformBroker, err error, errCode int)
SetPlatformBroker(platformBroker model.PlatformBroker) (err error, errCode int)
RemovePlatformBroker(userId string) (err error, errCode int)
UpsertFcmToken(token model.FcmToken) (err error, errCode int)
DeleteFcmToken(token model.FcmToken) (err error, errCode int)
GetFcmTokens(userId string) (tokens []model.FcmToken, err error)
ReadSettings(userId string) (result model.Settings, err error, errCode int)
SetSettings(settings model.Settings) (error, int)
}
type SendRequest ¶ added in v0.0.4
type SendRequest mailpit.SendRequest
Click to show internal directories.
Click to hide internal directories.