Documentation
¶
Index ¶
Constants ¶
View Source
const (
//Scheme is the scheme part of the service configuration URL
Scheme = "pushbullet"
)
Variables ¶
View Source
var ErrorTokenIncorrectSize = errors.New("token has incorrect size")
ErrorTokenIncorrectSize is the error returned when the token size is incorrect
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
standard.EnumlessConfig
Targets []string `url:"path"`
Token string `url:"host"`
Title string `key:"title" default:"Shoutrrr notification"`
}
Config ...
type ErrorResponse ¶
type ErrorResponse struct {
ErrorData struct {
Cat string `json:"cat"`
Message string `json:"message"`
Type string `json:"type"`
} `json:"error"`
}
func (*ErrorResponse) Error ¶
func (err *ErrorResponse) Error() string
type PushRequest ¶
type PushRequest 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"`
}
PushRequest ...
func NewNotePush ¶
func NewNotePush(message, title string) *PushRequest
NewNotePush creates a new push request
func (*PushRequest) SetTarget ¶
func (p *PushRequest) SetTarget(target string)
type PushResponse ¶
type PushResponse struct {
Active bool `json:"active"`
Body string `json:"body"`
Created float64 `json:"created"`
Direction string `json:"direction"`
Dismissed bool `json:"dismissed"`
Iden string `json:"iden"`
Modified float64 `json:"modified"`
ReceiverEmail string `json:"receiver_email"`
ReceiverEmailNormalized string `json:"receiver_email_normalized"`
ReceiverIden string `json:"receiver_iden"`
SenderEmail string `json:"sender_email"`
SenderEmailNormalized string `json:"sender_email_normalized"`
SenderIden string `json:"sender_iden"`
SenderName string `json:"sender_name"`
Title string `json:"title"`
Type string `json:"type"`
}
type Service ¶
Service providing Pushbullet as a notification service
func (*Service) Initialize ¶
Initialize loads ServiceConfig from configURL and sets logger for this Service
Click to show internal directories.
Click to hide internal directories.