inquiry

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Port = ":8678"

Functions

func GetName

func GetName() string

GetName returns the ComputerName and/or hostname of the machine

func IsPortAvailable

func IsPortAvailable(port string) bool

IsPortAvailable checks if a port is available by trying to listen on it

func ListenFor

func ListenFor(path string, action func(http.ResponseWriter, *http.Request, string)) (string, error)

func ListenForHash

func ListenForHash() (string, error)

func ListenForToken

func ListenForToken() (string, error)

func Shutdown

func Shutdown(server *http.Server)

func UpdateInquiry

func UpdateInquiry(hash string) error

UpdateInquiry update the inquiry passing ComputerName and user agent

Types

type HashResult

type HashResult struct {
	Hash string `json:"hash"`
}

type Inquiry

type Inquiry struct {
	Hash       string
	Token      string
	Name       string
	IP         string
	Agent      string
	Location   string
	Coordinate string
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
}

type Response

type Response struct {
	Benchmark float64 `json:"_benchmark"`
	Message   string  `json:"message"`
	Data      Inquiry `json:"data"`
}

Jump to

Keyboard shortcuts

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