gdb

package
v0.0.0-...-2544a3f Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(table string)

Clear - delete all hosts from table

func Connect

func Connect()

Connect - choose DB and connect

func Delete

func Delete(table string, id int)

Delete - delete host from DB

func DeleteOldHistory

func DeleteOldHistory(date string) int64

DeleteOldHistory - delete a list of hosts from History

func Select

func Select(table string) (dbHosts []models.Host, ok bool)

Select - get all hosts

func SelectByDate

func SelectByDate(mac, date string) (hosts []models.Host)

SelectByDate - get all hosts by MAC and DATE

func SelectByID

func SelectByID(id int) (host models.Host)

SelectByID - get host by ID

func SelectByMAC

func SelectByMAC(mac string) (hosts []models.Host)

SelectByMAC - get all hosts by MAC

func SelectLatest

func SelectLatest(mac string, number int) (hosts []models.Host)

SelectLatest - get latest hosts by MAC

func Start

func Start()

Start working with DB

func Update

func Update(table string, oneHost models.Host)

Update - update or create host

Types

This section is empty.

Jump to

Keyboard shortcuts

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