Skip to content

Service compliance

nils måsén edited this page Apr 20, 2021 · 1 revision

All services should comply with a base set of rules in order to use them independently of how much of the feature set they implement.

Currently, there are three rules that should be met:

  1. Services should not fail to send messages when the title param is passed. The service does not need to use it in any specific way, but it should not return an error (unless failing for some other reason).
    Current progress: ✔ All services comply!
  2. Services should never print to stderr/-out, or panic. Any non-fatal errors or warnings should be logged using service.Log[f]().
    Current progress: ❌ At least one service does not comply.
  3. Default values specified in the config tags should be used when no corresponding property have been supplied.
    Note: This can be automatically implemented using the PropKeyResolver
    Current progress: ❔ Unknown.
  4. All key-tagged config fields need to be settable using shoutrrr generate
    Current progress: ❔ Unknown.

Services that fail when passing title param:

Telegram

Supports Params? ✔ Yes!
Supports Title prop? ⚫ No
Silently ignores title? ❌ Error: title is not a valid config key [channels notification parsemode preview]

IFTT

Supports Params? ✔ Yes!
Uses title prop? ⚫ No
Silently ignores title? ❌Error "title is not a valid config key [events messagevalue value1 value2 value3]"

OpsGenie

Supports Params? ✔ Yes!
Uses title prop? ⚫ No
Silently ignores title? ❌ Error: title is not a valid config key [actions alias description details entity note priority responders source tags user visibleto]

Service that does not log outside service.Log:

As determined by grep --exclude '*_test.go' -P '(?<!logger.)(?<!Enum.)(?<!S)[Pp]rintf?\(' -r pkg/services/:

  • Discord ✔
  • Email ✔
  • Gotify ✔
  • Hangouts Chat ✔
  • IFTTT ❌
  • Join ✔
  • Mattermost ✔
  • OpsGenie ✔
  • Pushbullet ✔
  • Pushover ✔
  • Rocketchat ✔
  • Slack ✔
  • Teams ✔
  • Telegram ✔
  • Zulip Chat ✔

Services that do not fall back to defaults when not configured:

  • Discord ❔
  • Email ❔
  • Gotify ❔
  • Hangouts Chat ❔
  • IFTTT ❔
  • Join ❔
  • Mattermost ❔
  • OpsGenie ❔
  • Pushbullet ❔
  • Pushover ❔
  • Rocketchat ❔
  • Slack ❔
  • Teams ❔
  • Telegram ❔
  • Zulip Chat ❔

Services that cannot be configured using shoutrrr generate:

  • Discord ❔
  • Email ❔
  • Gotify ❔
  • Hangouts Chat ❔
  • IFTTT ❔
  • Join ❔
  • Mattermost ❔
  • OpsGenie ❔
  • Pushbullet ❔
  • Pushover ❔
  • Rocketchat ❔
  • Slack ❔
  • Teams ❔
  • Telegram ❔
  • Zulip Chat ❔