Documentation ¶
Index ¶
- Constants
- type Config
- type Diagnostic
- type HandlerConfig
- type Service
- func (s *Service) Alert(message, device, title, URL, URLTitle, sound string, userKey string, ...) error
- func (s *Service) Close() error
- func (s *Service) Handler(c HandlerConfig, ctx ...keyvalue.T) alert.Handler
- func (s *Service) Open() error
- func (s *Service) Test(options interface{}) error
- func (s *Service) TestOptions() interface{}
- func (s *Service) Update(newConfig []interface{}) error
Constants ¶
View Source
const (
DefaultPushoverURL = "https://api.pushover.net/1/messages.json"
)
DefaultPushoverURL is the default URL for the Pushover API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Whether Pushover integration is enabled. Enabled bool `toml:"enabled" override:"enabled"` // The Pushover API token. Token string `toml:"token" override:"token,redact"` // The User/Group that will be alerted. UserKey string `toml:"user-key" override:"user-key,redact"` // The URL for the Pushover API. // Default: DefaultPushoverAPI URL string `toml:"url" override:"url"` }
Config is the pushover configuration as defined in the Kapacitor configuration file.
type Diagnostic ¶ added in v1.4.0
type Diagnostic interface { WithContext(ctx ...keyvalue.T) Diagnostic Error(msg string, err error) }
type HandlerConfig ¶
type HandlerConfig struct { // rather than all of a user's devices (multiple device names may // be separated by a comma) Device string `mapstructure:"device"` // Your message's title, otherwise your apps name is used Title string `mapstructure:"title"` // A supplementary URL to show with your message URL string `mapstructure:"url"` // A title for your supplementary URL, otherwise just URL is shown URLTitle string `mapstructure:"url-title"` // The name of one of the sounds supported by the device clients to override // the user's default sound choice Sound string `mapstructure:"sound"` // The User Key or Delivery Group key UserKey string `mapstructure:"user-key"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(c Config, d Diagnostic) *Service
func (*Service) TestOptions ¶
func (s *Service) TestOptions() interface{}
Click to show internal directories.
Click to hide internal directories.