controllers

package
v0.0.0-...-8797175 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ContentType = "Content-Type"
View Source
const JsonContentType = "application/json"

Variables

This section is empty.

Functions

func CheckDBHandler

func CheckDBHandler(w http.ResponseWriter, r *http.Request)

func CheckDomainHandler

func CheckDomainHandler(w http.ResponseWriter, r *http.Request)

func CheckHttpHandler

func CheckHttpHandler(w http.ResponseWriter, r *http.Request)

func CheckPortHandler

func CheckPortHandler(w http.ResponseWriter, r *http.Request)

Types

type DBCheckRequest

type DBCheckRequest struct {
	DbType       string `json:"dbType"`
	Hostname     string `json:"hostname"`
	Port         string `json:"port"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	ServiceName  string `json:"serviceName,omitempty"`
	DatabaseName string `json:"databaseName,omitempty"`
}

type DBCheckResponse

type DBCheckResponse struct {
	Host         string `json:"host,omitempty"`
	Port         int    `json:"port,omitempty"`
	UserName     string `json:"userName,omitempty"`
	Status       string `json:"status"`
	ErrorMessage string `json:"errorMessage,omitempty"`
	ResponseTime int64  `json:"responseTime"`
}

type DomainCheckRequst

type DomainCheckRequst struct {
	DomainName string `json:"domainName"`
	DnsServer  string `json:"dnsServer"`
}

type DomainCheckResponse

type DomainCheckResponse struct {
	DomainName   string   `json:"domainName"`
	DnsServer    string   `json:"dnsServer,omitempty"`
	A            []string `json:"A"`
	CNAME        []string `json:"CNAME"`
	MX           []string `json:"MX"`
	ErrorMessage string   `json:"errorMessage,omitempty"`
	ResponseTime int64    `json:"responseTime"`
	Status       string   `json:"status"`
}

func CheckDomain

func CheckDomain(domain string, dnsServer string, resolver *net.Resolver) (res DomainCheckResponse)

type HttpCheckRequest

type HttpCheckRequest struct {
	URL string `json:"url"`
}

type HttpCheckResponse

type HttpCheckResponse struct {
	URL          string `json:"url"`
	Success      bool   `json:"success"`
	StatusCode   int    `json:"statusCode,omitempty"`
	ResponseTime int64  `json:"responseTime"`
	ErrorMessage string `json:"errorMessage,omitempty"`
}

type PortCheckRequst

type PortCheckRequst struct {
	HostName string `json:"hostname"`
	Port     string `json:"port"`
}

Jump to

Keyboard shortcuts

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