config

package
v0.0.26-beta-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(logger *logrus.Logger)

func ReadConfigFile

func ReadConfigFile() error

func RunSetup

func RunSetup() error

Used for setting up a smarthome server quickly Reads a setup file at startup and starts functions that initialize those values in the database Used for quick setup of a smarthome instance

Types

type Config

type Config struct {
	Server   ServerConfig            `json:"server"`
	Database database.DatabaseConfig `json:"database"`
}

func GetConfig

func GetConfig() Config

type ServerConfig

type ServerConfig struct {
	Production bool   `json:"production"`
	Port       uint16 `json:"port"`
}

type Setup

type Setup struct {
	HardwareNodes []database.HardwareNode `json:"hardwareNodes"`
	Rooms         []database.Room         `json:"rooms"`
}

Jump to

Keyboard shortcuts

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