Documentation ¶
Index ¶
- func CheckPort(hostname, port string) int8
- func PingDomain(domain string) string
- func PingInsert(domain string, status string, flag int)
- func PingQuery(domain string) (int, string)
- func PortInsert(hostname string, port string, status string, flag int)
- func PortQuery(hostname, port string) int
- func SlackAlert(token, channel, text, color, priority string)
- func SslInsert(hostname string, RemainingDays int, flag int)
- func SslQuery(hostname string) int
- func VerifySsl(hostname string) int
- type Certificate
- type Ping
- type Port
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingDomain ¶
PingDomain ping given domain and returns an ip or error
func PingInsert ¶
PingInsert inserts ping results in database
func PingQuery ¶
PingQuery returns the last known flag and timestamp for a spesific domain from mysql
Input: domain name Outputs:
- Flag 0|1
- Timestamp in "2020-09-11 00:56:26" format
func PortInsert ¶
PortInsert inserts ping results in database
func PortQuery ¶
PortQuery returns the last known flag for a spesific hostname from mysql certificate table
Input: hostname Outputs:
- Flag 0|1
func SlackAlert ¶
func SlackAlert(token, channel, text, color, priority string)
SlackAlert function posts message to a slack channel Input: Bot User OAuth Access Token Output: A success/error message todo: add timestamp to attachment
Types ¶
type Certificate ¶
Certificate struct for certificate (ssl) table (mysql)
Click to show internal directories.
Click to hide internal directories.