shoutrrr: Index | Files

package pushbullet

import ""


Package Files

pushbullet.go pushbullet_config.go pushbullet_json.go

func CreateChannelPayload Uses

func CreateChannelPayload(config *Config, target string, partialPayload JSON) ([]byte, error)

CreateChannelPayload from a base message

func CreateDevicePayload Uses

func CreateDevicePayload(config *Config, target string, partialPayload JSON) ([]byte, error)

CreateDevicePayload from a base message

func CreateEmailPayload Uses

func CreateEmailPayload(config *Config, target string, partialPayload JSON) ([]byte, error)

CreateEmailPayload from a base message

func CreateJSONPayload Uses

func CreateJSONPayload(target string, targetType TargetType, config *Config, message string, params *types.Params) ([]byte, error)

CreateJSONPayload compatible with the slack webhook api

type Config Uses

type Config struct {
    Targets []string
    Token   string

Config ...

func (*Config) GetURL Uses

func (config *Config) GetURL() *url.URL

GetURL returns a URL representation of it's current field values

func (*Config) SetURL Uses

func (config *Config) SetURL(url *url.URL) error

SetURL updates a ServiceConfig from a URL representation of it's field values

type ErrorMessage Uses

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 Uses

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 Uses

type Service struct {
    // contains filtered or unexported fields

Service providing Pushbullet as a notification service

func (*Service) Initialize Uses

func (service *Service) Initialize(configURL *url.URL, logger *log.Logger) error

Initialize loads ServiceConfig from configURL and sets logger for this Service

func (*Service) Send Uses

func (service *Service) Send(message string, params *types.Params) error

Send ...

type TargetType Uses

type TargetType int

TargetType ...

const (
    // EmailTarget ...
    EmailTarget TargetType = 1
    // ChannelTarget ...
    ChannelTarget TargetType = 2
    // DeviceTarget ...
    DeviceTarget TargetType = 3

Package pushbullet imports 11 packages (graph) and is imported by 1 packages. Updated 2020-06-23. Refresh now. Tools for package owners.