building

package
v0.0.0-...-ebd6d4f Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Building

type Building struct {
	ID         uint             `json:"id"`
	AccountID  uint             `json:"account_id"`
	Longtitude float32          `json:"longtitude"`
	Latitude   float32          `json:"latitude"`
	TZName     string           `json:"tz_name"`
	Devices    []*device.Device `json:"devices,omitempty"`
}

A Building belongs to a research subject where we take regular measurements with devices.

func MakeBuilding

func MakeBuilding(accountID uint, long, lat float32, tzName string) Building

Create a new Building.

func (*Building) AddDevice

func (b *Building) AddDevice(device *device.Device)

Add a [Device] to a Building.

type BuildingRepository

type BuildingRepository interface {
	Find(building Building) (Building, error)
	GetAll() ([]Building, error)
	Create(Building) (Building, error)
	Delete(Building) error
}

A BuildingRepository can load, store and delete buildings.

Jump to

Keyboard shortcuts

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