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)
Click to show internal directories.
Click to hide internal directories.