db

package
v0.0.0-...-fb9bc76 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TypeMysql = "mysql"
View Source
const TypePostgres = "postgres"
View Source
const TypeSqlite = "sqlite"

Variables

This section is empty.

Functions

func BanIP

func BanIP(addr netip.Addr, reason string, until time.Time)

func DeleteNotice

func DeleteNotice(noticeID string)

func DismissReport

func DismissReport(reportID string) error

func EndSession

func EndSession(sessionID string) error

func GetComments

func GetComments(reportID uint) []model.Comment

func GetNotifications

func GetNotifications() []model.Notice

func GetReport

func GetReport(uuid string) model.Report

func GetReportCategories

func GetReportCategories() map[string][]string

func GetReportID

func GetReportID(uuid string) (uint, error)

func GetReports

func GetReports(showResolved bool) []model.Report

func GetSession

func GetSession(sessionID string) (model.Session, error)

func IsBanned

func IsBanned(addr netip.Addr) bool

func MigrateDB

func MigrateDB()

func OpenMySQLDB

func OpenMySQLDB(host string, port uint16, databaseName string, user string, pass string)

func OpenPostgreSQLDB

func OpenPostgreSQLDB(host string, port uint16, databaseName string, user string, pass string)

func OpenSQLiteDB

func OpenSQLiteDB(path string)

func PostComment

func PostComment(comment model.Comment)

func PostNotice

func PostNotice(notice model.Notice)

func ReadReport

func ReadReport(uuid string)

func ReopenReport

func ReopenReport(reportID string) error

func ReportTypeExists

func ReportTypeExists(reportType string) bool

func SaveReport

func SaveReport(report *model.Report) error

func SaveSession

func SaveSession(session *model.Session) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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