This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package iap | |
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "strings" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Iterate through a directory of yaml and json files that define http endpoints and fields that we need to query for a unified report. | |
| Query the defined endpoints and normalize the data with a common schema (not provided). | |
| Output the normalized data to json/yaml for consumption by other tooling. | |
| Ensure the directory is provided via a command line parameter and an appropriate exit code after the report is unified. (error if the report exceeds *threshold*, success if under *threshold*) | |
| Bonus: | |
| - Make sure we check if the directory exists and strip the parsed values of any whitespace | |
| - Post the unified report to another http endpoint | |
| - Add a parsed=true field to the reports in the data directory and exclude any reports with parsed=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Latest Docker Image | |
| sources: | |
| ha: | |
| name: "Home Assistant Test" | |
| kind: dockerimage | |
| spec: | |
| image: "homeassistant/home-assistant" | |
| versionfilter: | |
| kind: regex |