Documentation ¶
Index ¶
- type APIService
- type Client
- func (c Client) ClientsNotificationsTemplatePath(clientID, notificationID string) string
- func (c Client) ClientsTemplatePath(clientID string) string
- func (c Client) DefaultTemplatePath() string
- func (c Client) EmailPath() string
- func (c Client) EveryonePath() string
- func (c Client) InfoPath() string
- func (c Client) MessagePath(messageID string) string
- func (c Client) NotificationsPath() string
- func (c Client) NotificationsUpdatePath(clientID, notificationID string) string
- func (c Client) OrganizationsPath(organization string) string
- func (c Client) ScopesPath(scope string) string
- func (c Client) SpacesPath(space string) string
- func (c Client) SpecificUserPreferencesPath(userGUID string) string
- func (c Client) TemplateAssociationsPath(templateID string) string
- func (c Client) TemplatePath(templateID string) string
- func (c Client) TemplatesPath() string
- func (c Client) UserPreferencesPath() string
- func (c Client) UsersPath(user string) string
- type ClientPreferences
- type DefaultTemplateService
- type Message
- type MessagesService
- type Notification
- type NotificationClient
- type NotificationPreference
- type NotificationsList
- type NotificationsService
- type Notify
- type NotifyResponse
- type NotifyService
- func (s NotifyService) AllUsers(token string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) Email(token, email string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) Organization(token, organizationGUID string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) OrganizationRole(token, organizationGUID, role string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) Scope(token, scope string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) Space(token, spaceGUID string, notify Notify) (int, []NotifyResponse, error)
- func (s NotifyService) User(token, userGUID string, notify Notify) (int, []NotifyResponse, error)
- type Preference
- type PreferenceDocument
- type Preferences
- type PreferencesService
- func (s PreferencesService) Get(token string) (int, Preferences, error)
- func (s PreferencesService) GlobalSubscribe(token string) (int, error)
- func (s PreferencesService) GlobalUnsubscribe(token string) (int, error)
- func (s PreferencesService) Subscribe(token, clientID, notificationID string) (int, error)
- func (s PreferencesService) Unsubscribe(token, clientID, notificationID string) (int, error)
- func (s PreferencesService) User(userGUID string) UserPreferencesService
- type RegisterClient
- type RegisterNotification
- type Template
- type TemplateAssociation
- type TemplateAssociations
- type TemplateListItem
- type TemplatesService
- func (s TemplatesService) AssignToClient(token, clientID, templateID string) (int, error)
- func (s TemplatesService) AssignToNotification(token, clientID, notificationID, templateID string) (int, error)
- func (s TemplatesService) Associations(token, templateID string) (int, []TemplateAssociation, error)
- func (s TemplatesService) Create(token string, template Template) (int, string, error)
- func (s TemplatesService) Delete(token, id string) (int, error)
- func (s TemplatesService) Get(token, templateID string) (int, Template, error)
- func (s TemplatesService) List(token string) (int, []TemplateListItem, error)
- func (s TemplatesService) Update(token, id string, template Template) (int, error)
- type UserPreferencesService
- func (s UserPreferencesService) Get(token string) (int, Preferences, error)
- func (s UserPreferencesService) GlobalSubscribe(token string) (int, error)
- func (s UserPreferencesService) GlobalUnsubscribe(token string) (int, error)
- func (s UserPreferencesService) Unsubscribe(token, clientID, notificationID string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct { Notifications *NotificationsService Templates *TemplatesService Notify *NotifyService Preferences *PreferencesService Messages *MessagesService API *APIService HTTPClient *http.Client // contains filtered or unexported fields }
func (Client) ClientsNotificationsTemplatePath ¶
func (Client) ClientsTemplatePath ¶
func (Client) DefaultTemplatePath ¶
func (Client) EveryonePath ¶
func (Client) MessagePath ¶
func (Client) NotificationsPath ¶
func (Client) NotificationsUpdatePath ¶
func (Client) OrganizationsPath ¶
func (Client) ScopesPath ¶
func (Client) SpacesPath ¶
func (Client) SpecificUserPreferencesPath ¶
func (Client) TemplateAssociationsPath ¶
func (Client) TemplatePath ¶
func (Client) TemplatesPath ¶
func (Client) UserPreferencesPath ¶
type ClientPreferences ¶
type ClientPreferences map[string]NotificationPreference
type DefaultTemplateService ¶
type DefaultTemplateService struct {
// contains filtered or unexported fields
}
type MessagesService ¶
type MessagesService struct {
// contains filtered or unexported fields
}
type Notification ¶
type NotificationClient ¶
type NotificationClient struct { Name string `json:"name"` Template string `json:"template"` Notifications map[string]Notification `json:"notifications"` }
type NotificationPreference ¶
type NotificationsList ¶
type NotificationsList map[string]NotificationClient
type NotificationsService ¶
type NotificationsService struct {
// contains filtered or unexported fields
}
func (NotificationsService) List ¶
func (s NotificationsService) List(token string) (int, NotificationsList, error)
func (NotificationsService) Register ¶
func (s NotificationsService) Register(token string, clientToRegister RegisterClient) (int, error)
func (NotificationsService) Update ¶
func (s NotificationsService) Update(token, clientID, notificationID string, notification Notification) (int, error)
type NotifyResponse ¶
type NotifyService ¶
type NotifyService struct {
// contains filtered or unexported fields
}
func (NotifyService) AllUsers ¶
func (s NotifyService) AllUsers(token string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) Email ¶
func (s NotifyService) Email(token, email string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) Organization ¶
func (s NotifyService) Organization(token, organizationGUID string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) OrganizationRole ¶
func (s NotifyService) OrganizationRole(token, organizationGUID, role string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) Scope ¶
func (s NotifyService) Scope(token, scope string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) Space ¶
func (s NotifyService) Space(token, spaceGUID string, notify Notify) (int, []NotifyResponse, error)
func (NotifyService) User ¶
func (s NotifyService) User(token, userGUID string, notify Notify) (int, []NotifyResponse, error)
type Preference ¶
type PreferenceDocument ¶
type PreferenceDocument struct { GlobalUnsubscribe bool `json:"global_unsubscribe"` Clients map[string]ClientPreferences `json:"clients,omitempty"` }
func (PreferenceDocument) Preferences ¶
func (response PreferenceDocument) Preferences() Preferences
type Preferences ¶
type Preferences struct { GlobalUnsubscribe bool NotificationPreferences []Preference }
type PreferencesService ¶
type PreferencesService struct {
// contains filtered or unexported fields
}
func (PreferencesService) Get ¶
func (s PreferencesService) Get(token string) (int, Preferences, error)
func (PreferencesService) GlobalSubscribe ¶
func (s PreferencesService) GlobalSubscribe(token string) (int, error)
func (PreferencesService) GlobalUnsubscribe ¶
func (s PreferencesService) GlobalUnsubscribe(token string) (int, error)
func (PreferencesService) Subscribe ¶
func (s PreferencesService) Subscribe(token, clientID, notificationID string) (int, error)
func (PreferencesService) Unsubscribe ¶
func (s PreferencesService) Unsubscribe(token, clientID, notificationID string) (int, error)
func (PreferencesService) User ¶
func (s PreferencesService) User(userGUID string) UserPreferencesService
type RegisterClient ¶
type RegisterClient struct { SourceName string `json:"source_name"` Notifications map[string]RegisterNotification `json:"notifications,omitempty"` }
type RegisterNotification ¶
type TemplateAssociation ¶
type TemplateAssociations ¶
type TemplateAssociations struct {
Associations []TemplateAssociation `json:"associations"`
}
type TemplateListItem ¶
type TemplatesService ¶
type TemplatesService struct { Default *DefaultTemplateService // contains filtered or unexported fields }
func (TemplatesService) AssignToClient ¶
func (s TemplatesService) AssignToClient(token, clientID, templateID string) (int, error)
func (TemplatesService) AssignToNotification ¶
func (s TemplatesService) AssignToNotification(token, clientID, notificationID, templateID string) (int, error)
func (TemplatesService) Associations ¶
func (s TemplatesService) Associations(token, templateID string) (int, []TemplateAssociation, error)
func (TemplatesService) Get ¶
func (s TemplatesService) Get(token, templateID string) (int, Template, error)
func (TemplatesService) List ¶
func (s TemplatesService) List(token string) (int, []TemplateListItem, error)
type UserPreferencesService ¶
type UserPreferencesService struct {
// contains filtered or unexported fields
}
func (UserPreferencesService) Get ¶
func (s UserPreferencesService) Get(token string) (int, Preferences, error)
func (UserPreferencesService) GlobalSubscribe ¶
func (s UserPreferencesService) GlobalSubscribe(token string) (int, error)
func (UserPreferencesService) GlobalUnsubscribe ¶
func (s UserPreferencesService) GlobalUnsubscribe(token string) (int, error)
func (UserPreferencesService) Unsubscribe ¶
func (s UserPreferencesService) Unsubscribe(token, clientID, notificationID string) (int, error)
Click to show internal directories.
Click to hide internal directories.