db

package
v0.0.0-...-a934866 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReduceToMaxColumnLen

func ReduceToMaxColumnLen(str string, colSize int) string

func ReduceToMaxColumnLenKeepingLastPart

func ReduceToMaxColumnLenKeepingLastPart(str string, colSize int) string

Types

type SBOAnalyticsDB

type SBOAnalyticsDB struct {
	DbInstance    *sql.DB
	IsInitialized bool
	// contains filtered or unexported fields
}

func NewSBOAnalyticsDB

func NewSBOAnalyticsDB() *SBOAnalyticsDB

func (*SBOAnalyticsDB) Close

func (sboadb *SBOAnalyticsDB) Close() (bool, error)

func (*SBOAnalyticsDB) GetDomainId

func (sboadb *SBOAnalyticsDB) GetDomainId(domainName string, timeWindowSizeInMinutes int) (int, error)

func (*SBOAnalyticsDB) GetFileId

func (sboadb *SBOAnalyticsDB) GetFileId(domainId int, hostname string, filePath string) (int, error)

func (*SBOAnalyticsDB) Init

func (sboadb *SBOAnalyticsDB) Init(dbUser string, dbPassword string, dbAddress string, databaseName string) (bool, error)

func (*SBOAnalyticsDB) SaveMetricData

func (sboadb *SBOAnalyticsDB) SaveMetricData(data *metrics.SBOMetricWindowDataToBeSaved, domainId int, replaceIfExists bool) (bool, error)

func (*SBOAnalyticsDB) SaveOSMetrics

func (sboadb *SBOAnalyticsDB) SaveOSMetrics(uptimeInfo *metrics.UptimeInfo, memoryInfo *metrics.MemoryInfo, hostId int) (bool, error)

func (*SBOAnalyticsDB) SaveRawLog

func (sboadb *SBOAnalyticsDB) SaveRawLog(data *logparsers.SBOHttpRequestLog, domainId int, hostId int, maskIPs bool) (bool, error)

Jump to

Keyboard shortcuts

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