database

package
v0.0.0-...-70ba0c5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

Database handler

func Connect

func Connect(driver string, conn string) Database

Connect establish the first connection to the DB and check migrations

func (Database) GetContent

func (db Database) GetContent(id int) model.Content

GetContent returns a content from ID

func (Database) GetDeviceDisplays

func (db Database) GetDeviceDisplays(deviceID int) []model.Display

GetDeviceDisplays returns displays for a device ID

func (Database) GetDeviceFromMac

func (db Database) GetDeviceFromMac(mac string) model.Device

GetDeviceFromMac returns a device from a mac

func (Database) GetDisplay

func (db Database) GetDisplay(mac string) string

GetDisplay returns displays for a given mac

func (Database) GetHeadersOfContent

func (db Database) GetHeadersOfContent(contentID int) []model.Header

GetHeadersOfContent returns headers for a content ID

Jump to

Keyboard shortcuts

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