server

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinLog added in v0.3.0

func GinLog(param gin.LogFormatterParams) string

func HistoryGet added in v0.15.0

func HistoryGet(c *gin.Context)

func LookupGet

func LookupGet(c *gin.Context)

func Redirect added in v0.12.0

func Redirect(c *gin.Context)

func Run

func Run() error

ServerRun start the http server and block. The server can stopped with a SIGINT.

func StartsGet added in v0.14.0

func StartsGet(c *gin.Context)

func StatGet

func StatGet(c *gin.Context)

func TLDGet added in v0.9.8

func TLDGet(c *gin.Context)

func ToolsDomainGet added in v0.8.0

func ToolsDomainGet(c *gin.Context)

GET /tools/domain/{fqdn} Returns the domain part of a FQDN.

func ToolsIsValidGet added in v0.8.0

func ToolsIsValidGet(c *gin.Context)

GET /tools/isvalid/{fqdn} Returns wether fqdn is valid.

func ToolsSubdomainGet added in v0.8.0

func ToolsSubdomainGet(c *gin.Context)

GET /tools/subdomain/{fqdn} Returns the subdomain part of a FQDN.

func ToolsTLDGet added in v0.8.0

func ToolsTLDGet(c *gin.Context)

GET /tools/tld/{fqdn} Returns the TLD part of a FQDN.

func UpdateStat

func UpdateStat()

UpdateStat is created to run as a goroutine. Started in the main. Updates the Current variable every 60 minutes and updates the unique collection via db.UpdateUniques() every config.StatAPIWait minutes.

Types

type Stat

type Stat struct {
	Date     int64              `json:"date"`
	Total    int64              `json:"total"`
	Updated  int64              `json:"updated"`
	Valid    int64              `json:"valid"`
	Scanners []db.ScannerSchema `json:"scanners"`
	// contains filtered or unexported fields
}
var (
	Current Stat
)

func (*Stat) Get added in v0.15.0

func (s *Stat) Get() Stat

func (*Stat) IsEmpty added in v0.12.1

func (s *Stat) IsEmpty() bool

func (*Stat) Update

func (s *Stat) Update(total, updated, valid int64, scanner []db.ScannerSchema)

Jump to

Keyboard shortcuts

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