db

package
v0.0.0-...-f1beb97 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataService

type DataService struct {
	Session *gorm.DB
	Config  *config.DatabaseConfig
}

DataService is a wrapper for the GORM database.

func InitDB

func InitDB(dbConfig *config.DatabaseConfig) *DataService

Provides a pointer to a databse connection for a given configuration.

func (DataService) CreateERLs

func (ds DataService) CreateERLs(erls []*models.ERL) error

func (DataService) CreatePhones

func (ds DataService) CreatePhones(phones []*models.Phone) error

func (DataService) GetERLByName

func (ds DataService) GetERLByName(name string) (*models.ERL, error)

func (DataService) GetPhoneByIPAddress

func (ds DataService) GetPhoneByIPAddress(ipAddress string) (*models.Phone, error)

Jump to

Keyboard shortcuts

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