thermostat

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Db

func Db(config *Config) (*sql.DB, error)

func DbEventExists

func DbEventExists(db *sql.DB, schemaName, eventName string) bool

func DbExecuteQuery

func DbExecuteQuery(db *sql.DB, query string, dest interface{}) error

func DbPluginActive

func DbPluginActive(db *sql.DB, plugin string) (bool, error)

func DbSchemaExists

func DbSchemaExists(db *sql.DB, schemaName string) bool

func DbTableExists

func DbTableExists(db *sql.DB, schemaName, tableName string) bool

func DbVariableEnabled

func DbVariableEnabled(db *sql.DB, name string) (bool, error)

func DbVariableValue

func DbVariableValue(db *sql.DB, name string) (string, error)

Types

type Config

type Config struct {
	Properties `yaml:"properties"`
	IP         string `yaml:"ip"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type Properties

type Properties map[interface{}]interface{}

func (Properties) Find

func (p Properties) Find(lens string) (val interface{}, err error)

func (Properties) FindBool

func (p Properties) FindBool(lens string) (val bool, err error)

func (Properties) FindString

func (p Properties) FindString(lens string) (val string, err error)

Jump to

Keyboard shortcuts

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