database

package
v0.0.0-...-c2efdba Latest Latest
Warning

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

Go to latest
Published: May 13, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllActiveHousematesNumbers

func GetAllActiveHousematesNumbers() []string

func LogButtonPress

func LogButtonPress(macAddress string, reason string)

func SetConfiguration

func SetConfiguration(givenConfiguration Configuration)

Types

type Button

type Button struct {
	ID         uint
	MacAddress string
	Name       string
}

func GetAllButtons

func GetAllButtons() []Button

type ButtonLogEntry

type ButtonLogEntry struct {
	ID        uint   `gorm:"primary_key"`
	ButtonID  string `gorm:"ForeignKey:Button"`
	PressedAt time.Time
	Reason    string
}

func (ButtonLogEntry) TableName

func (ButtonLogEntry) TableName() string

type Configuration

type Configuration struct {
	DatabaseType             string
	DatabaseConnectionString string
}

type Housemate

type Housemate struct {
	ID          uint `gorm:"primary_key"`
	FirstName   string
	LastName    string
	PhoneNumber string
	Active      bool
}

func GetAllActiveHousemates

func GetAllActiveHousemates() []Housemate

Jump to

Keyboard shortcuts

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