join

package
v0.0.0-...-7f90a9e Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Scheme = "join"

Scheme is the identifying part of this service's configuration URL

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey  string
	Devices []string
	Title   string
	Icon    string
}

Config for the Pushover notification service service

func (*Config) Enums

func (config *Config) Enums() map[string]types.EnumFormatter

Enums returns the fields that should use a corresponding EnumFormatter to Print/Parse their values

func (*Config) Get

func (config *Config) Get(key string) (string, error)

Get returns the value of a Query field

func (*Config) GetURL

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

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

func (*Config) QueryFields

func (config *Config) QueryFields() []string

QueryFields returns the fields that are part of the Query of the service URL

func (*Config) Set

func (config *Config) Set(key string, value string) error

Set updates the value of a Query field

func (*Config) SetURL

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

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

type ErrorMessage

type ErrorMessage string

ErrorMessage for error events within the pushover service

const (
	// APIKeyMissing should be used when a config URL is missing a token
	APIKeyMissing ErrorMessage = "API key missing from config URL"

	// DevicesMissing should be used when a config URL is missing devices
	DevicesMissing ErrorMessage = "devices missing from config URL"
)

type Service

type Service struct {
	standard.Standard
	// contains filtered or unexported fields
}

Service providing the notification service Pushover

func (*Service) Initialize

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

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

Send a notification message to Pushover

Jump to

Keyboard shortcuts

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