- diojarn.go => Main file. It detects databases, checks URL is valid, make connection between other files.
- database.go => Database file. It creates/deletes databases, adds columns to them.
- ping.go => Ping file. It sends ping (ICMP) packet to target URL and returns datas like response time, response code, date, URL status (up or down)
- server.go => Server file. It opens a web server in local network, displays websites and their data in their databases.
-
Main file (diojarn.go)
- Read config file
- Detect database in "databases/" or specified directory FOR LOOP
- Compare database names with websites in config file
- If all database names are equal, return True
- Else, return False
- Check return value
- If False, create database with that name
- Else, do nothing
- Compare database names with websites in config file
- Send website to Ping file (ping.go)
- Check URL is valid
- If True, do nothing
- Else, return error
- Send packet
- Get response code, response time, date and URL status (up or down)
- Send it to Main file (diojarn.go) with URL
- Check URL is valid
- Get values from Ping file (ping.go)
- Send them to Database file (database.go)
- Open database named URL
- Add columns using returned values (response code, response time etc.)
- Open database named URL
- Send them to Database file (database.go)
-
Run server (server.go)
- Get database from Main file (diojarn.go)
- Send it to JavaScript chart script
- Stay alive, loop baby.
- Get database from Main file (diojarn.go)
- front-end
- Charts (using JavaScript with d3.js)
- CSS framework
- back-end
- Chart (terminal)
- Web server (local)
- Database (local)
- IDK
- Send SMS to user when returned error (like site is down or 404 code received) using Twilio API
- Terminal chart? Maybe?
- Send mails.. Yeah people still using them.
nice work :) ty