event

package
v0.0.0-...-21df278 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandlers

type EventHandlers struct {
	ContextExtractor middleware.UserContextExtractor
	// contains filtered or unexported fields
}

func New

func New(eventClient am.EventService, hooks webhooks.Webhooker) *EventHandlers

func (*EventHandlers) Get

func (h *EventHandlers) Get(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) GetLastWebhookEvents

func (h *EventHandlers) GetLastWebhookEvents(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) GetSettings

func (h *EventHandlers) GetSettings(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) MarkRead

func (h *EventHandlers) MarkRead(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) ParseGetFilterQuery

func (h *EventHandlers) ParseGetFilterQuery(values url.Values, groupID int) (*am.EventFilter, error)

func (*EventHandlers) SendTestWebhookEvent

func (h *EventHandlers) SendTestWebhookEvent(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) UpdateSettings

func (h *EventHandlers) UpdateSettings(w http.ResponseWriter, req *http.Request)

func (*EventHandlers) UpdateWebhooks

func (h *EventHandlers) UpdateWebhooks(w http.ResponseWriter, req *http.Request)

type MarkReadRequest

type MarkReadRequest struct {
	NotificationIDs []int64 `json:"notification_ids"`
}

type UserNotificationSettings

type UserNotificationSettings struct {
	Subscriptions     []*am.EventSubscriptions `json:"subscriptions"`
	ShouldWeeklyEmail bool                     `json:"should_weekly_email"`
	ShouldDailyEmail  bool                     `json:"should_daily_email"`
	UserTimezone      string                   `json:"user_timezone"`
}

Jump to

Keyboard shortcuts

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