Documentation ¶
Index ¶
- func CreateChannelPayload(config *Config, target string, partialPayload JSON) ([]byte, error)
- func CreateDevicePayload(config *Config, target string, partialPayload JSON) ([]byte, error)
- func CreateEmailPayload(config *Config, target string, partialPayload JSON) ([]byte, error)
- func CreateJSONPayload(target string, targetType TargetType, config *Config, message string, ...) ([]byte, error)
- type Config
- type ErrorMessage
- type JSON
- type Service
- type TargetType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChannelPayload ¶
CreateChannelPayload from a base message
func CreateDevicePayload ¶
CreateDevicePayload from a base message
func CreateEmailPayload ¶
CreateEmailPayload from a base message
func CreateJSONPayload ¶
func CreateJSONPayload(target string, targetType TargetType, config *Config, message string, params *types.Params) ([]byte, error)
CreateJSONPayload compatible with the slack webhook api
Types ¶
type Config ¶
type Config struct { standard.EnumlessConfig Targets []string Token string }
Config ...
type ErrorMessage ¶
type ErrorMessage string
ErrorMessage for error events within the pushbullet service
const ( //Scheme is the scheme part of the service configuration URL Scheme = "pushbullet" //TokenIncorrectSize for the serviceURL TokenIncorrectSize ErrorMessage = "Token has incorrect size" )
type JSON ¶
type JSON struct { Type string `json:"type"` Title string `json:"title"` Body string `json:"body"` Email string `json:"email"` ChannelTag string `json:"channel_tag"` DeviceIden string `json:"device_iden"` }
JSON used within the Slack service
type Service ¶
Service providing Pushbullet as a notification service
func (*Service) Initialize ¶
Initialize loads ServiceConfig from configURL and sets logger for this Service
type TargetType ¶
type TargetType int
TargetType ...
const ( // EmailTarget ... EmailTarget TargetType = 1 // ChannelTarget ... ChannelTarget TargetType = 2 // DeviceTarget ... DeviceTarget TargetType = 3 )
Click to show internal directories.
Click to hide internal directories.