db

package
v2.0.2-0...-ba45212 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 9 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 Create

func Create()

Create - create DB if not exists

func Delete

func Delete(table string, id int)

Delete - delete host from DB

func DeleteList

func DeleteList(ids []int)

DeleteList - delete a list of hosts from History

func Insert

func Insert(table string, oneHost models.Host)

Insert - insert host into table

func Select

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

Select - get all hosts

func SetCurrent

func SetCurrent(config models.Conf)

SetCurrent - set paths and which DB to use

func Update

func Update(table string, oneHost models.Host)

Update - update host

Types

type Data

type Data struct {
	Use        string
	Path       string
	SQLitePath string
	PGConnect  string
	PrimaryKey string
}

Data to connect to DB

Jump to

Keyboard shortcuts

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