postgres

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

File: connection.go

File: host_operations.go

File: vulnerability_operations.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHost

func AddHost(db *gorm.DB, host models.Host) error

func AddVulnerability

func AddVulnerability(db *gorm.DB, entry models.CVEData) error

func GetAllHosts

func GetAllHosts(db *gorm.DB) ([]models.Host, error)

func GetCVEID

func GetCVEID(db *gorm.DB, cve string) (uint, error)

func GetConnectionError added in v0.0.4

func GetConnectionError() error

GetConnectionError returns the last connection error

func GetDB

func GetDB() *gorm.DB

GetDB returns the database connection, initializing it if necessary

func GetHost

func GetHost(db *gorm.DB, ip string) (models.Host, error)

func GetVulnerability

func GetVulnerability(db *gorm.DB, cveID string) (models.CVEItem, error)

* GetVulnerability accepts a CVE ID and returns the corresponding CVEItem

func IsConnected added in v0.0.4

func IsConnected() bool

IsConnected returns whether the database is connected

Types

This section is empty.

Directories

Path Synopsis
File: host.go
File: host.go

Jump to

Keyboard shortcuts

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