support

package
v0.0.0-...-ca24b28 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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
}

func (*APIService) Version

func (s *APIService) Version() (int, int, error)

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 NewClient

func NewClient(host string) *Client

func (Client) ClientsNotificationsTemplatePath

func (c Client) ClientsNotificationsTemplatePath(clientID, notificationID string) string

func (Client) ClientsTemplatePath

func (c Client) ClientsTemplatePath(clientID string) string

func (Client) DefaultTemplatePath

func (c Client) DefaultTemplatePath() string

func (Client) EmailPath

func (c Client) EmailPath() string

func (Client) EveryonePath

func (c Client) EveryonePath() string

func (Client) InfoPath

func (c Client) InfoPath() string

func (Client) MessagePath

func (c Client) MessagePath(messageID string) string

func (Client) NotificationsPath

func (c Client) NotificationsPath() string

func (Client) NotificationsUpdatePath

func (c Client) NotificationsUpdatePath(clientID, notificationID string) string

func (Client) OrganizationsPath

func (c Client) OrganizationsPath(organization string) string

func (Client) ScopesPath

func (c Client) ScopesPath(scope string) string

func (Client) SpacesPath

func (c Client) SpacesPath(space string) string

func (Client) SpecificUserPreferencesPath

func (c Client) SpecificUserPreferencesPath(userGUID string) string

func (Client) TemplateAssociationsPath

func (c Client) TemplateAssociationsPath(templateID string) string

func (Client) TemplatePath

func (c Client) TemplatePath(templateID string) string

func (Client) TemplatesPath

func (c Client) TemplatesPath() string

func (Client) UserPreferencesPath

func (c Client) UserPreferencesPath() string

func (Client) UsersPath

func (c Client) UsersPath(user string) string

type ClientPreferences

type ClientPreferences map[string]NotificationPreference

type DefaultTemplateService

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

func (DefaultTemplateService) Get

func (s DefaultTemplateService) Get(token string) (int, Template, error)

func (DefaultTemplateService) Update

func (s DefaultTemplateService) Update(token string, template Template) (int, error)

type Message

type Message struct {
	Status string `json:"status"`
}

type MessagesService

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

func (MessagesService) Get

func (s MessagesService) Get(token, messageGUID string) (int, Message, error)

type Notification

type Notification struct {
	Description string `json:"description"`
	Template    string `json:"template"`
	Critical    bool   `json:"critical"`
}

type NotificationClient

type NotificationClient struct {
	Name          string                  `json:"name"`
	Template      string                  `json:"template"`
	Notifications map[string]Notification `json:"notifications"`
}

type NotificationPreference

type NotificationPreference struct {
	Count                   int    `json:"count"`
	Email                   bool   `json:"email"`
	NotificationDescription string `json:"kind_description"`
	SourceDescription       string `json:"source_description"`
}

type NotificationsList

type NotificationsList map[string]NotificationClient

type NotificationsService

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

func (NotificationsService) List

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 Notify

type Notify struct {
	Subject           string
	HTML              string
	Text              string
	KindID            string
	ReplyTo           string
	SourceDescription string
}

type NotifyResponse

type NotifyResponse struct {
	Status         string `json:"status"`
	Recipient      string `json:"recipient"`
	NotificationID string `json:"notification_id"`
	VCAPRequestID  string `json:"vcap_request_id"`
}

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 Preference struct {
	ClientID                string
	NotificationID          string
	Count                   int
	Email                   bool
	NotificationDescription string
	SourceDescription       string
}

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

type RegisterClient

type RegisterClient struct {
	SourceName    string                          `json:"source_name"`
	Notifications map[string]RegisterNotification `json:"notifications,omitempty"`
}

type RegisterNotification

type RegisterNotification struct {
	Description string `json:"description"`
	Critical    bool   `json:"critical"`
}

type Template

type Template struct {
	Name     string                 `json:"name"`
	Subject  string                 `json:"subject"`
	Text     string                 `json:"text"`
	HTML     string                 `json:"html"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type TemplateAssociation

type TemplateAssociation struct {
	ClientID       string `json:"client"`
	NotificationID string `json:"notification"`
}

type TemplateAssociations

type TemplateAssociations struct {
	Associations []TemplateAssociation `json:"associations"`
}

type TemplateListItem

type TemplateListItem struct {
	ID   string
	Name string `json:"name"`
}

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) Create

func (s TemplatesService) Create(token string, template Template) (int, string, error)

func (TemplatesService) Delete

func (s TemplatesService) Delete(token, id string) (int, 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)

func (TemplatesService) Update

func (s TemplatesService) Update(token, id string, template Template) (int, error)

type UserPreferencesService

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

func (UserPreferencesService) Get

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)

Jump to

Keyboard shortcuts

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