Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Feature: Email endpoint requests #19

Open
atc0005 opened this issue Mar 5, 2020 · 1 comment
Open

Feature: Email endpoint requests #19

atc0005 opened this issue Mar 5, 2020 · 1 comment
Labels
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Mar 5, 2020

Idea: Email requests to a specified email address. This could be useful for recording submissions for a period of time.

This would (likely) be primarily used when this app runs as a daemon/service and tailing the output isn't easily done.

@atc0005 atc0005 added the enhancement New feature or request label Mar 5, 2020
@atc0005 atc0005 added this to the Unplanned milestone Mar 5, 2020
@atc0005 atc0005 changed the title Feature: Batch email endpoint requests Feature: Email endpoint requests Apr 11, 2020
@atc0005
Copy link
Owner Author

atc0005 commented Apr 11, 2020

As of this writing, the prototype code I'm working with will only send a message to a Teams channel if the webhook URL for that channel is provided. When email support is added, sending email will only be attempted if the applicable settings are provided.

This means that if a user enables email notifications and then bangs on the API endpoints, presumably the intent is to get multiple notifications, so whether they're batched or separate wouldn't (presumably) matter a lot.

If bounce is targeted by a remote system, presumably it would be at a frequency where multiple email notifications would not be a problem.

The prototype code I'm working with has queuing setup with delivery delays, so that could act as a buffer to keep from dropping in piles of notifications all at once.

All of this said, I'm changing the focus of this issue to just implementing email support in general. The first implementation will require CLI flags for all settings with a later refactoring working in configuration file support, (likely TOML or YAML).

@atc0005 atc0005 modified the milestones: Unplanned, Future Apr 11, 2020
@atc0005 atc0005 modified the milestones: Future, v0.5.0 Apr 23, 2020
@atc0005 atc0005 pinned this issue Apr 23, 2020
atc0005 added a commit that referenced this issue Apr 23, 2020
ADDED

- Add support for Microsoft Teams notifications
  - configurable retry, retry delay settings
  - rate-limited submissions to help prevent unintentional
    abuse of remote API
    - currently hard-coded, but will likely expose this as
      a flag in a future release

- Add monitoring/reporting of notification channels with pending items

- Add monitoring/reporting of notification statistics
  - total
  - pending
  - success
  - failure

- Capture `Ctrl+C` and attempt graceful shutdown

- Plumbed `context` throughout majority of application for
  cancellation and timeout functionality
  - still learning proper use of this package, so likely
    many mistakes that will need to be fixed in a future release

- Logging
  - add *many* more debug statements to help with troubleshooting

CHANGED

- Dependencies
  - Use `atc0005/go-teams-notify` package
    - fork of original package with current features and
      some additional changes not yet accepted upstream
  - Use `atc0005/send2teams` package
    - provides wrapper for upstream functionality with message
      retry, delayfunctionality
    - provides formatting helper functions
    - provides additional webhook URL validation
  - Drop indirect dependency
  - Update `golang/gddo`
  - Add commented entries to have Go use local copies of
    packages for fast prototyping work

FIXED

- GoDoc formatting
  - remove forced line-wrap which resulted in unintentional
    code block formatting of non-code content

- Refactor logging, flag handling
  - not user visible, so not recording as a "change"

- Manually flush `http.ResponseWriter` to (massively) speed up
  response time for client requests

- Move template parsing to `main()` in an effort to speed up
  endpoint response time for client requests

REFERENCES

- refs #19
  - partial work; stubbed out

- refs #21
- refs #26
- refs #27
- refs #28
atc0005 added a commit that referenced this issue Apr 23, 2020
ADDED

- Add support for Microsoft Teams notifications
  - configurable retry, retry delay settings
  - rate-limited submissions to help prevent unintentional
    abuse of remote API
    - currently hard-coded, but will likely expose this as
      a flag in a future release

- Add monitoring/reporting of notification channels with pending items

- Add monitoring/reporting of notification statistics
  - total
  - pending
  - success
  - failure

- Capture `Ctrl+C` and attempt graceful shutdown

- Plumbed `context` throughout majority of application for
  cancellation and timeout functionality
  - still learning proper use of this package, so likely
    many mistakes that will need to be fixed in a future release

- Logging
  - add *many* more debug statements to help with troubleshooting

CHANGED

- Dependencies
  - Use `atc0005/go-teams-notify` package
    - fork of original package with current features and
      some additional changes not yet accepted upstream
  - Use `atc0005/send2teams` package
    - provides wrapper for upstream functionality with message
      retry, delayfunctionality
    - provides formatting helper functions
    - provides additional webhook URL validation
  - Drop indirect dependency
  - Update `golang/gddo`
  - Add commented entries to have Go use local copies of
    packages for fast prototyping work

FIXED

- GoDoc formatting
  - remove forced line-wrap which resulted in unintentional
    code block formatting of non-code content

- Refactor logging, flag handling
  - not user visible, so not recording as a "change"

- Manually flush `http.ResponseWriter` to (massively) speed up
  response time for client requests

- Move template parsing to `main()` in an effort to speed up
  endpoint response time for client requests

REFERENCES

- refs #19
  - partial work; stubbed out

- refs #21
- refs #26
- refs #27
- refs #28
atc0005 added a commit that referenced this issue Apr 23, 2020
ADDED

- Add support for Microsoft Teams notifications
  - configurable retry, retry delay settings
  - rate-limited submissions to help prevent unintentional
    abuse of remote API
    - currently hard-coded, but will likely expose this as
      a flag in a future release

- Add monitoring/reporting of notification channels with pending items

- Add monitoring/reporting of notification statistics
  - total
  - pending
  - success
  - failure

- Capture `Ctrl+C` and attempt graceful shutdown

- Plumbed `context` throughout majority of application for
  cancellation and timeout functionality
  - still learning proper use of this package, so likely
    many mistakes that will need to be fixed in a future release

- Logging
  - add *many* more debug statements to help with troubleshooting

- Documentation
  - GoDoc coverage for new features
  - README update to give example of Teams coverage

CHANGED

- Dependencies
  - Use `atc0005/go-teams-notify` package
    - fork of original package with current features and
      some additional changes not yet accepted upstream
  - Use `atc0005/send2teams` package
    - provides wrapper for upstream functionality with message
      retry, delayfunctionality
    - provides formatting helper functions
    - provides additional webhook URL validation
  - Drop indirect dependency
  - Update `golang/gddo`
  - Add commented entries to have Go use local copies of
    packages for fast prototyping work

FIXED

- GoDoc formatting
  - remove forced line-wrap which resulted in unintentional
    code block formatting of non-code content

- Refactor logging, flag handling
  - not user visible, so not recording as a "change"

- Manually flush `http.ResponseWriter` to (massively) speed up
  response time for client requests

- Move template parsing to `main()` in an effort to speed up
  endpoint response time for client requests

REFERENCES

- refs #19
  - partial work; stubbed out

- refs #21
- refs #26
- refs #27
- refs #28

WIP: Update README example, add example teams submission screenshot
@atc0005 atc0005 modified the milestones: v0.5.0, Future Apr 14, 2023
@atc0005 atc0005 unpinned this issue Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant