eagle

package
v0.0.0-...-8769a01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPort

func CheckPort(hostname, port string) int8

CheckPort checks open ports

func PingDomain

func PingDomain(domain string) string

PingDomain ping given domain and returns an ip or error

func PingInsert

func PingInsert(domain string, status string, flag int)

PingInsert inserts ping results in database

func PingQuery

func PingQuery(domain string) (int, string)

PingQuery returns the last known flag and timestamp for a spesific domain from mysql

Input: domain name Outputs:

  1. Flag 0|1
  2. Timestamp in "2020-09-11 00:56:26" format

func PortInsert

func PortInsert(hostname string, port string, status string, flag int)

PortInsert inserts ping results in database

func PortQuery

func PortQuery(hostname, port string) int

PortQuery returns the last known flag for a spesific hostname from mysql certificate table

Input: hostname Outputs:

  1. 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

func SslInsert

func SslInsert(hostname string, RemainingDays int, flag int)

SslInsert inserts ssl results in database

func SslQuery

func SslQuery(hostname string) int

SslQuery returns the last known flag for a spesific hostname from mysql certificate table

Input: domain name Outputs:

  1. Flag 0|1

func VerifySsl

func VerifySsl(hostname string) int

VerifySsl checks the expired domain date

Types

type Certificate

type Certificate struct {
	ID         int
	Hostname   string
	RemainDays int
	Flag       int
}

Certificate struct for certificate (ssl) table (mysql)

type Ping

type Ping struct {
	ID        int
	Domain    string
	Status    string
	Timestamp string
	Flag      int
}

Ping struct for ping table (mysql)

type Port

type Port struct {
	ID        int
	Hostname  string
	Port      string
	Status    string
	Timestamp string
	Flag      int
}

Port struct for ports table (mysql)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL